Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Constrain SQLAlchemy to <2 #170

Merged
merged 1 commit into from
Aug 8, 2023
Merged

fix: Constrain SQLAlchemy to <2 #170

merged 1 commit into from
Aug 8, 2023

Conversation

edgarrmondragon
Copy link
Member

The next release of the SDK adds support for SQLAlchemy 2.0 but this target does not seem to support it yet.

Related:

@edgarrmondragon edgarrmondragon requested a review from visch August 3, 2023 16:00
@edgarrmondragon edgarrmondragon marked this pull request as ready for review August 3, 2023 16:00
@andyoneal
Copy link
Contributor

fyi I was working on this (and the shared connection change for when that’s released) but i’m still failing a few tests https://github.com/andyoneal/target-postgres/tree/shared-instance

@edgarrmondragon
Copy link
Member Author

Thanks @andyoneal!

and the shared connection change for when that’s released

Is this causing failures??

@andyoneal
Copy link
Contributor

andyoneal commented Aug 7, 2023

Thanks @andyoneal!

and the shared connection change for when that’s released

Is this causing failures??

I don't know unfortunately. Since I tried to migrate from SDK 0.28->0.30, SQLA 1.4->2.0, and support the shared connection all at the same time, I'm not sure which is causing errors.

Just for reference, these are the tests that are still failing on that branch:

  • test_aapl_to_postgres: sqlalchemy.exc.StatementError: (builtins.TypeError) Object of type Decimal is not JSON serializable
  • test_record_missing_key_property: assert 'Primary key not found in record.' in "Record is missing one or more key_properties. \nKey Properties: ['id'], Record Keys: ['metric', '_sdc_extracted_at', '_sdc_received_at', '_sdc_batched_at', '_sdc_deleted_at', '_sdc_sequence', '_sdc_table...
  • test_no_primary_keys: assert 96 == 16
  • test_tap_appl: sqlalchemy.exc.StatementError: (builtins.TypeError) Object of type Decimal is not JSON serializable

EDIT: now only failing the two "aapl" tests, though I'm not set up to run the ssh tunnel test.

@edgarrmondragon
Copy link
Member Author

Ok, then a safe step-wise migration would look like this:

  1. Constrain SQLAlchemy to < 2 (this PR)
  2. Bump the SDK, but not SQLAlchemy. Fix broken tests, if any.
  3. Bump SQLAlchemy. Fix broken tests, if any.

Wdyt @andyoneal? cc @visch

@andyoneal
Copy link
Contributor

Makes sense to me. That should have been the obvious approach, but I was excited about the shared connector instance changes. I've been running into the connection limit a lot.

@visch
Copy link
Member

visch commented Aug 8, 2023

Makes sense to me :D I'll merge this one

@visch visch merged commit 53903cb into main Aug 8, 2023
@visch visch deleted the chore/sqlalchemy-under-2 branch August 8, 2023 01:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants