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

[source-recharge] - Migrate to CDK v3.7.0 #42076

Merged
merged 7 commits into from
Jul 19, 2024

Conversation

pnilan
Copy link
Contributor

@pnilan pnilan commented Jul 17, 2024

What

  • Removes should_retry from stream
  • Adds get_error_handler method
  • adds RechargeErrorHandler
  • bumps minor version
  • updates should_retry test

How

Review guide

  1. streams.py
  2. recharge_error_handler.py
  3. tests

User Impact

  • None

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Jul 17, 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 Jul 19, 2024 5:06pm

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/recharge labels Jul 17, 2024
@pnilan pnilan requested a review from a team July 19, 2024 17:07
Copy link
Contributor

@brianjlai brianjlai left a comment

Choose a reason for hiding this comment

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

Just one comment, but not a blocker on merging, just a thought that we want to take note of. If we keep running into situations where we need to reimplement HttpStatusErrorHandler, it means we may need to add new functionality. I've noticed this on a couple version bump this week

def interpret_response(self, response_or_exception: Optional[Union[Response, Exception]] = None) -> ErrorResolution:

if isinstance(response_or_exception, Response):
content_length = int(response_or_exception.headers.get("Content-Length", 0))
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like we need this custom handler, but can you add a comment about why we need the custom component. Basically that we need to inspect the header.

I think like its a feature gap that our http client isn't able to inspect the response headers and decide things on a predicate. The lines between what the declarative component vs the http client are starting to get a little blurry, but the more we see us having to implement a subclass of HttpStatusErrorHandler, the more it signals that it's lacking features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah -- I've noticed a couple on-off checks in the existing backoff_time or should_retry methods. I feel like there hasn't been a consistent trend between these though.

@pnilan pnilan merged commit bbf8d37 into master Jul 19, 2024
38 checks passed
@pnilan pnilan deleted the pnilan/source-recharge-update-cdk-3 branch July 19, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/recharge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants