fix: make sure that helm downloader does not overwrite chart with provenance data (#1481)#1485
Merged
jakobmoellerdev merged 1 commit intoMay 23, 2025
Conversation
…venance data (open-component-model#1481) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it in the helm downloader, there was a case when the chart data was overwritten with the provenance data. if the target path passed to the downloader was a path such as `path.tgz` then this path was reused for writing the provenance file. This was now fixed and there will be: 1. A download path pointing to the .tgz => chart.tgz 2. A provenance file (if it exists) => chart.prov #### Which issue(s) this PR fixes <!-- Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Note that before, due to buggy behavior the output provenance file was just called `chart` because the .prov file extension was not properly added. this has been fixed as well. additionally if the file path was `tar.gz` instead of `tgz`, the file ending removal was incorrect. this has been fixed. This was also the last reason why the ocm download resource command returned incorrect data in the tgz when downloading a resource with accessType helm. fix open-component-model#1469 (cherry picked from commit c2e1bd2)
Skarlso
approved these changes
May 23, 2025
781b099
into
open-component-model:releases/v0.23
19 checks passed
This file contains hidden or 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
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.
What this PR does / why we need it
in the helm downloader, there was a case when the chart data was overwritten with the provenance data. if the target path passed to the downloader was a path such as
path.tgzthen this path was reused for writing the provenance file.This was now fixed and there will be:
Which issue(s) this PR fixes
Note that before, due to buggy behavior the output provenance file was just called
chartbecause the .prov file extension was not properly added. this has been fixed as well.additionally if the file path was
tar.gzinstead oftgz, the file ending removal was incorrect. this has been fixed.This was also the last reason why the ocm download resource command returned incorrect data in the tgz when downloading a resource with accessType helm.
fix #1469
(cherry picked from commit c2e1bd2)