Skip to content

test: isolate CLI-1765 Go fix from the snyk-docker-plugin bump - #7131

Closed
bdemeo12 wants to merge 3 commits into
mainfrom
CLI-1765/isolate-go-fix
Closed

test: isolate CLI-1765 Go fix from the snyk-docker-plugin bump#7131
bdemeo12 wants to merge 3 commits into
mainfrom
CLI-1765/isolate-go-fix

Conversation

@bdemeo12

Copy link
Copy Markdown
Contributor

Throwaway branch to isolate a variable — not for review.

Identical Go change to #7130, but snyk-docker-plugin stays at 9.16.0.

#7130 failed acceptance tests on all 8 platforms (auth errors printing nothing). That PR changes two things at once: the error-handling fix and the 9.16.0 → 9.20.0 bump. This separates them.

  • Acceptance tests pass here → the 9.20.0 bump caused the failures, not the Go change
  • Acceptance tests fail here → the Go change is at fault and needs rework

Will be closed once it has answered the question.

bdemeo12 and others added 3 commits August 13, 2026 14:11
…-1765]

`processError` combines the command exit error with collected network errors
via `errors.Join`, both in `FindMostRelevantError` and `createErrorWithExitCode`.
A joined error does not satisfy the direct type assertions in `displayError`,
so handled auxiliary errors were printed after valid command output - emitting
a second JSON object and breaking `JSON.parse(stdout)`.

Decide displayability at the top of `processError`, while the concrete error
type is still intact, and pass that decision through to teardown. The combined
error is still used for exit-code derivation and analytics, so both are
unchanged.

Also pins snyk-docker-plugin to 9.20.0 so CI exercises the failure this fixes:
9.20.0 performs a best-effort provenance fetch whose handled failure is what
triggered the duplicate output (see CLIA-1576).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
FindMostRelevantError returns promoted errors (e.g. maintenance windows)
uncombined, so judge those on their own merits rather than on the original
error. Without this, a maintenance notice was suppressed whenever the command
also exited non-zero.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Same Go change as CLI-1765/prevent-duplicate-error-output, but with
snyk-docker-plugin back at 9.16.0. If the acceptance tests pass here, the
9.20.0 bump caused the failures, not the error-handling change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@snyk-io

snyk-io Bot commented Aug 13, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️ There are multiple commits on your branch, please squash them locally before merging!
⚠️

"[fix(cli): prevent handled errors from producing duplicate output CLI-1765](https://api.github.com/repos/snyk/cli/git/commits/ba58193a573fa9df9c368990c7c8ab0b48790f8f)" is too long. Keep the first line of your commit message under 72 characters.

Generated by 🚫 dangerJS against c864e79

@bdemeo12

Copy link
Copy Markdown
Contributor Author

Answered its question: the failures came from the Go change, not the dependency bump. Superseded by the reworked fix in #7130.

@bdemeo12 bdemeo12 closed this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant