Skip to content

fix(tools): HTTP timeouts + bound SBOM-browser concurrency#150

Open
lfrancke wants to merge 1 commit into
mainfrom
chore/rust-tools-timeouts
Open

fix(tools): HTTP timeouts + bound SBOM-browser concurrency#150
lfrancke wants to merge 1 commit into
mainfrom
chore/rust-tools-timeouts

Conversation

@lfrancke

Copy link
Copy Markdown
Member

Rust tool robustness (F22, F23)

  • No HTTP timeoutsnexus-garbage-collector, monitor-oci-artifacts and harbor-sbom-browser used clients/reqwest::get with no timeout, so a hung/slow registry blocked the process indefinitely. All now use a client with a 30s timeout (monitor-oci also switches from bare reqwest::get to one shared client).
  • Unbounded concurrencyharbor-sbom-browser's build_artifact_tree fired one request-chain per sdp/ repository at once via try_join_all on every cache miss. Now capped at 8 concurrent via buffer_unordered.

harbor-garbage-collector got its shared timeout client in its own safety PR (#149).

Verification

cargo check + cargo clippy clean on all three. (The one remaining clippy note — unused manifest_media_type/media_type fields in monitor-oci — is pre-existing and untouched here.)

Container/build hardening (cosign checksum, base-image digest pinning, Jenkins secret handling) follows in a separate PR.

- nexus-garbage-collector, monitor-oci-artifacts: give the reqwest client a
  30s timeout so a hung/slow registry can't block the job forever (monitor
  now reuses one shared client instead of bare reqwest::get calls).
- harbor-sbom-browser: give its client a 30s timeout, and cap the artifact
  tree build at 8 concurrent repository request-chains (buffer_unordered)
  instead of firing one per sdp/ repository at once on every cache miss.

(The harbor-garbage-collector already got its shared timeout client in its
own safety PR.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant