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
feat(helm): add ability for --dry-run to do lookup functions #9426
Merged
Merged
Changes from 5 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
92a6640
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia 51281c1
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia 4d67dfa
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia fc16ea7
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia be99ebe
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia ddb3358
feat(helm): add ability for a dry-run to evaluate lookup functions
tapaskapadia d66c7db
feat(helm): add ability for a dry-run to evaluate lookup functions
tapaskapadia 5ec7913
feat(helm): add ability for a dry-run to evaluate lookup functions
tapaskapadia 9a0025f
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia 25ac62e
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia f9e54b6
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia 4899e8a
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia 4b7248e
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia b7a2d47
feat(helm): add ability for --dry-run to do lookup functions
tapaskapadia File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking api change.
DryRun
needs to remain a bool. Perhaps add a new member,DryRunOption
. All the cli flags can work using the new member but the old member would still need to be honored if true as there are other applications out there that use this as a library.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what do you think of that ?
#8137 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. Let me rework it with another flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoot, not quite what I was trying to suggest. I was still suggesting to just have the one single
dryrun
flag for the cli. That flag would load its input into the newDryRunOption
string.The reason for the new string values is that if a downstream application is using the install action as a library, it's going to have an
Install
struct with aDryRun
boolean already. If we change the type ofDryRun
, those downstream applications will break.So my suggestion is that the new string element would be used for the dryrun flag. In places where DryRun is checked, call a function like:
you could simplify all the choices here and use/return a custom type instead of string, which might make the rest of the code easier:
The benefit to all this is that the user experience at the command line doesn't have to change, yet we maintain backward compatibility for all the projects that use helm as a go library.
disclaimer: These snippets are used as illustrations. Don't feel like I'm dictating anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you love it when you reply to something before you've scrolled all the way down?