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

fix(k8s): warn instead of erroring when remote image status check fails #1743

Merged
merged 2 commits into from
Mar 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions garden-service/src/plugins/kubernetes/container/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ const buildStatusHandlers: { [mode in ContainerBuildMode]: BuildStatusHandler }

// Non-zero exit code can both mean the manifest is not found, and any other unexpected error
if (res.code !== 0 && !res.output.includes("no such manifest")) {
throw new RuntimeError(`Unable to query registry for image status: ${res.output}`, {
command: "docker " + args.join(" "),
output: res.output,
})
const detail = res.output || `docker manifest inspect exited with code ${res.code}`
log.warn(chalk.yellow(`Unable to query registry for image status: ${detail}`))
}

return { ready: res.code === 0 }
Expand Down Expand Up @@ -117,11 +115,8 @@ const buildStatusHandlers: { [mode in ContainerBuildMode]: BuildStatusHandler }

// Non-zero exit code can both mean the manifest is not found, and any other unexpected error
if (res.exitCode !== 0 && !res.stderr.includes("no such manifest")) {
throw new RuntimeError(`Unable to query registry for image status: ${res.all || res.stderr}`, {
command: res.command,
stdout: res.stdout,
stderr: res.stderr,
})
const detail = res.all || `docker manifest inspect exited with code ${res.exitCode}`
log.warn(chalk.yellow(`Unable to query registry for image status: ${detail}`))
}

return { ready: res.exitCode === 0 }
Expand Down