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

Run helm chart metadata update only on a changed target #1616

Merged
merged 2 commits into from
Sep 25, 2023

Conversation

olblak
Copy link
Member

@olblak olblak commented Sep 25, 2023

Fix #1614

We only want to update the Chart metadata if the chart has been modified during the current target execution.
To make this process more idempotent in the context of a SCM, we could also check if the helm chart
has been modified during one of the previous target execution by comparing the current chart versus the one defined
on the source branch. But the code complexity induced by this check is probably not worth the effort today.

Test

To test this pull request, you can run the following commands:

cd pkg/plugins/resources/helm/ 
go test

Additional Information

Tradeoff

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added the bug Something isn't working label Sep 25, 2023
dduportal
dduportal previously approved these changes Sep 25, 2023
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

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

👍

@dduportal dduportal changed the title Run helm chart metadata update on target change Run helm chart metadata update only on a changed target Sep 25, 2023
Signed-off-by: Olblak <me@olblak.com>
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

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

Early returns FTW! 👏

@olblak
Copy link
Member Author

olblak commented Sep 25, 2023

Thanks I slightly changed the PR to also update the appVersion field update even if the target didn't change.

@dduportal
Copy link
Contributor

Thanks I slightly changed the PR to also update the appVersion field update even if the target didn't change.

I'm not sure to understand the use case (but I don't use updatecli to track appversion so I guess it should be fine?).

Currently trying a local build of 3c9e749

@olblak olblak merged commit 29f4f91 into updatecli:main Sep 25, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm chart using versionincrement always bump the chart version
2 participants