Repository navigation
fix(k8s): exit non-zero when kube-linter is unavailable or reports findings - #2386
Merged
Merged
Conversation
…ndings `devops k8s lint` printed a success line and exited 0 when kube-linter was not on PATH, and it printed the findings and exited 0 when kube-linter flagged the manifest. A CI gate that keys on the exit code read both as a pass. The command now reads the ScanOutcome the scanner returns and branches on its status. When the status is not ran, it prints an error line that names the status and the reason, says the manifest was not audited, and exits 1 without a success line. When the status is ran with findings, it prints the findings and exits 1. A clean run still prints the pass line and exits 0. Fail-to-pass: uv run devops ci fail-to-pass --base origin/main Closes #2095
Archive the change for issue #2095. It moves the change to openspec/changes/archive and creates the k8s-lint spec with the exit-code gate requirements.
dan-petty
marked this pull request as ready for review
October 27, 2026 21:37
dan-petty
pushed a commit
that referenced
this pull request
Oct 27, 2026
🤖 I have created a release *beep* *boop* --- ## [0.8.0](v0.7.4...v0.8.0) (2026-10-27) ### Features * **github:** devops gh issues view shows one issue ([#2374](#2374)) ([63be7ed](63be7ed)), closes [#2361](#2361) * **repos:** make devops repos worktrees add remove merged worktrees first ([#2351](#2351)) ([6d3a18a](6d3a18a)), closes [#2338](#2338) ### Bug Fixes * **k8s:** devops k8s configure-urls saves a run that changes only the task gateway urls ([#2384](#2384)) ([1a7e7c7](1a7e7c7)) * **k8s:** exit non-zero when kube-linter is unavailable or reports findings ([#2386](#2386)) ([31c5a0b](31c5a0b)), closes [#2095](#2095) * **scan:** serialize status and reason in JSON and YAML scan output ([#2385](#2385)) ([d594b55](d594b55)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
devops k8s lintprinted a success line and exited 0 when Kube-linter was not on PATH, and it printed the findings and exited 0 when Kube-linter flagged the manifest. A CI gate that keys on the exit code read both as a pass.The command now reads the ScanOutcome the scanner returns and branches on its status. When the status is not ran, it prints an error line that names the status and the reason, says the manifest was not audited, and exits 1 without a success line. When the status is ran with findings, it prints the findings and exits 1. A clean run still prints the pass line and exits 0.
Closes #2095
Change:
openspec/changes/archive/2026-10-27-2095-k8s-lint-exit-code/