This repository has been archived by the owner on Sep 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
Configure reactions to errors in the handlers, per-handler #222
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🤖 zincr found 0 problems , 0 warnings
|
🤖 zincr found 1 problem , 0 warnings
Details on how to resolve are provided below ApprovalsAll proposed changes must be reviewed by project maintainers before they can be merged Not enough people have approved this pull request - please ensure that 1 additional user, who have not contributed to this pull request approve the changes.
|
docs/errors.rst
Outdated
depending on the settings. | ||
Kopf assumes that any arbitrary errors | ||
(i.e. not `TemporaryError` and not `PermanentError`) | ||
are the environment issues and can self-resolve after some time. |
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.
should be: "are environment issues" without "the"
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.
Fixed.
dneuhaeuser-zalando
approved these changes
Nov 12, 2019
2 tasks
2 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extra keywords for the handlers to override the default exception-reacting behaviour (timeouts, retries, cool-down periods, arbitrary error interpretations).
Description
With this PR, the error handling mode can be configured by handler (for arbitrary exceptions):
errors=kopf.ErrorsMode.PERMANENT
retries=3
timeout=60
(exists already)errors=kopf.ErrorsMode.IGNORED
The current and historic behaviour (the new default) is to treat all errors as temporary until the timeout is reached, or forever until the resource is deleted (if timeout is not set).
Also, a cooldown period between retries can be configured. Previously, it was hard-coded to 60 seconds.
The example with exceptions is changed accordingly to demo the now extended usage.
See the list of commits for detailed step-by-step changes.
Types of Changes
Review
List of tasks the reviewer must do to review the PR