Skip to content

feat(scan): add a build timeout to --dynamic-sbom-inference - #1819

Draft
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
jfblaa/dsi-settings-flagsfrom
jfblaa/dsi-build-timeout
Draft

Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
jfblaa/dsi-settings-flagsfrom
jfblaa/dsi-build-timeout

Conversation

@jfblaa

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

Copy link
Copy Markdown
Contributor

Bounds the build tool runs of each --dynamic-sbom-inference build root by a timeout, so a hung build fails with a message instead of stalling the scan. It defaults to 3600 seconds; --dynamic-sbom-inference-build-timeout on socket scan create, socket scan reach and socket fix, and --build-timeout on socket manifest dynamic-sbom-inference, set it in seconds (e.g. 1800) or turn it off with 0.

Draft until Coana 15.15.10 is released and pinned: Coana applies the timeout (coana-tech/coana-package-manager#2922), and its request schema rejects the new field before that version.

Behaviour
  • The timeout covers all of a root's build tool runs together; socket-cli counts each Coana run against it and passes the time already spent.
  • The default goes only to a Coana that applies it, so an older --reach-version keeps working without a timeout. A timeout given on the command line requires Coana 15.15.10 and fails clearly on an older one.
  • The flag takes what --reach-analysis-timeout takes: a whole number of seconds, optionally with s, m or h.
  • Command line only, not a socket.json setting.
Tests
  • reachability-flags.test.mts: parsing, defaults, 0, invalid values, and the requires---dynamic-sbom-inference error.
  • run-manifest-facts.test.mts: the request carries the timeout and time spent only on a Coana that takes them; the minimum Coana version for a user-set timeout.
  • Help snapshots, inline and native.

A hung build tool could stall --dynamic-sbom-inference indefinitely. Each
build root now has a timeout covering all of its build tool runs together:
--dynamic-sbom-inference-build-timeout on scan create, scan reach and fix,
and --build-timeout on the manifest command. Values use the format of
--reach-analysis-timeout, and 0 turns the timeout off.

Coana applies the timeout. A Coana too old to take one gets no default,
and setting the flag requires the first Coana that applies it.

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