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

add set command for survey ids #6197

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

tejal29
Copy link
Member

@tejal29 tejal29 commented Jul 13, 2021

This PR last task in in #6166

Please review #6196 before.

In this PR, add support to manually set the taken field in UserSurvey if skaffold fails to update the global config.
See #6186 on what the UserSurvey config is

Users can now run

skaffold config set --global --survey --id helm taken true

@tejal29 tejal29 requested a review from a team as a code owner July 13, 2021 09:05
@tejal29 tejal29 requested a review from gsquared94 July 13, 2021 09:05
@google-cla google-cla bot added the cla: yes label Jul 13, 2021
@tejal29 tejal29 added this to the v1.28.0 milestone Jul 13, 2021
@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #6197 (d7f28c9) into master (db90d38) will increase coverage by 0.24%.
The diff coverage is 87.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6197      +/-   ##
==========================================
+ Coverage   71.08%   71.32%   +0.24%     
==========================================
  Files         485      479       -6     
  Lines       21603    21680      +77     
==========================================
+ Hits        15356    15463     +107     
+ Misses       5264     5232      -32     
- Partials      983      985       +2     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/config/set.go 88.72% <87.30%> (+0.08%) ⬆️
cmd/skaffold/app/cmd/config/flags.go 100.00% <100.00%> (ø)
pkg/skaffold/log/log.go 83.33% <0.00%> (-16.67%) ⬇️
pkg/skaffold/deploy/deploy_mux.go 45.45% <0.00%> (-3.30%) ⬇️
...affold/kubernetes/portforward/forwarder_manager.go 49.29% <0.00%> (-2.43%) ⬇️
pkg/skaffold/runner/v1/new.go 63.24% <0.00%> (-2.08%) ⬇️
pkg/skaffold/util/env_template.go 94.36% <0.00%> (-2.07%) ⬇️
cmd/skaffold/app/cmd/cmd.go 73.51% <0.00%> (-0.40%) ⬇️
pkg/skaffold/runner/v1/deploy.go 76.47% <0.00%> (-0.35%) ⬇️
pkg/skaffold/runner/deployer.go 62.36% <0.00%> (ø)
... and 26 more

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 db90d38...d7f28c9. Read the comment docs.

Copy link
Collaborator

@gsquared94 gsquared94 left a comment

Choose a reason for hiding this comment

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

lgtm.

~/Code/Work/fork/skaffold pr/tejal29/6197
❯ skaffold config set --global --survey --id helm taken true

set global value taken to true

~/Code/Work/fork/skaffold pr/tejal29/6197
❯ cat ~/.skaffold/config                                    
global:
  survey:
    last-taken: "2020-05-05T16:04:30-07:00"
    last-prompted: "2021-07-13T21:41:27+05:30"
    user-surveys:
    - id: helm
      taken: true
  collect-metrics: true
  update:
    last-prompted: "2021-07-13T21:41:27+05:30"
kubeContexts:
- {}

~/Code/Work/fork/skaffold pr/tejal29/6197
❯ skaffold config set --global --survey --id helm taken false

set global value taken to false

~/Code/Work/fork/skaffold pr/tejal29/6197
❯ cat ~/.skaffold/config                                     
global:
  survey:
    last-taken: "2020-05-05T16:04:30-07:00"
    last-prompted: "2021-07-13T21:41:27+05:30"
    user-surveys:
    - id: helm
      taken: false
  collect-metrics: true
  update:
    last-prompted: "2021-07-13T21:41:27+05:30"
kubeContexts:
- {}

@gsquared94 gsquared94 merged commit eee8a21 into GoogleContainerTools:master Jul 14, 2021
@tejal29 tejal29 deleted the fix_set_cmd branch July 21, 2021 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants