Skip to content

feat(scan): skip failed builds with --dynamic-sbom-inference - #1820

Draft
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
jfblaa/dsi-build-timeoutfrom
jfblaa/dsi-skip-failed-builds
Draft

Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
jfblaa/dsi-build-timeoutfrom
jfblaa/dsi-skip-failed-builds

Conversation

@jfblaa

@jfblaa Jeppe Fredsgaard Blaabjerg (jfblaa) commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Adds --dynamic-sbom-inference-skip-failed-builds (--skip-failed-builds on socket manifest dynamic-sbom-inference), so one failing build no longer aborts --dynamic-sbom-inference for a whole repository. A build root that fails is left out with a warning, along with the build roots it holds back, and every other root still produces Socket facts. What is left out is scanned from its manifest files as without --dynamic-sbom-inference, and reachability analysis leaves it out.

Draft until Coana 15.15.10 is released and pinned: Coana reports which projects a failed build's tool read (coana-tech/coana-package-manager#2923), which needs a spar release that writes those records first.

What a failed build holds back
  • The modules its build tool read of it, as Coana reports them. No build files are parsed in socket-cli.
  • Everything in or under a project whose modules its tool could not read, and the whole directory when the failure says nothing of what was read (an older Coana, or a Coana or CLI failure).
  • Builds of their own beneath it (Gradle builds with their own settings, sbt builds with their own project directory) still run.
  • Without the flag, a failure aborts as before, and the error now names the flag.
Behaviour
  • Any failure is skipped under the flag, including one Coana or the CLI is blamed for; the warning lists what was left out.
  • The flag requires Coana 15.15.10 and fails clearly on an older --reach-version.
  • socket manifest dynamic-sbom-inference exits successfully when every failure was skipped; its JSON outcomes carry reason and skipped, and text output marks the root (left out).
  • Command line only, not a socket.json setting.
Tests
  • generate-recursive-manifests.test.mts: what a failed reactor holds back for known, unknown and unreported modules and for a Coana failure, with and without the flag; a build of its own beneath a failure that reports nothing.
  • run-manifest-facts.test.mts: Coana's failure blame and projects, and the minimum Coana version.
  • run-dynamic-sbom-inference.test.mts, handle-manifest-dynamic-sbom-inference.test.mts: skipped failures warn and succeed; unskipped ones fail and name the flag.
  • Help snapshots, inline and native.

One failing build aborted --dynamic-sbom-inference for the whole
repository. With --dynamic-sbom-inference-skip-failed-builds on scan
create, scan reach and fix, or --skip-failed-builds on the manifest
command, a build root that fails is left out with a warning, along with
the build roots it holds back, and the other roots still produce Socket
facts. What is left out is scanned from its manifest files as without
--dynamic-sbom-inference.

Telling what a failed build holds back needs Coana to report the projects
its build tool read, so the option requires the first Coana that does.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant