fix(sbom): add help link hint to aggregated PURL resolve error - #233
Merged
Conversation
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
marked this pull request as ready for review
August 7, 2026 08:57
nervgh
approved these changes
Aug 7, 2026
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.
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
buildAggregatedPurlErrorappendsSee <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 fromWERF_EXTERNAL_REFS_SERVER_URLwith a trailing slash trimmed, and the hint is omitted when the variable is unset.DescribeTablecovering 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.task test:unitis green except a pre-existing macOS-only failure inpkg/werf/exec/detach_test.go(ps -o cmdkeyword is Linux-only), unrelated to this change.