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

Introduction of --skip-needs results in breaking change #339

Closed
strainovic opened this issue Aug 31, 2022 · 11 comments · Fixed by #342
Closed

Introduction of --skip-needs results in breaking change #339

strainovic opened this issue Aug 31, 2022 · 11 comments · Fixed by #342

Comments

@strainovic
Copy link
Contributor

Operating system

Windows x64

Helmfile Version

0.143.0-0.145.3

Helm Version

3.9.0

Bug description

We use a selector(s) to match and template/sync only a single or subset of services. Everything worked fine until we updated the helmfile version.

helmfile version v0.142.0 works fine with --selector/-l and template command

helmfile version v0.143.0 with the same command produces the following error(s):

in ./helmfile.yaml: release(s) "platform-dev/bpm" depend(s) on an undefined release "platform-dev/authentication". Perhaps you made a typo in "needs" or forgot defining a release named "authentication" with appropriate "namespace" and "kubeContext"?

The sync command worked fine with -selector/-l with both mentioned versions.

Helmfile version 0.145.2 works fine with --selector/-l and sync command

Helmfile version 0.145.3 with the same command produces the following error(s):

Error: in ./helmfile.yaml: release "platform-dev/comments" depends on "platform-dev/api-management" which does not match the selectors. Please add a selector like "--selector name=api-management", or indicate 
whether to skip (--skip-needs) or include (--include-needs) these dependencies

in ./helmfile.yaml: release "platform-dev/comments" depends on "platform-dev/api-management" which does not match the selectors. Please add a selector like "--selector name=api-management", or indicate whether to skip (--skip-needs) or include (--include-needs) these dependencies

Everything works fine if we add -skip-needs on the latest helmfile released version.

Do we really need this breaking change and if yes, what is the benefit of it?

Thanks :)

Example helmfile.yaml

Error message you've seen (if any)

Steps to reproduce

Working Helmfile Version

0.142.0

Relevant discussion

@yxxhero
Copy link
Member

yxxhero commented Aug 31, 2022

@strainovic I will work on this. Thanks for your issue.

@mumoshu
Copy link
Contributor

mumoshu commented Sep 12, 2022

We added this to fix the bug that -l foo=bar resulted in unfilled need to be silently ignored. roboll/helmfile#1772
Other folks complained (apparently folks don't mind much about some needs silently ignored..?) so I changed it to use --skip-needs by default in https://github.com/roboll/helmfile/releases/tag/v0.139.2.
Now, I don't understand why it's still happening! This shouldn't happen after v0.139.2.

@yxxhero How are you going to "fix" it? Did we unintentionally introduced a regression when we migrated to cobra?

@yxxhero
Copy link
Member

yxxhero commented Sep 12, 2022

@mumoshu no. In v0.143.0 we not introduce cobra. I made some repairs according to my understanding. please see: #342

@mumoshu
Copy link
Contributor

mumoshu commented Sep 12, 2022

@yxxhero Which commit/pull request broke it then...? The only relevant commit in v0.143.0 would be roboll/helmfile#2026. But it has been added for a good reason.
@strainovic Hey! Are you sure you don't actually have any typo in your helmfile's needs entries? Could you share your helmfile.yaml?

@mumoshu
Copy link
Contributor

mumoshu commented Sep 12, 2022

@yxxhero I reviewed #342 but I'm still unsure what it's supposed to do. Are you going to make --skip-needs the default? But I thought we already made it so in https://github.com/roboll/helmfile/releases/tag/v0.139.2

@yxxhero
Copy link
Member

yxxhero commented Sep 12, 2022

roboll/helmfile#1835
I see this PR.
I don't understand why --skip-needs is default true?

from the code. it will return false when --skip-needs not provided.

@mumoshu
Copy link
Contributor

mumoshu commented Sep 12, 2022

@yxxhero I think the key difference is the use of BoolTFlag vs BoolFlag.

@yxxhero
Copy link
Member

yxxhero commented Sep 12, 2022

@mumoshu oh. I konw. I will check the code again.

@yxxhero
Copy link
Member

yxxhero commented Sep 12, 2022

@mumoshu done. sorry for this issue.

@mumoshu
Copy link
Contributor

mumoshu commented Sep 13, 2022

@yxxhero Thanks! To be extra clear, your fix addresses the regression introduced in 0.145.0, right?

@yxxhero
Copy link
Member

yxxhero commented Sep 13, 2022

@mumoshu yes.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants