Skip to content

Retry downloading artifacts on not found errors#689

Merged
stefanprodan merged 1 commit intomainfrom
artifact-downloader
Jul 1, 2022
Merged

Retry downloading artifacts on not found errors#689
stefanprodan merged 1 commit intomainfrom
artifact-downloader

Conversation

@stefanprodan
Copy link
Copy Markdown
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 requested a review from hiddeco June 30, 2022 14:50
@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
Comment thread controllers/kustomization_downloader.go Outdated
Copy link
Copy Markdown
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 🥇

@stefanprodan stefanprodan force-pushed the artifact-downloader branch from 88a2e47 to 9ad24d6 Compare July 1, 2022 10:45
- 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 force-pushed the artifact-downloader branch from 9ad24d6 to cfd5200 Compare July 1, 2022 10:55
@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