GoogleContainerTools/skaffold · warning

could not automatically update the survey timestamp - please

Error message

could not automatically update the survey timestamp - please run `%s`

What it means

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.

Source

Thrown at pkg/skaffold/config/util.go:458

	if !IsUpdateCheckEnabledForContext(fullConfig.Global) {
		return nil
	}
	if fullConfig.Global == nil {
		fullConfig.Global = &ContextConfig{}
	}
	if fullConfig.Global.UpdateCheckConfig == nil {
		fullConfig.Global.UpdateCheckConfig = &UpdateConfig{}
	}
	fullConfig.Global.UpdateCheckConfig.LastPrompted = today
	err = WriteFullConfig(configFile, fullConfig)
	return err
}

func UpdateHaTSSurveyTaken(configFile string) error {
	// Today's date
	today := current().Format(time.RFC3339)
	ai := fmt.Sprintf(updateLastTaken, today)
	aiErr := fmt.Errorf("could not automatically update the survey timestamp - please run `%s`", ai)

	configFile, err := ResolveConfigFile(configFile)
	if err != nil {
		return aiErr
	}
	fullConfig, err := ReadConfigFile(configFile)
	if err != nil {
		return aiErr
	}
	if fullConfig.Global == nil {
		fullConfig.Global = &ContextConfig{}
	}
	if fullConfig.Global.Survey == nil {
		fullConfig.Global.Survey = &SurveyConfig{}
	}
	fullConfig.Global.Survey.LastTaken = today
	err = WriteFullConfig(configFile, fullConfig)
	if err != nil {

View on GitHub (pinned to a1189de023)

Solutions

  1. Run the command printed in the error message to set the timestamp manually
  2. Fix the underlying cause: set HOME or correct config file permissions/YAML validity
  3. Ignore safely — this only affects survey-prompt scheduling, not builds or deploys
Defensive patterns

Strategy: try-catch

Validate before calling

if os.Getenv("HOME") == "" {
  log.Warn("HOME unset; survey timestamp update will fail")
}
if _, err := os.Stat(configOrEmpty(configFile)); err != nil && !os.IsNotExist(err) {
  log.Warn("config file not accessible: ", err)
}

Try / catch

if err := config.UpdateHaTSSurveyTaken(configFile); err != nil {
  log.Entry(ctx).Warnf("non-fatal: %v", err) // safe to continue
}

Prevention

When it happens

Trigger: Calling UpdateHaTSSurveyTaken when ResolveConfigFile, ReadConfigFile, or the underlying config write fails: HOME unset, config file missing/unreadable, invalid YAML, or a disk write error.

Common situations: Running skaffold in CI/containers without HOME or a writable home; corrupt ~/.skaffold/config.yaml; permission problems after running once with sudo.

Related errors


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/b851856a8327550c. Report an issue: GitHub.