-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add Annotations to command and flags per phase annotation. #2022
Conversation
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.
just a couple nits
TODO: |
8ccb48c
to
414b88a
Compare
Codecov Report
@@ Coverage Diff @@
## master #2022 +/- ##
=========================================
- Coverage 57.31% 57.3% -0.01%
=========================================
Files 186 187 +1
Lines 7871 7875 +4
=========================================
+ Hits 4511 4513 +2
- Misses 2948 2949 +1
- Partials 412 413 +1
Continue to review full report at Codecov.
|
d10f864
to
e704e4e
Compare
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.
just one more question & a nit
@priyawadhwa Added comment to describe the same. |
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.
Cool, LGTM
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.
in general this looks good - but the force flag with default false on dev now gets added - but it wasn't there before! that is a regression on #1484.
This is the second example of a flag that needs to be added with different default depending on the command:
tailFalse
for deploy, run
tailTrue
for dev
forceFalse
for deploy, run
forceTrue
for dev
Also I don't understand fully the tail situation yet, it is very hard to follow.
Great! i feel with "--force" being another example along with "--tail" where defaults are different per command, i should think of a way to specify default behavior based on command. |
c3d5a42
to
a2a99a0
Compare
@priyawadhwa and @balopat please take another look. |
Freeze for now until @balopat comes back. As per last discussion, he would want to see flagset per flag with annotation for which command they belong to versus right now its a group of flags. |
Please visit http://35.236.23.230:1313 to view changes to the docs. |
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 looking very good - only nits
cmd/skaffold/app/cmd/flags.go
Outdated
/// specify "all" | ||
// FlagAddMethod is method which defines a flag value with specified | ||
// name, default value, and usage string. e.g. `StringVar`, `BoolVar` | ||
var FlagResitry = []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.
var FlagResitry = []Flag{ | |
var FlagRegistry = []Flag{ |
cmd/skaffold/app/cmd/flags.go
Outdated
}, | ||
{ | ||
Name: "force", | ||
Usage: "Recreate kubernetes resources if necessary for deployment, warning: might cause downtime!)", |
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.
Usage: "Recreate kubernetes resources if necessary for deployment, warning: might cause downtime!)", | |
Usage: "Recreate kubernetes resources if necessary for deployment (default: false, warning: might cause downtime!)", |
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.
done
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.
Yay!
Inspired by @balopat feedback on #2018 , in this change Command have annotations with phases they run like "build", "test", "deploy".
Annotations Description:
With this new change, hopefully only relevant flags are added for commands.
Flags Removed or Added per Command
Some considerations:
Maybe
toot
should be a common flag for build, delete, deploy and run without --tail.