-
Notifications
You must be signed in to change notification settings - Fork 3
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
Remove --skip-refresh option from scripts/update-charts-dep.sh #30
Open
kirgene
wants to merge
1
commit into
master
Choose a base branch
from
fix/disable-skip-refresh
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reverse.
One (or the CI/CD scripts) should run
helm repo update
prior to running this, which is already done here by circleci --> https://github.com/mojaloop/charts/blob/master/.circleci/config.yml#L46Refer to this --> https://helm.sh/docs/helm/helm_dependency_update/#options
The reason this was not included in this script, is because it is running a
helm dep update
for EVERY single chart. It's unnecessary and very slow, thus why it should be run at the top level, and only once.Note, this does mean that if there are any external dependencies (which there should NOT be), we would need to add those repo's manually (
helm repo add <name> <URL>
) before running thehelm repo update
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we are running
helm dep update
for every dependency, instead of high-level charts, i.e.bof
, mojaloop, etc. Isn't it the job of Helm to do manage dependencies?For me it looks like the same if we were parsing
package.json
with a script and trying to install all dependencies manually instead of callingnpm install
for the whole package.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kirgene, that's because we want all the charts to get published instead of only high-level charts.
So we need the dependencies to be populated in the respective charts folder for all the sub charts also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vijayg10 , am not sure I follow. All (sub)dependencies of high-level charts are deployed, otherwise, what's the point of the "dependency" feature in charts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helm does not update all dependencies for its dependency tree deeply, it will only do so at one level. Thus if you do not run the dep update for each chart (in the correct order), you will have missing dependencies.
At least this is how it worked in Helm v2 and the version I tested in v3. So if something has changed in later v3 versions, please let me know :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am not aware of any dependency problems in helm.
Could you describe how you performed those tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdebarros @vijayg10 please see the following repo for an example of using helm dependencies:
https://github.com/pm4ml/mojaloop-payment-manager-helm/blob/master/mojaloop-payment-manager/Chart.yaml
also, we don't need
scripts/update-charts-dep.sh
:https://github.com/pm4ml/mojaloop-payment-manager-helm/blob/c119c4c52222e794234cb1ed197e04da50494d35/.circleci/config.yml#L30-L44
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see that most bof chart dependencies are still 1.0.0, despite being updated frequently.
This obviously prevents fetching up-to-date changes from charts (and dependencies).
The correct way of handling these updates is:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This process is correct:
However, if we are publishing, we need to build the dependency tree manually, as this is not currently handled by Helm itself, references: