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

fix: HELM_DIFF_IGNORE_UNKNOWN_FLAGS ignored issue #538

Merged

Conversation

yxxhero
Copy link
Collaborator

@yxxhero yxxhero commented Jan 19, 2024

fix: #537

@yxxhero
Copy link
Collaborator Author

yxxhero commented Jan 19, 2024

@mumoshu

cmdFlags := cmd.Flags()

// see: https://github.com/databus23/helm-diff/issues/537
cmdFlags.ParseErrorsWhitelist.UnknownFlags = unknownFlags
Copy link
Collaborator

@mumoshu mumoshu Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, good catch! Thanks.

So does this basically mean DisableFlagParsing: true, results in `UnknownFlags NOT set by cobra? (Just confirming for learning purpose

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this will disrupt a lot of functionality. I think we only support -- dry run=something. @mumoshu WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yxxhero Thanks! Re dry-run, it won't be a good idea to start dropping the backward-compatibility without any prenotices. We are still in the same major ver of helm-diff (3.x). Dropping the compatibility may break downstream user CI/CD pipelines and/or tools.

I think this justifies having more test coverage in future though 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mumoshu yeah. make sense.

Copy link
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yxxhero Awesome work! Going to merge this and cut a new release asap.

@mumoshu mumoshu merged commit 02be0bd into databus23:master Jan 27, 2024
9 checks passed
@yxxhero yxxhero deleted the fix-HELM_DIFF_IGNORE_UNKNOWN_FLAGS-issues branch January 27, 2024 01:32
@yxxhero
Copy link
Collaborator Author

yxxhero commented Jan 27, 2024

@mumoshu there are some other issue should be fixed. do you have any good iede for fixing issue that caused by DisableFlagParsing: true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HELM_DIFF_IGNORE_UNKNOWN_FLAGS seems to be ignored in v3.9.2
2 participants