Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[CDK] Fix ValueError in Python CDK #33798

Closed
wants to merge 3 commits into from

Conversation

maver1ck
Copy link

@maver1ck maver1ck commented Dec 27, 2023

Fixes #33795

@maver1ck maver1ck requested a review from a team as a code owner December 27, 2023 12:03
Copy link

vercel bot commented Dec 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 7, 2024 6:04pm

@CLAassistant
Copy link

CLAassistant commented Dec 27, 2023

CLA assistant check
All committers have signed the CLA.

@octavia-squidington-iii octavia-squidington-iii added CDK Connector Development Kit community labels Dec 27, 2023
@marcosmarxm marcosmarxm changed the title Fix ValueError in Python CDK dataclasses [CDK] Fix ValueError in Python CDK Dec 29, 2023
Copy link
Member

@marcosmarxm marcosmarxm left a comment

Choose a reason for hiding this comment

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

Can you add a unit test to validate the change?

@maver1ck
Copy link
Author

Hi @marcosmarxm
Could you please point me to similar tests that can be inspiration ?

@girarda
Copy link
Contributor

girarda commented Jan 8, 2024

@maver1ck you can add tests to the test files for the classes you modified. Here's the test file for the token provider as an example.

I'm a little curious about the root cause or how to reproduce the issue. Do you know if this is a problem specific to python 3.11?

@marcosmarxm
Copy link
Member

@maver1ck did you have time to take a look in Alex's comments?

@maver1ck
Copy link
Author

maver1ck commented Jan 20, 2024 via email

@andrii-porokhnavets
Copy link

Hey @maver1ck, thanks for fixing this issue! I face the same and it would be really cool to merge this PR. Could you say when you are going to finish it?

@marcosmarxm
Copy link
Member

@maver1ck were you able to take a look and provide some unit tests?

@aaronsteers
Copy link
Collaborator

@maver1ck - Thanks for creating this PR. I can confirm some PyAirbyte users have started to run into this issue under Python 3.11. The workaround is to downgrade to 3.10, if possible, but I'll add my voice to those hoping we can incorporate+merge this. 🙂

@natikgadzhi
Copy link
Contributor

I just hit the same problem in source-declarative-manifest. Let me take a look, see if I can add tests and merge this.

@natikgadzhi
Copy link
Contributor

I think that a meaningful way to validate this would be:

  1. To make sure that we run Python CDK tests on Python 3.9, 3.10, and 3.11. Adding 3.11 is important because it's exactly what we're trying to fix here, there's no error on 3.10.
  2. Make sure that existing code without the PR fails on 3.11 tests, but does work correctly with the PR in.

I don't know if new test cases will be needed, since the failure is when you're trying to even import the CDK. What we want to validate is that you can still instantiate all those classes and their behavior does not change, but that's in currently existing tests mostly.

@natikgadzhi
Copy link
Contributor

@alafanechere this aged like milk, probably not worth rebasing, but the actual issue of not being compatible with 3.11 is there. We should clean this out.

natikgadzhi added a commit that referenced this pull request Jun 2, 2024
Use dataclass fields with default_factory for 3.11 compatibility.
Reimplements #33798 on top of current master.
natikgadzhi added a commit that referenced this pull request Jun 2, 2024
Use dataclass fields with default_factory for 3.11 compatibility.
Reimplements #33798 on top of current master.
@natikgadzhi
Copy link
Contributor

This just shipped in #38846!

@natikgadzhi natikgadzhi closed this Jun 3, 2024
erohmensing pushed a commit that referenced this pull request Jun 14, 2024
Use dataclass fields with default_factory for 3.11 compatibility.
Reimplements #33798 on top of current master.
erohmensing pushed a commit that referenced this pull request Jun 14, 2024
Use dataclass fields with default_factory for 3.11 compatibility.
Reimplements #33798 on top of current master.
erohmensing pushed a commit that referenced this pull request Jun 14, 2024
Use dataclass fields with default_factory for 3.11 compatibility.
Reimplements #33798 on top of current master.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit community team/extensibility
Projects
No open projects
9 participants