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

include-needs also includes transitive release-dependencies #1003

Open
pathob opened this issue Sep 6, 2023 · 3 comments · May be fixed by #1007
Open

include-needs also includes transitive release-dependencies #1003

pathob opened this issue Sep 6, 2023 · 3 comments · May be fixed by #1007
Labels
bug Something isn't working

Comments

@pathob
Copy link
Contributor

pathob commented Sep 6, 2023

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

@yxxhero
Copy link
Member

yxxhero commented Sep 7, 2023

@pathob PR is welcome.

@pathob
Copy link
Contributor Author

pathob commented Sep 7, 2023

@yxxhero

I'm a super newbie to Go

I will not be able to fix this. I found it when trying to add the needs flags for the list command. That's what I can contribute when the mechanism works again for the other commands 😅

@yxxhero
Copy link
Member

yxxhero commented Sep 7, 2023

@pathob I will fix this. Thanks so much.

@yxxhero yxxhero added the bug Something isn't working label Sep 8, 2023
@yxxhero yxxhero linked a pull request Sep 9, 2023 that will close this issue
@yxxhero yxxhero linked a pull request Sep 9, 2023 that will close this issue
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 a pull request may close this issue.

2 participants