Skip to content

Add SQLAlchemy ORM plugin tests#1235

Open
jonathanl-bq wants to merge 43 commits into
sqlalchemy-orm-mysqlfrom
sqlalchemy-orm-plugins
Open

Add SQLAlchemy ORM plugin tests#1235
jonathanl-bq wants to merge 43 commits into
sqlalchemy-orm-mysqlfrom
sqlalchemy-orm-plugins

Conversation

@jonathanl-bq
Copy link
Copy Markdown

Description

This change adds the SQLAlchemy ORM plugin tests, and also updates the mysql_orm_dialect to intercept calls to the underlying driver.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

else:
opts['plugins'] = opts['wrapper_plugins']
opts.pop('wrapper_plugins', None)
if 'connect_timeout' in opts:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to check for other timeouts here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other timeouts set in the plugins tests (e.g. socket_timeout, monitoring-connect_timeout, monitoring-socket_timeout) don't seem to cause any problems.

)

self.supports_sequences = (
self.is_mariadb and self.server_version_info >= (10, 3)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why are we checking mariadb here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to change too much of the existing logic this was based on from sqlalchemy.

if 'target' not in opts:
opts['target'] = mysql.connector.Connect
if 'wrapper_plugins' not in opts:
opts['plugins'] = "aurora_connection_tracker,failover"
Copy link
Copy Markdown
Contributor

@karenc-bq karenc-bq May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we switch the default plugin list to using failover2 instead of failover1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants