Skip to content

fix(sbom): add help link hint to aggregated PURL resolve error - #233

Merged
nervgh merged 2 commits into
mainfrom
fix/sbom/purl-errors-help-link
Aug 7, 2026
Merged

fix(sbom): add help link hint to aggregated PURL resolve error#233
nervgh merged 2 commits into
mainfrom
fix/sbom/purl-errors-help-link

Conversation

@reyreavman

Copy link
Copy Markdown
Collaborator

Summary

When SBOM external references enrichment finishes with at least one purl-resolver error, the aggregated build error now ends with a hint pointing the user to the resolver's help page ($WERF_EXTERNAL_REFS_SERVER_URL/help). Previously the error listed raw per-component failures with no guidance on how to act on them.

Key changes

  • buildAggregatedPurlError appends See <server-url>/help for details on resolving these errors. to the aggregated error when there is at least one failed image; the URL is taken from WERF_EXTERNAL_REFS_SERVER_URL with a trailing slash trimmed, and the hint is omitted when the variable is unset.
  • Added a DescribeTable covering the hint: present with the env var set, trailing slash trimmed, absent without the env var.

Why

Purl-resolver failures are usually caused by service-side issues (unknown purl types, missing packages) that the user cannot diagnose from component error lines alone. Pointing them to the service's help page makes the failure actionable.

Verification

  • task test:unit paths="./pkg/build" — new specs pass.
  • Mutation check: removing the hint-appending line makes both positive specs fail for the right reason; restored afterwards.
  • Full task test:unit is green except a pre-existing macOS-only failure in pkg/werf/exec/detach_test.go (ps -o cmd keyword is Linux-only), unrelated to this change.

When at least one purl-resolver error occurs during SBOM external
references enrichment, append a hint pointing the user to
$WERF_EXTERNAL_REFS_SERVER_URL/help, so failures are actionable
instead of ending with raw per-component errors only.

Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
Print the help hint as a highlighted logboek warning block instead of
embedding it into the aggregated error text, so users clearly see where
to go for help when purl-resolver errors occur.

Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
@reyreavman
reyreavman marked this pull request as ready for review August 7, 2026 08:57
@nervgh
nervgh merged commit 5dff183 into main Aug 7, 2026
24 of 27 checks passed
@nervgh
nervgh deleted the fix/sbom/purl-errors-help-link branch August 7, 2026 13:24
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.

2 participants