From 46e058d15e6fe41b0eb16df98cc5e19c001b0b7a Mon Sep 17 00:00:00 2001 From: b7r6 Date: Wed, 7 Oct 2026 16:21:11 -0400 Subject: [PATCH 1/2] ci: defer the main.yaml integration-tests OCI lane off per-PR Completes the no-per-PR-OCI-builds intent: image-off-pr moved image.yaml off PRs and #2877 moved the nix integration job off PRs, but main.yaml's integration-tests (docker-compose image build + run_integration_tests.sh) fell between them and still ran on every PR. Defer to nightly + merge-to-main, matching #2880's pattern. Fork-local until folded into the upstream OCI/nightly set. --- .github/workflows/main.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 43dacaf1ea0..232952a3a33 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,17 +1,23 @@ name: CI # Controls when the workflow will run. +# +# The only live job here (integration-tests) builds the trace_machina/nativelink +# OCI image from the docker-compose Dockerfile and runs run_integration_tests.sh. +# That is a per-PR OCI build — the same class of heavy work #image-off-pr moved +# off PRs for image.yaml and #2877 moved off PRs for the nix integration job. +# This lane fell in the crack between those two, so defer it the same way: +# nightly cross-check + on every merge to main, not on every PR. Per-PR +# build/test signal is carried by the Nix "Bazel Dev" lane. on: push: branches: [ main ] paths-ignore: - '.github/styles/**' - 'web/**' - pull_request: - branches: [ main ] - paths-ignore: - - '.github/styles/**' - - 'web/**' + schedule: + - cron: '0 7 * * *' # 07:00 UTC daily (off-peak) + workflow_dispatch: permissions: read-all From a8cd409af1c163984f69d1564e59febe4464ac64 Mon Sep 17 00:00:00 2001 From: b7r6 Date: Wed, 30 Sep 2026 01:27:20 -0400 Subject: [PATCH 2/2] test(filesystem_store): widen open-file drain budget to de-flake asan `wait_for_no_open_files` polls a process-global open-handle counter, so it drains handles from every test sharing the binary. Under asan the previous 1s ceiling was too tight and `upgraded_layout_is_not_migrated_again_on_restart` intermittently failed with "Timed out waiting all files to close" even though the handles did close. Raise the cap to 10s; the loop still returns the instant the count hits zero, so healthy runs are unaffected. This is a test-only timing fix. Co-Authored-By: Claude Opus 4.8 --- nativelink-store/tests/filesystem_store_test.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nativelink-store/tests/filesystem_store_test.rs b/nativelink-store/tests/filesystem_store_test.rs index 7f659a16123..44e7300d109 100644 --- a/nativelink-store/tests/filesystem_store_test.rs +++ b/nativelink-store/tests/filesystem_store_test.rs @@ -241,11 +241,17 @@ async fn read_file_contents(file_name: &OsStr) -> Result, Error> { } async fn wait_for_no_open_files() -> Result<(), Error> { + // `get_open_files_for_test` reads a process-global open-handle counter, so + // this drains handles opened by *any* concurrently running test in the same + // binary. Under asan (and other slow-execution configs) a 1s budget is too + // tight and this spuriously times out even though the handles do close, so + // give the drain a generous ceiling — the loop still exits the instant the + // count reaches zero, so a healthy run pays nothing for the larger cap. let mut counter = 0; while fs::get_open_files_for_test() != 0 { sleep(Duration::from_millis(1)).await; counter += 1; - if counter > 1000 { + if counter > 10000 { return Err(make_err!( Code::Internal, "Timed out waiting all files to close"