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 survey config and framework to show feature surveys to skaffold users. #6185

Merged
merged 5 commits into from
Jul 12, 2021

Conversation

tejal29
Copy link
Member

@tejal29 tejal29 commented Jul 11, 2021

relates to #6166
Should merge after : #6186

In this PR, implement first 2 tasks mentioned in the design proposal.

  1. Add survey.config struct to represent a survey
  2. -id flag to skaffold survey command

==== Testing notes =====

➜  skaffold2 git:(add_surver_config) ✗ out/skaffold survey
Thank you for offering your feedback on Skaffold! Understanding your experiences and opinions helps us make Skaffold better for you and other users.

Skaffold will now attempt to open the survey in your default web browser. You may also manually open it using this URL:

https://forms.gle/BMTbGQXLWSdn7vEs6

Tip: To permanently disable the survey prompt, run:
   skaffold config set --survey --global disable-prompt true

➜  skaffold2 git:(add_surver_config) ✗ out/skaffold survey --id hats
Thank you for offering your feedback on Skaffold! Understanding your experiences and opinions helps us make Skaffold better for you and other users.

Skaffold will now attempt to open the survey in your default web browser. You may also manually open it using this URL:

https://forms.gle/BMTbGQXLWSdn7vEs6

Tip: To permanently disable the survey prompt, run:
   skaffold config set --survey --global disable-prompt true
➜  skaffold2 git:(add_surver_config) ✗ out/skaffold survey --id hats1
invalid survey id "hats1" - please enter one of [hats]
➜  skaffold2 git:(add_surver_config) ✗

@codecov
Copy link

codecov bot commented Jul 11, 2021

Codecov Report

Merging #6185 (1b1471f) into master (62a01f6) will decrease coverage by 0.03%.
The diff coverage is 54.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6185      +/-   ##
==========================================
- Coverage   71.12%   71.08%   -0.04%     
==========================================
  Files         483      484       +1     
  Lines       21549    21589      +40     
==========================================
+ Hits        15326    15346      +20     
- Misses       5246     5262      +16     
- Partials      977      981       +4     
Impacted Files Coverage Δ
pkg/skaffold/survey/survey.go 38.88% <11.11%> (-7.78%) ⬇️
cmd/skaffold/app/cmd/survey.go 70.00% <60.00%> (+12.85%) ⬆️
pkg/skaffold/survey/config.go 64.70% <64.70%> (ø)
pkg/skaffold/util/tar.go 52.87% <0.00%> (-4.60%) ⬇️
pkg/skaffold/docker/image.go 80.08% <0.00%> (-1.22%) ⬇️
pkg/skaffold/docker/parse.go 88.23% <0.00%> (+0.84%) ⬆️

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 62a01f6...1b1471f. Read the comment docs.

cmd/skaffold/app/cmd/flags.go Outdated Show resolved Hide resolved
Comment on lines 576 to 583
{
Name: "id",
Usage: "Survey id for survey command to open.",
Value: &surveyID,
DefValue: constants.HaTS,
FlagAddMethod: "StringVar",
DefinedOn: []string{"survey"},
},
Copy link
Member

Choose a reason for hiding this comment

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

Given that this argument isn't used on other commands, we can just move this into NewCmdSurvey().

Copy link
Member Author

Choose a reason for hiding this comment

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

done

pkg/skaffold/constants/constants.go Show resolved Hide resolved
pkg/skaffold/survey/config.go Outdated Show resolved Hide resolved
pkg/skaffold/survey/config.go Show resolved Hide resolved
pkg/skaffold/survey/config_test.go Show resolved Hide resolved
pkg/skaffold/survey/config.go Outdated Show resolved Hide resolved
pkg/skaffold/survey/config_test.go Show resolved Hide resolved
pkg/skaffold/survey/config_test.go Outdated Show resolved Hide resolved
pkg/skaffold/survey/survey.go Show resolved Hide resolved
@tejal29 tejal29 enabled auto-merge (squash) July 12, 2021 20:05
@tejal29 tejal29 merged commit edac263 into GoogleContainerTools:master Jul 12, 2021
@tejal29 tejal29 mentioned this pull request Jul 13, 2021
@tejal29 tejal29 deleted the add_surver_config branch July 21, 2021 17:39
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