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

[airbyte-cdk] - Update JSON Error Message Parser to return additional error message fields or default to dict #44010

Merged
merged 7 commits into from
Aug 28, 2024

Conversation

pnilan
Copy link
Contributor

@pnilan pnilan commented Aug 13, 2024

What

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Aug 13, 2024

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Aug 28, 2024 5:53pm

@octavia-squidington-iii octavia-squidington-iii added the CDK Connector Development Kit label Aug 13, 2024
@natikgadzhi
Copy link
Contributor

@alafanechere note: CDK changes regression tests are failing here: https://fff942bf5099f1330556ce7fdc9c8473e612d2cc255905901f6214e-apidata.googleusercontent.com/download/storage/v1/b/airbyte-ci-reports-multi/o/airbyte-ci%2Fconnectors%2Ftest%2Fpull_request%2Fpnilan_airbyte-cdk-improve-error-messages-parsing%2F1723582353%2F24b2e4fa50925f9d42b4636ec86f4435cbba5cd8%2Fsource-shopify%2F2.4.20%2Foutput.html?jk=AXZI6JxzKrkkrA9ZobZjFyIqybP76A3l-aTkgkzFGo8OXrRX5V_er9qRYS29Is-Cfl4pAA8g4W5XJ9LsmkXDLuV05qaJLceuat7hzY0J9iXx9oGr-hpvu5mvSV6JkrKUwiaO53tvLC-5WHwIYKpztrZOKtF180DVyU7r4oy-P-saSohugvWxPNGjbeb1Oo2_5RqfhtTxJajQuWjrSDZUZ8_ctnH8SbGd8XpoRpiN18Z1cb5x23ylrgmTWJGMdCLspZVPOPs8ArhQS_i10HJ134qFZhsAgWge-dmDiBF0gzjXiI31oWr9xEXqdLEDZMx3QlpqtEAu06NVBA6Qgbq0ppR5-PItDOKzjPgyBHHWxVUkfrIi1GipPhl6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@alafanechere
Copy link
Contributor

@alafanechere note: CDK changes regression tests are failing here.

@clnoll I'm not 100% sure. Do we want to skip or run these regression tests on CDK change? If we want to run them there's indeed a bug to fix. I think we should disable them until fixed to not block the python team.

@natikgadzhi
Copy link
Contributor

natikgadzhi commented Aug 14, 2024 via email

Copy link
Contributor

@girarda girarda left a comment

Choose a reason for hiding this comment

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

@pnilan can you add some unit tests covering these cases?

codeflash-ai bot added a commit that referenced this pull request Aug 28, 2024
#44010 (`pnilan/airbyte-cdk-improve-error-messages-parsing`)

Certainly! To optimize the given code, especially focusing on runtime improvements, we can.

1. Replace the list comprehension and generator used in the `_try_get_error` method with more efficient alternatives.
2. Optimize the dictionary look-up to check keys sequentially rather than getting values multiple times.

Here's the revised code.
Copy link

codeflash-ai bot commented Aug 28, 2024

⚡️ Codeflash found optimizations for this PR

📄 JsonErrorMessageParser._try_get_error() in airbyte-cdk/python/airbyte_cdk/sources/streams/http/error_handlers/json_error_message_parser.py

📈 Performance improved by 25% (0.25x faster)

⏱️ Runtime went down from 677 microseconds to 543 microseconds

I created a new dependent PR with the suggested changes. Please review:

If you approve, it will be merged into this PR (branch pnilan/airbyte-cdk-improve-error-messages-parsing).

@pnilan
Copy link
Contributor Author

pnilan commented Aug 28, 2024

/approve-regression-tests

Check job output.

✅ Approving regression tests

Copy link

codeflash-ai bot commented Aug 28, 2024

Copy link

codeflash-ai bot commented Aug 28, 2024

This PR is now faster! 🚀 codeflash-ai[bot] accepted my code suggestion above.

@CLAassistant
Copy link

CLAassistant commented Aug 28, 2024

CLA assistant check
All committers have signed the CLA.

@pnilan pnilan force-pushed the pnilan/airbyte-cdk-improve-error-messages-parsing branch from 85960ad to 13f48c9 Compare August 28, 2024 17:55
@pnilan
Copy link
Contributor Author

pnilan commented Aug 28, 2024

/approve-regression-tests

Check job output.

✅ Approving regression tests

@pnilan pnilan merged commit 1060161 into master Aug 28, 2024
57 of 59 checks passed
@pnilan pnilan deleted the pnilan/airbyte-cdk-improve-error-messages-parsing branch August 28, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants