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

Make Deploy flags more relevant #2018

Closed

Conversation

tejal29
Copy link
Contributor

@tejal29 tejal29 commented Apr 24, 2019

When rewriting skaffold deploy i realized skaffold deploy has --tail option which is not required.
skaffold run uses --tail

Some of the skaffold deploy flags are not relevant like --insecure-registries, --no-prune.
Please let me know if this is incorrect.

Please see https://github.com/GoogleContainerTools/skaffold/compare/master...tejal29:make_sane_deploy_flags?expand=1#diff-2e110939e227b787655acb75b7eea64f to see the flag difference.

Flags removed:

Flag Reason
--cache-artifacts Relevant to Build
--cache-file Same as above
--insecure-registry Relevant to Build, deploy does not pull or push.
--no-prune deploy does not invoke delete flow. Relevant to dev, run
--skip-tests deploy does not run tests
--tail I think this is more relevant to run and dev. Deploy should only deploy and return

@tejal29 tejal29 removed the request for review from dgageot April 24, 2019 23:22
@tejal29
Copy link
Contributor Author

tejal29 commented Apr 24, 2019

Let me know if --tail is something we want to keep for deploy.

@codecov-io
Copy link

codecov-io commented Apr 24, 2019

Codecov Report

Merging #2018 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2018      +/-   ##
==========================================
+ Coverage   55.72%   55.77%   +0.05%     
==========================================
  Files         173      173              
  Lines        7503     7512       +9     
==========================================
+ Hits         4181     4190       +9     
  Misses       2931     2931              
  Partials      391      391
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/cmd.go 77.14% <100%> (+2.14%) ⬆️
cmd/skaffold/app/cmd/deploy.go 75% <100%> (ø) ⬆️
cmd/skaffold/app/cmd/run.go 36% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b329b5...cdcc8f6. Read the comment docs.

@balopat
Copy link
Contributor

balopat commented Apr 24, 2019

I think --tail still makes sense for skaffold deploy the rest LGTM that you removed.

Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

Good cleanup :D except for --tail it LGTM!

cmd.Flags().BoolVar(&opts.Force, "force", false, "Recreate kubernetes resources if necessary for deployment (default: false, warning: might cause downtime!)")
cmd.Flags().StringArrayVarP(&opts.CustomLabels, "label", "l", nil, "Add custom labels to deployed objects. Set multiple times for multiple labels.")
}

func AddRunDeployOnlyFlags(cmd *cobra.Command) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm starting to get really lost in this naming scheme. What does it mean that RunDeployOnly and how does it differ from RunDeployCommon? I'm starting to think that we should just add commands=[]string{"run", "dev", "deploy"} annotation to the flags somehow...:)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. its a good idea to add scope annotation to flags. Its kind of confusing right now. Especially when they call each other.

@dgageot dgageot self-requested a review April 25, 2019 05:49
@tejal29 tejal29 closed this Apr 25, 2019
@tejal29 tejal29 deleted the make_sane_deploy_flags branch September 18, 2019 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants