{"record":{"id":"e5d7da226b716c5e","repo":"GoogleContainerTools/skaffold","slug":"getting-latest-and-current-skaffold-versions-w","errorCode":null,"errorMessage":"getting latest and current skaffold versions: %w","messagePattern":"getting latest and current skaffold versions: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/skaffold/update/update.go","lineNumber":60,"sourceCode":"\n// CheckVersion returns an update message when update check is enabled and skaffold binary in not latest\nfunc CheckVersion(config string) (string, error) {\n\treturn checkVersion(config, false)\n}\n\n// CheckVersionOnError returns an error message when update check is enabled and skaffold binary in not latest\nfunc CheckVersionOnError(config string) (string, error) {\n\treturn checkVersion(config, true)\n}\n\nfunc checkVersion(configfile string, onError bool) (string, error) {\n\tif !isUpdateCheckEnabled(configfile) {\n\t\tlog.Entry(context.TODO()).Debug(\"Update check not enabled, skipping.\")\n\t\treturn \"\", nil\n\t}\n\tlatest, current, err := GetLatestAndCurrentVersion()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"getting latest and current skaffold versions: %w\", err)\n\t}\n\tif latest.GT(current) && config.ShouldDisplayUpdateMsg(configfile) {\n\t\tif onError {\n\t\t\treturn fmt.Sprintf(\"Your Skaffold version might be too old. Download the latest version (%s) from:\\n  %s\\n\", latest, releaseURL(latest)), nil\n\t\t}\n\t\treturn fmt.Sprintf(\"There is a new version (%s) of Skaffold available. Download it from:\\n  %s\\n\", latest, releaseURL(latest)), nil\n\t}\n\treturn \"\", nil\n}\n\n// isUpdateCheckEnabled returns whether or not the update check is enabled\n// It is true by default, but setting it to any other value than true will disable the check\nfunc isUpdateCheckEnabled(configfile string) bool {\n\treturn EnableCheck && isConfigUpdateCheckEnabled(configfile)\n}\n\n// getLatestAndCurrentVersion uses a VERSION file stored on GCS to determine the latest released version\n// and returns it with the current version of Skaffold","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/update/update.go#L42-L78","documentation":"checkVersion performs the update check by calling GetLatestAndCurrentVersion, which fetches the latest released skaffold version (network call) and compares it to the running binary. Any failure in that lookup — version file unreadable, HTTP request failed, response unparseable — is wrapped in this error and propagated to CheckVersion/CheckVersionOnError.","triggerScenarios":"Calling CheckVersion or CheckVersionOnError when GetLatestAndCurrentVersion fails: no network access to the releases endpoint, proxy blocking the request, GitHub API rate limit, or local version metadata unreadable.","commonSituations":"CI runners without internet egress; corporate proxies/firewalls blocking the update-check URL; GitHub rate limiting shared CI IPs; offline air-gapped environments with update checks still enabled.","solutions":["Disable the update check (updateCheck: false in skaffold config or SKAFFOLD_UPDATE_CHECK=false env var) for offline/CI environments","Fix network egress/proxy settings so the releases endpoint is reachable","Retry later if the failure is transient rate limiting","Verify the local skaffold binary/version metadata is intact"],"exampleFix":"// before\n// CI with no egress, update check on by default → error on every run\n\n// after\nexport SKAFFOLD_UPDATE_CHECK=false\nskaffold dev","handlingStrategy":"fallback","validationCode":"if os.Getenv(\"SKAFFOLD_UPDATE_CHECK\") == \"false\" || offlineMode() {\n    return // skip CheckVersion entirely\n}\nif _, err := net.DialTimeout(\"tcp\", \"api.github.com:443\", 2*time.Second); err != nil {\n    return // no egress, skip update check\n}","typeGuard":null,"tryCatchPattern":"if msg, err := update.CheckVersion(cfg, false); err != nil {\n    log.Debugf(\"update check skipped: %v\", err) // never fail the run for update checks\n} else if msg != \"\" {\n    log.Infof(\"%s\", msg)\n}","preventionTips":["Set SKAFFOLD_UPDATE_CHECK=false or updateCheck: false in CI/air-gapped environments","Route update-check traffic through a working proxy","Treat update-check failures as non-fatal and log at debug level"],"tags":["skaffold","network","update-check"],"backgroundTag":"version-check-request-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"}