Skip to content

include-needs also includes transitive release-dependencies #1003

Open
@pathob

Description

Operating system

Docker

Helmfile Version

0.156.0

Helm Version

3.9.0

Bug description

As stated in the Helmfile CLI documentation, --include-needs should only include direct dependencies whereas --include-transitive-needs would include direct and transitive dependencies.

I'm a super newbie to Go and in my projects we are currently only using --include-transitive-needs, but I've already wondered how --include-needs is supposed to work after looking at the code here, here, here, here and here. I guess --include-needs is broken since this change last year.

Look at these jobs for this helmfile.yaml where only releases 2 and 3 should be templated / linted:

I guess apply, diff, sync etc. are affected too.

Example helmfile.yaml

repositories:
  - name: aservo
    url: https://aservo.github.io/charts

releases:
  - chart: aservo/util
    version: 0.0.1
    name: release1
    namespace: default

  - chart: aservo/util
    version: 0.0.1
    name: release2
    namespace: default
    needs:
      - release1

  - chart: aservo/util
    version: 0.0.1
    name: release3
    namespace: default
    needs:
      - release2

Error message you've seen (if any)

None

Steps to reproduce

helmfile <template|lint|?> -l name=release3 --include-needs

Working Helmfile Version

0.147.0 (probably)

Relevant discussion

No response

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions