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

Retry downloading artifacts on not found errors #689

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

stefanprodan
Copy link
Member

Changes:

  • Extract the artifact operations such as download, verify and untar into a dedicated struct
  • Introduce a dedicated type for artifact not found errors
  • On artifact not found errors, log the error, update the ready status message and requeue the object
  • Retry the artifact download at the interval set with --requeue-dependency (defaults to 30s)

This PR gracefully handles Flux upgrades, where instead of erroring out while source-controller rebuilds the artifacts cache, kustomize-contoller retries the fetch operations. Ref: fluxcd/flux2#2884

@stefanprodan stefanprodan added the enhancement New feature or request label Jun 30, 2022
@stefanprodan stefanprodan changed the title Retry downloading the artifact on not found errors Retry downloading artifacts on not found errors Jun 30, 2022
@stefanprodan stefanprodan force-pushed the artifact-downloader branch 2 times, most recently from 9be2083 to 88a2e47 Compare June 30, 2022 14:55
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the naming nit, this seems to be doing what is described. Thanks @stefanprodan 🥇

- Extract the artifact operations such as download, verify, untar into a dedicated struct
- Introduce a dedicated type for artifact not found errors
- On artifact not found errors, log the error, update the ready status message and requeue the object
- Retry the artifact download at the interval set with `--requeue-dependency` (defaults to 30s)

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan merged commit 08b4726 into main Jul 1, 2022
@stefanprodan stefanprodan deleted the artifact-downloader branch July 1, 2022 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants