-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this 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)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
What
should_retry
from streamget_error_handler
methodRechargeErrorHandler
should_retry
testHow
Review guide
streams.py
recharge_error_handler.py
User Impact
Can this PR be safely reverted and rolled back?