Skip to content

Make the charts cache safe in presence of several Helm instances - #7720

Merged
hickeyma merged 1 commit into
helm:masterfrom
misha-ridge:atomic-charts-cache
Mar 26, 2020
Merged

hickeyma merged 1 commit into
helm:masterfrom
misha-ridge:atomic-charts-cache

Conversation

@misha-ridge

@misha-ridge misha-ridge commented Mar 2, 2020 •

Copy link
Copy Markdown

If several instances of Helm are run at the same moment and try to download the
same chart, some of them might see an empty or incomplete file in cache. Prevent
that by saving the dowloaded file atomically.

Closes #7600


This change is Reviewable

@helm-bot helm-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 2, 2020

@jdolitsky jdolitsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks generally straightforward. LGTM

Comment thread pkg/downloader/chart_downloader.go Resolved
@helm-bot helm-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 4, 2020
If several instances of Helm are run at the same moment and try to download the
same chart, some of them might see an empty or incomplete file in cache. Prevent
that by saving the dowloaded file atomically.

Closes #7600

Signed-off-by: Mikhail Gusarov <[email protected]>
@helm-bot helm-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 4, 2020
@misha-ridge

Copy link
Copy Markdown
Author

Any more comments?

@misha-ridge

Copy link
Copy Markdown
Author

Ping?

@hickeyma hickeyma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for the improvement @misha-ridge

@hickeyma
hickeyma merged commit aef7b1d into helm:master Mar 26, 2020
@hickeyma hickeyma added this to the 3.2.0 milestone Mar 26, 2020
@hickeyma hickeyma added needs-pick Indicates that a PR needs to be cherry-picked into the next release candidate. v3.x Issues and Pull Requests related to the major version v3 labels Mar 26, 2020
@yurrriq

yurrriq commented Oct 13, 2020

Copy link
Copy Markdown
Contributor

Not sure how I missed this one.. Thank you!

@marckhouzam marckhouzam removed the needs-pick Indicates that a PR needs to be cherry-picked into the next release candidate. label Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes 10-29 lines, ignoring generated files. v3.x Issues and Pull Requests related to the major version v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Charts cache is not resilient to running several Helm instances in parallel

7 participants