Skip to content

fix: HELM_DIFF_IGNORE_UNKNOWN_FLAGS ignored issue - #538

Merged
mumoshu merged 3 commits into
databus23:masterfrom
yxxhero:fix-HELM_DIFF_IGNORE_UNKNOWN_FLAGS-issues
Jan 27, 2024
Merged

mumoshu merged 3 commits into
databus23:masterfrom
yxxhero:fix-HELM_DIFF_IGNORE_UNKNOWN_FLAGS-issues

Conversation

@yxxhero

@yxxhero yxxhero commented Jan 19, 2024

Copy link
Copy Markdown
Collaborator

fix: #537

@yxxhero

yxxhero commented Jan 19, 2024

Copy link
Copy Markdown
Collaborator Author

@mumoshu

Comment thread cmd/upgrade.go
cmdFlags := cmd.Flags()

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

@mumoshu mumoshu Jan 22, 2024 •

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@mumoshu mumoshu left a comment

Copy link
Copy Markdown
Collaborator

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
@yxxhero
yxxhero deleted the fix-HELM_DIFF_IGNORE_UNKNOWN_FLAGS-issues branch January 27, 2024 01:32
@yxxhero

yxxhero commented Jan 27, 2024

Copy link
Copy Markdown
Collaborator Author

@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