docs-v1/design_proposals/user_survey_hooks.md
Currently, we get feedback on Skaffold via Skaffold HaTS survey. However, in this survey we cannot prompt users for feedback on existing features or new proposed features. It is difficult for us to solicit feedback on existing features and the impact of proposed changes. For example, with render v2, we are changing how deploy works. This may affect our existing helm deployer users. See #6166
This document proposes to extend the existing HaTS survey framework to incorporate a set of user surveys.
In order to make sure only relevant surveys are shown to user, we have added a survey config.
type config struct {
id string
// promptText is shown to the user and should be formatted so each line should fit in < 80 characters.
// For example: `As a Helm user, we are requesting your feedback on a proposed change to Skaffold's integration with Helm.`
promptText string
// startsAt mentions the date after the users survey should be prompted. This will ensure, skaffold team can finalize the survey
// even after release date.
startsAt time.Time
// expiresAt places a time limit of the user survey. As users are only prompted every two weeks
// by design, this time limit should be at least 4 weeks after the upcoming release date to account
// for release propagation lag to Cloud SDK and Cloud Shell.
expiresAt time.Time
isRelevantFn func([]util.VersionedConfig) bool
URL string
}
The survey config has two key fields
{
id: helmID,
expiresAt: time.Date(2021, time.August, 14, 00, 00, 00, 0, time.UTC),
isRelevantFn: func(cfgs []util.VersionedConfig, command string) bool {
for _, cfg := range cfgs {
if v1Cfg, ok := cfg.(*latestV1.SkaffoldConfig) ; ok {
if h := v1Cfg.Deploy.HelmDeploy; h != nil {
return true
}
}
}
return false
},
URL: helmURL,
},
For multi-module users, we could use something like the following:
isRelevantFn: func(cfgs []util.VersionedConfig, _ string) bool {
return len(cfgs) > 1
},
When prompting users with surveys, we need to keep in mind 2 important rules
For non HaTS surveys or user surveys, we will follow the same rules,
The user survey information will be tracked in the existing Survey config in the skaffold global config
// SurveyConfig is the survey config information
type SurveyConfig struct {
DisablePrompt *bool `yaml:"disable-prompt,omitempty"`
LastTaken string `yaml:"last-taken,omitempty"`
LastPrompted string `yaml:"last-prompted,omitempty"`
+ UserSurveys []*UseSurvey `yaml:"user-surveys,omitempty"`
}
type UserSurvey struct {
ID string `yaml:"id"`
Taken *bool `yaml:"taken,omitempty"`
}
The current ShouldDisplaySurveyPrompt returns true only if
SurveyConfig.LastTaken) andSurveyConfig.LastPrompted in last 2 weeks.This behavior will be changed to ShouldDisplaySurveyPrompt returns true if
SurveyConfig.LastPrompted in last 2 weeks andIf both active relevant user survey is available or HaTS survey was not taken, then Skaffold will give preference to user survey over hats survey. Since, HaTS survey never expire,
Other methods to get feedback is manually via pinging slack users to fill in a survey. However, this requires a core member to manually remind users from time to time to fill in a survey. Another disadvantage is users could form a biased opinion due to the questions asked in the user survey and rate low on the NPS score.
-id flag to survey command with default as hatsUserSurvey struct to skaffold global config