Conversation
Syft v1.44.0 does not publish a Linux armhf binary. Keep strict validation for the remaining SBOM inputs while using recipe, observation, and lockfile data on armhf. Remove all installer targets when SBOM generation fails so retries cannot succeed from stale artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the SONiC build SBOM pipeline to avoid failing ARMHF installer builds when ENABLE_SBOM=y and SBOM_SCAN_TOOL=syft, since Syft does not provide a Linux ARMHF binary. It introduces an “effective scanner” selection that resolves to none for ARMHF+Syft while keeping other SBOM inputs and strict validation active, and it hardens retry behavior by removing stale installer artifacts on SBOM failure.
Changes:
- Add
SBOM_EFFECTIVE_SCAN_TOOLand use it to automatically mapsyft -> noneforCONFIGURED_ARCH=armhf. - On SBOM generation failure, delete the primary installer target and the currently-built variant artifact to prevent retries from succeeding with stale outputs.
- Document the ARMHF scanner limitation and refresh the reviewed
slave.mkcache baseline hash.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
slave.mk |
Logs the effective scanner, uses it for SBOM generation, and removes installer artifacts on SBOM failure to avoid stale retry success. |
rules/config |
Defines SBOM_EFFECTIVE_SCAN_TOOL to auto-disable Syft scanning for ARMHF while preserving the configured SBOM_SCAN_TOOL elsewhere. |
README.sbom.md |
Documents none as a valid scanner option and explains the ARMHF Syft limitation and resulting behavior. |
Makefile.cache |
Updates the slave.mk review baseline hash used by the cache guard. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Why I did it
ARMHF installer builds with
ENABLE_SBOM=yfail in strict mode because Syft v1.44.0 does not publish a Linux ARMHF binary. The retry can then incorrectly succeed from the installer artifact left behind by the failed SBOM step.This follows up on the SBOM support introduced in #27455.
Work item tracking
How I did it
noneas the effective scanner whenSBOM_SCAN_TOOL=syftandCONFIGURED_ARCH=armhf.slave.mkcache baseline.How to verify it
PLATFORM=marvell-prestera PLATFORM_ARCH=armhf.ENABLE_SBOM=y target/sonic-marvell-prestera-armhf.bin.Static verification completed:
none.syft.ARMHF installer validation will be performed by CI.
Which release branch to backport (provide reason below if selected)
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type: other
Tested branch
Test result
Static Make expansion checks passed. ARMHF installer build is delegated to CI.
Description for the changelog
Allow strict SBOM generation for ARMHF installers without an unavailable Syft binary.
Link to config_db schema for YANG module changes
N/A
A picture of a cute animal (not mandatory but encouraged)