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

feat(verification): improve transient error handling #1650

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented Mar 19, 2024

Addresses (part of) #1640

This improves the handling of transient Kubernetes API errors which may occur during the verification step of a Stage's current Freight.

It does this by selectively returning errors which should be retried, causing the reconciler to not leave the Verifying phase and allowing it to retry the action it performed on the next reconciliation attempt.

To allow the reconciler to distinguish a creation error from a failed attempt to retrieve results, closer inspection is performed on the existence of an AnalysisRun reference in the VerificationInfo.

@hiddeco hiddeco requested a review from a team as a code owner March 19, 2024 15:22
Copy link

netlify bot commented Mar 19, 2024

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit f673374
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/6615c87cd63b9600083bcbda
😎 Deploy Preview https://deploy-preview-1650.kargo.akuity.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.19%. Comparing base (e480493) to head (f673374).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1650      +/-   ##
==========================================
+ Coverage   44.04%   44.19%   +0.14%     
==========================================
  Files         207      208       +1     
  Lines       13133    13168      +35     
==========================================
+ Hits         5784     5819      +35     
  Misses       7106     7106              
  Partials      243      243              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hiddeco hiddeco changed the title feat(verification): improve transient err handling feat(verification): improve transient error handling Mar 19, 2024
@krancour krancour added this to the v0.6.0 milestone Mar 21, 2024
@krancour
Copy link
Member

krancour commented Apr 9, 2024

This LGTM after merge conflicts are resolved.

I may be PR'ing something similar for Promotions shortly.

@hiddeco hiddeco force-pushed the imprv-transient-err-handling branch from 01c4bbf to d566baa Compare April 9, 2024 21:04
@hiddeco
Copy link
Contributor Author

hiddeco commented Apr 9, 2024

Has been rebased.

@hiddeco hiddeco requested a review from krancour April 9, 2024 21:05
@hiddeco hiddeco force-pushed the imprv-transient-err-handling branch from d566baa to b7903a2 Compare April 9, 2024 21:16
This commit improves the handling of transient Kubernetes API errors
which may occur during the verification step of a Stage's current
Freight.

It does this by selectively returning errors which should be retried,
causing the reconciler to not leave the `Verifying` phase and allowing
it to retry the action it performed on the next reconciliation attempt.

To allow the reconciler to distinguish a creation error from a failed
attempt to retrieve results, closer inspection is performed on the
existence of an `AnalysisRun` reference in the `VerificationInfo`.

Signed-off-by: Hidde Beydals <[email protected]>
@hiddeco hiddeco force-pushed the imprv-transient-err-handling branch from b7903a2 to f673374 Compare April 9, 2024 23:00
@hiddeco hiddeco added this pull request to the merge queue Apr 9, 2024
Merged via the queue into akuity:main with commit 0c5b3b7 Apr 9, 2024
16 checks passed
@hiddeco hiddeco deleted the imprv-transient-err-handling branch April 9, 2024 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants