lint and validate dependency metadata to reference dependencies with …#9176
Conversation
ff51cdf to
a9f1df0
Compare
a9f1df0 to
1b3801a
Compare
|
Rebased onto current main. |
|
why isn't this merged |
1b3801a to
a75251f
Compare
|
Rebased onto current main. |
a75251f to
4c23745
Compare
…a unique key (name or alias)
Report charts with the following bad dependency specifications as bad charts:
dependencies:
- name: foo
alias: baz # ← baz used twice
version: 1.0.0
- name: bar
alias: baz # ← baz used twice
version: 1.0.0
dependencies:
- name: foo
alias: bar # ← shadows chart below
version: 1.0.0
- name: bar
version: 1.0.0
dependencies:
- name: foo
version: 1.0.0
- name: foo # ← chart with same name as above (although version or repo will be different, this will not work currently)
version: 1.2.3
Closes helm#9169
Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
4c23745 to
6a4035a
Compare
…ndency-shadowing
joejulian
left a comment
There was a problem hiding this comment.
I tried being creative but I can't break this. Nice work!
|
Hey @dastrobu 👋 , I'm now (v3.14.0) getting error messages, is this a non valid use case?:
Or am I missing something? |
|
According to the documentation for the Chart.yaml using name twice with separate aliases seems to be okay. Quote: alias: (optional) Alias to be used for the chart. Useful when you have to add the same chart multiple times But now this seemed to be treated as error! |
@dbluxo I guess your case should work as long as the repo and version is identical for both dependencies. Otherwise you will hit the case described in #9169 (undefined behaviour). |
Hi @dastrobu , I opened an issue related to this change. In my case, the two dependencies are exactly the same with different aliases. But the alias is removed by JFrog in its index.yaml metadata. If all versions of the helm charts are with the same kind (aliases duplicate), it seems they will show up in search result. But that's not reliable. Refer to my issue for more details. Thanks. |
…a unique key (name or alias)
Report charts with the following bad dependency specifications as bad charts:
Closes #9169
Signed-off-by: Daniel Strobusch 1847260+dastrobu@users.noreply.github.com
What this PR does / why we need it:
Special notes for your reviewer:
If applicable: