Skip to content

dependency name (and alias) clashes should be reported as errors #9169

@dastrobu

Description

@dastrobu

While trying to fix #9150 I found another class of issues with aliases and name clashes of dependencies.

I am proposing to report the following situation as errors on linting (and template/installing/upgrading) a chart:

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

While the last example may be working in the future (see #7413), I can't see any valid use case for the first two examples.
Currently Helm renders templates, resulting in more or less undefined behaviour. Some templates will override each other, others won't, depending on file names in the actual charts and on the chart names itself.

Output of helm version:
version.BuildInfo{Version:"v3.4.2", GitCommit:"23dd3af5e19a02d4f4baa5b2f242645a1a3af629", GitTreeState:"clean", GoVersion:"go1.14.13"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.in progress

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions