-
Notifications
You must be signed in to change notification settings - Fork 182
Prevent 503s from killing the client during discovery #187
Prevent 503s from killing the client during discovery #187
Conversation
/cc |
1 similar comment
/cc |
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.
I left some comments.
try: | ||
resources_response = self.client.request('GET', path).resources or [] | ||
except ServiceUnavailableError: | ||
resources_response = [] |
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.
I think when the exception is caught we should probably log a warning. What do you think?
logger.warn('some helpful text')
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.
makes sense, though this module is lacking logging in general. I can add it here and then maybe do a followup PR to add it to rest?
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.
Sounds good to me. 👍
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@roycaihw: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabianvf, roycaihw The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sometimes aggregated API servers are down, which results in a 503 during discovery. Rather than raising an exception during discovery, we'll instead ignore the error, and an error won't be raised until the user attempts to access that API. This allows users to ignore downed APIs that they don't use.