Repository navigation
feat(scan): add a build timeout to --dynamic-sbom-inference - #1819
Draft
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Draft
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Conversation
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
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.
Bounds the build tool runs of each
--dynamic-sbom-inferencebuild 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-timeoutonsocket scan create,socket scan reachandsocket fix, and--build-timeoutonsocket manifest dynamic-sbom-inference, set it in seconds (e.g.1800) or turn it off with0.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
--reach-versionkeeps working without a timeout. A timeout given on the command line requires Coana 15.15.10 and fails clearly on an older one.--reach-analysis-timeouttakes: a whole number of seconds, optionally withs,morh.socket.jsonsetting.Tests
reachability-flags.test.mts: parsing, defaults,0, invalid values, and the requires---dynamic-sbom-inferenceerror.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.