{"record":{"id":"b851856a8327550c","repo":"GoogleContainerTools/skaffold","slug":"could-not-automatically-update-the-survey-timestam","errorCode":null,"errorMessage":"could not automatically update the survey timestamp - please run `%s`","messagePattern":"could not automatically update the survey timestamp - please run `(.+?)`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/skaffold/config/util.go","lineNumber":458,"sourceCode":"\tif !IsUpdateCheckEnabledForContext(fullConfig.Global) {\n\t\treturn nil\n\t}\n\tif fullConfig.Global == nil {\n\t\tfullConfig.Global = &ContextConfig{}\n\t}\n\tif fullConfig.Global.UpdateCheckConfig == nil {\n\t\tfullConfig.Global.UpdateCheckConfig = &UpdateConfig{}\n\t}\n\tfullConfig.Global.UpdateCheckConfig.LastPrompted = today\n\terr = WriteFullConfig(configFile, fullConfig)\n\treturn err\n}\n\nfunc UpdateHaTSSurveyTaken(configFile string) error {\n\t// Today's date\n\ttoday := current().Format(time.RFC3339)\n\tai := fmt.Sprintf(updateLastTaken, today)\n\taiErr := fmt.Errorf(\"could not automatically update the survey timestamp - please run `%s`\", ai)\n\n\tconfigFile, err := ResolveConfigFile(configFile)\n\tif err != nil {\n\t\treturn aiErr\n\t}\n\tfullConfig, err := ReadConfigFile(configFile)\n\tif err != nil {\n\t\treturn aiErr\n\t}\n\tif fullConfig.Global == nil {\n\t\tfullConfig.Global = &ContextConfig{}\n\t}\n\tif fullConfig.Global.Survey == nil {\n\t\tfullConfig.Global.Survey = &SurveyConfig{}\n\t}\n\tfullConfig.Global.Survey.LastTaken = today\n\terr = WriteFullConfig(configFile, fullConfig)\n\tif err != nil {","sourceCodeStart":440,"sourceCodeEnd":476,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/config/util.go#L440-L476","documentation":"UpdateHaTSSurveyTaken records today's date as the HaTS-survey last-taken timestamp in the global config. It pre-builds this advisory error (including the exact manual command to run) and returns it when any step — resolving, reading, updating, or writing the config — fails, so the survey timestamp is not silently lost.","triggerScenarios":"Calling UpdateHaTSSurveyTaken when ResolveConfigFile, ReadConfigFile, or the underlying config write fails: HOME unset, config file missing/unreadable, invalid YAML, or a disk write error.","commonSituations":"Running skaffold in CI/containers without HOME or a writable home; corrupt ~/.skaffold/config.yaml; permission problems after running once with sudo.","solutions":["Run the command printed in the error message to set the timestamp manually","Fix the underlying cause: set HOME or correct config file permissions/YAML validity","Ignore safely — this only affects survey-prompt scheduling, not builds or deploys"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if os.Getenv(\"HOME\") == \"\" {\n  log.Warn(\"HOME unset; survey timestamp update will fail\")\n}\nif _, err := os.Stat(configOrEmpty(configFile)); err != nil && !os.IsNotExist(err) {\n  log.Warn(\"config file not accessible: \", err)\n}","typeGuard":null,"tryCatchPattern":"if err := config.UpdateHaTSSurveyTaken(configFile); err != nil {\n  log.Entry(ctx).Warnf(\"non-fatal: %v\", err) // safe to continue\n}","preventionTips":["Treat survey-update failures as non-fatal and log-and-continue","Ensure HOME is writable before interactive skaffold runs","Keep ~/.skaffold/config.yaml valid YAML so updates succeed"],"tags":["survey","config-write","non-fatal"],"backgroundTag":"config-write-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}