Skip to content

ci: hold the shared Tier 2 apt lock only while downloading - #5000

Merged
zackees merged 2 commits into
masterfrom
infra/4997-tier2-apt-lock-scope
Nov 17, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/4997-tier2-apt-lock-scope

Conversation

@zackees

@zackees zackees commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

The Dell's six runners share a Tier 2 apt archive. The existing flock serialized whole container-local installs, producing measured setup times of 12–25 minutes and a 15.7-minute lock wait even with 0 B to download.

Hold the shared flock only around the retried apt-get install --download-only command, with the same package manifest and options. Release it before copying completed .deb files into a fresh job-private archive and running dpkg recovery and the eatmydata install. Copies use reflinks when available and work across bind-mount filesystems; separate inodes prevent installer writes from affecting the shared packages. Apt keeps its normal locking, with lock and partial/ confined to the private install archive. Hosted runners retain their original archive, package commands and retry/recovery order, without a separate download pass.

Refs #4997. No new workflow files or public API changes.

Validation:

  • RED 6f5f21020: uv run python -m unittest ci.test_tier2_apt_cache.AptCacheTest.test_shared_archive_is_explicitly_selected ci.test_tier2_apt_cache.AptCacheTest.test_shared_downloads_unlock_before_concurrent_private_installs fails both regressions against the original workflow (missing shared-path selection; the first installer cannot reach an unlocked private install). Local evidence in the worker response; RED and GREEN are pushed together.
  • GREEN: uv run python -m unittest ci.test_tier2_apt_cache ci.test_tier2_build_setup passes all 33 tests (1.893 s).
  • SOLDR_PORCELAIN=0 ./lint: passed the full lint lane in 320.6 s (run with a 1,200 s deadline).
  • The executable concurrency test uses the actual workflow shell and real flock, with mocked apt/dpkg and FIFO barriers. It proves a second job completes while the first remains blocked inside its install, downloads own the shared lock including a failed/retried download, configure/repair/install do not, and installer mutations leave shared packages/lock/partial files unchanged. It also checks equal package/options arguments and distinct private archive inodes.
  • Existing hosted retry cases retain the exact apt command sequence and cover successful installs, interrupted dpkg recovery, transient failure and retry exhaustion.

This is CI setup only; Rust/C/protocol implementation tiers are unchanged. Live Dell timing and real multi-container installs have not been measured in this PR.

./push completed successfully with all 19 prooft Ci-Attestation records and a verified signature on final HEAD 6c210f771fc6aa10b2f9e3f97981e89e373b2520. This includes six-target clippy/Dylint, shared self-tests/validators, 8,880 workspace tests (six skipped), 920 feature-specific utilities tests, documentation tests and the Windows GNU test-binary link check. The trust-surface edits still require ordinary hosted PR checks under the base-owned admission policy.

Left as a draft per the assignment: publication-time backpressure was closed (counted=5 parked_red=0; oldest queued job has waited 27 min for a runner). Auto-merge is not armed.

Download under the shared flock, then copy completed packages to a private archive for eatmydata repair and installation. Keep hosted archive selection and install retries unchanged.

Refs #4997

