-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: operator retries and error logging #511
Merged
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
mjnagel
commented
Jun 27, 2024
rjferguson21
previously approved these changes
Jun 28, 2024
UnicornChance
previously approved these changes
Jun 28, 2024
This PR fixes two bugs around operator reconciliation/retry handling: - Infinite pending/failure loop caused by placement of uidSeen addition - Package retry new status phase to prevent packages getting stuck in pending Fixes # <!-- or --> Relates to # - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide Steps](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request) followed --------- Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
MxNxPx
reviewed
Jul 2, 2024
UnicornChance
approved these changes
Jul 3, 2024
Something of note to capture in a future PR, creating and using a UDS Error type that allows for some better error handling and management.
|
mjnagel
pushed a commit
that referenced
this pull request
Jul 8, 2024
🤖 I have created a release *beep* *boop* --- ## [0.23.0](v0.22.2...v0.23.0) (2024-07-04) ### ⚠ BREAKING CHANGES * remove emulated gitlab endpoints from keycloak ([#483](#483)) ### Features * identity group auth ([#497](#497)) ([d71d83e](d71d83e)) ### Bug Fixes * **docs:** re-ordered small paragraphs, clarified wording, and added links to tech homepages ([#531](#531)) ([6b2b46b](6b2b46b)) * **docs:** removed double-link which broke the markdown formatting in pr template ([#532](#532)) ([f41ced4](f41ced4)) * **docs:** uds-config.yaml example in k3d-slim-dev README ([#530](#530)) ([2e1c53e](2e1c53e)) * operator retries and error logging ([#511](#511)) ([cae5aab](cae5aab)) ### Miscellaneous * **deps:** update checkout action to latest sha ([#481](#481)) ([c6f0137](c6f0137)) * **deps:** update dependency weaveworks/eksctl to v0.183.0 ([#499](#499)) ([9cb8e4d](9cb8e4d)) * **deps:** update grafana to 11.1.0 ([#380](#380)) ([499058a](499058a)) * **deps:** update istio to v1.22.2 ([#512](#512)) ([dcdadb4](dcdadb4)) * **deps:** update jest to v29.1.5 ([#485](#485)) ([9c392b9](9c392b9)) * **deps:** update neuvector to 5.3.3 ([#467](#467)) ([261057d](261057d)) * **deps:** update pepr to 0.32.2 ([#473](#473)) ([ab4bee9](ab4bee9)) * **deps:** update pepr to 0.32.3 ([#494](#494)) ([2e28897](2e28897)) * **deps:** update pepr to 0.32.6 ([#516](#516)) ([a9d3eec](a9d3eec)) * **deps:** update promtail to 3.1.0 ([#335](#335)) ([4457fce](4457fce)) * **deps:** update uds to v0.12.0 ([#521](#521)) ([8e587ff](8e587ff)) * **deps:** update uds-common tasks to 0.6.1 ([#498](#498)) ([4aa6e33](4aa6e33)) * **deps:** update zarf to v0.35.0 ([#490](#490)) ([86957cf](86957cf)) * docs linting changes ([#505](#505)) ([0fe2015](0fe2015)) * remove emulated gitlab endpoints from keycloak ([#483](#483)) ([495960c](495960c)) * update docs for group auth and readme for docs site ([#540](#540)) ([ace7041](ace7041)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
rjferguson21
pushed a commit
that referenced
this pull request
Jul 11, 2024
## Description This PR has a number of changes, mostly tied to operator behaviors and bug fixes around failure logging. Included: - URI Encoding of client ID on deletion/updates - when we call updates/deletions on KC clients it gets appended to our URL for our request and must be encoded - Moves around the try/catch to only wrap the Keycloak API call so that errors are surfaced more accurately in events and modifies the thrown error from the Keycloak response to include the keycloak response status and data (see #448) - Adds a new Phase to Package for `Retrying` - this differentiates from a `Pending` package that is already being reconciled to allow retries to function as expected (see #492) - Moves uidSeen addition to patch status to handle infinite failure -> pending -> failure ... loop on first apply (see #525) ## Related Issue Fixes #492 Fixes #448 Fixes #525 ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request) followed --------- Co-authored-by: Megamind <882485+jeff-mccoy@users.noreply.github.com>
rjferguson21
pushed a commit
that referenced
this pull request
Jul 11, 2024
🤖 I have created a release *beep* *boop* --- ## [0.23.0](v0.22.2...v0.23.0) (2024-07-04) ### ⚠ BREAKING CHANGES * remove emulated gitlab endpoints from keycloak ([#483](#483)) ### Features * identity group auth ([#497](#497)) ([d71d83e](d71d83e)) ### Bug Fixes * **docs:** re-ordered small paragraphs, clarified wording, and added links to tech homepages ([#531](#531)) ([6b2b46b](6b2b46b)) * **docs:** removed double-link which broke the markdown formatting in pr template ([#532](#532)) ([f41ced4](f41ced4)) * **docs:** uds-config.yaml example in k3d-slim-dev README ([#530](#530)) ([2e1c53e](2e1c53e)) * operator retries and error logging ([#511](#511)) ([cae5aab](cae5aab)) ### Miscellaneous * **deps:** update checkout action to latest sha ([#481](#481)) ([c6f0137](c6f0137)) * **deps:** update dependency weaveworks/eksctl to v0.183.0 ([#499](#499)) ([9cb8e4d](9cb8e4d)) * **deps:** update grafana to 11.1.0 ([#380](#380)) ([499058a](499058a)) * **deps:** update istio to v1.22.2 ([#512](#512)) ([dcdadb4](dcdadb4)) * **deps:** update jest to v29.1.5 ([#485](#485)) ([9c392b9](9c392b9)) * **deps:** update neuvector to 5.3.3 ([#467](#467)) ([261057d](261057d)) * **deps:** update pepr to 0.32.2 ([#473](#473)) ([ab4bee9](ab4bee9)) * **deps:** update pepr to 0.32.3 ([#494](#494)) ([2e28897](2e28897)) * **deps:** update pepr to 0.32.6 ([#516](#516)) ([a9d3eec](a9d3eec)) * **deps:** update promtail to 3.1.0 ([#335](#335)) ([4457fce](4457fce)) * **deps:** update uds to v0.12.0 ([#521](#521)) ([8e587ff](8e587ff)) * **deps:** update uds-common tasks to 0.6.1 ([#498](#498)) ([4aa6e33](4aa6e33)) * **deps:** update zarf to v0.35.0 ([#490](#490)) ([86957cf](86957cf)) * docs linting changes ([#505](#505)) ([0fe2015](0fe2015)) * remove emulated gitlab endpoints from keycloak ([#483](#483)) ([495960c](495960c)) * update docs for group auth and readme for docs site ([#540](#540)) ([ace7041](ace7041)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR has a number of changes, mostly tied to operator behaviors and bug fixes around failure logging. Included:
Retrying
- this differentiates from aPending
package that is already being reconciled to allow retries to function as expected (seePackage
retries can result inPackage
s getting stuck in Pending #492)Package
stuck inFailed
<->Pending
loop #525)Related Issue
Fixes #492
Fixes #448
Fixes #525
Type of change
Checklist before merging