Add Annotations to command and flags per phase annotation.#2022
Add Annotations to command and flags per phase annotation.#2022balopat merged 12 commits intoGoogleContainerTools:masterfrom
Conversation
|
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
priyawadhwa
left a comment
There was a problem hiding this comment.
just one more question & a nit
|
@priyawadhwa Added comment to describe the same. |
balopat
left a comment
There was a problem hiding this comment.
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. |
balopat
left a comment
There was a problem hiding this comment.
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.
| 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.
| 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!)", |
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
tootshould be a common flag for build, delete, deploy and run without --tail.