Ci-Attestation: {"at":1794951623,"gate":"data/all/compatibility","host":"linux-x86_64","key":"","lane":"client-checks","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":109,"stamp":"c9840ca65189abf4d54a0c2ba140a41a","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951623,"gate":"data/all/flatpak-manifest","host":"linux-x86_64","key":"","lane":"client-checks","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":109,"stamp":"453a692f7f342d79ea4dc40f49090b9e","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951623,"gate":"data/all/qt-xml","host":"linux-x86_64","key":"","lane":"client-checks","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":109,"stamp":"a032435d78a2af1267f43ab4f6c2e6d0","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951623,"gate":"data/all/services-schema","host":"linux-x86_64","key":"","lane":"client-checks","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":109,"stamp":"7cf74324487d3b721aadf106b078f93e","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951511,"gate":"general/all/client-lint","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"38ca61a0c3d3bd19228ab14916ed3dc7","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951623,"gate":"python/all/self-test","host":"linux-x86_64","key":"","lane":"client-checks","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":109,"stamp":"c740c9eb715cf74cd04e7245756ccf84","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/aarch64-apple-darwin/client-clippy","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"577e436925ab8c9c67c4aee0d07bbe26","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/aarch64-apple-darwin/client-dylint","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"1a3da853a1798cacbfe92d5b33f664f5","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/aarch64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"5833bf50b8206e07c8a32d46494eb550","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/aarch64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"d3326baf854f6b5f01532319e89a7ce8","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951511,"gate":"rust/aarch64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"842a7ef3d2d28ca68cdb00973ac53bc5","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/aarch64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"67752a5079cf1c9101a0e77e6a8baf5c","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/x86_64-apple-darwin/client-clippy","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"d310ba46b957cf69c0185f04efd11eb2","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/x86_64-apple-darwin/client-dylint","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"4975a4899ff2ef27564810e450bd96c4","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/x86_64-pc-windows-msvc/client-clippy","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"0e1110bbbd69212fb20ae8c88330bef3","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951512,"gate":"rust/x86_64-pc-windows-msvc/client-dylint","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"d182da00c019d60b112287e5dc8ada5d","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951511,"gate":"rust/x86_64-unknown-linux-gnu/client-clippy","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"6dda2a7c223175db1eef16893d89e10f","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794951511,"gate":"rust/x86_64-unknown-linux-gnu/client-dylint","host":"linux-x86_64","key":"031d3e1af84ba7ef991c56d3764fd0d42f1d7cb583c7b000fa3f9bdad4af96d6","lane":"client-lint","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":256,"stamp":"766397071aaf4690c28b5360c1a6cc68","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}
Ci-Attestation: {"at":1794952609,"gate":"rust/x86_64-unknown-linux-gnu/client-test","host":"linux-x86_64","key":"2415ed9214525ad8e13f323c585c93b0929933207e7a6131dcf56234ece74ea2","lane":"client-test-x86_64-unknown-linux-gnu","parents":["6f5f21020a00dc4648c5067cb27d81f7d7ccd19d"],"secs":985,"stamp":"f14c2fcb5ac49d8e08b3a14c2bc1d551","tree":"0506050efeb0c0a44c252cf649c1ff5704689286","v":1,"via":"run"}

Client-Checks: {"checks":{"base":"61e2548740fcf4616c10848d21e65c6683957346","coverage":"all-tracked-applicable-files","diff":[".github/workflows/build-project.yaml","ci/test_tier2_apt_cache.py"],"head":"859becf7d768f15244a52fc528c7b7cc5def00dd","tools":{"orchestrator-python":"3.14.7 (main, Aug 14 2026, 15:35:28) [Clang 22.1.3 ]","schema-dependencies":"3.14.7 (main, Aug 14 2026, 15:35:28) [Clang 22.1.3 ]\n{'jsonschema': '4.26.0', 'json_source_map': '1.0.5'}","uv":"uv 0.13.5 (x86_64-unknown-linux-gnu)","xmllint":"xmllint: using libxml version 21504\n   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 DTDValid HTML C14N Catalog XPath XPointer XInclude Iconv ISO8859X Regexps Automata RelaxNG Schemas Modules Debug"},"tracked-digest":"e5950c2cfcc2b2361a5b228e024e64750fc2db93b3eb7eb30f326a53f16a13f9","tree":"0506050efeb0c0a44c252cf649c1ff5704689286"}}
@zackees
zackees marked this pull request as ready for review November 17, 2026 22:03
@zackees
zackees enabled auto-merge November 17, 2026 22:03
@zackees
zackees added this pull request to the merge queue Nov 17, 2026
Merged via the queue into master with commit e128749 Nov 17, 2026
42 checks passed
@zackees
zackees deleted the infra/4997-tier2-apt-lock-scope branch November 17, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant