From 663100723beab3107ed225e354349003ec6d4aba Mon Sep 17 00:00:00 2001 From: starr-openai Date: Fri, 29 May 2026 09:03:29 -0700 Subject: [PATCH] Retry Windows ARM full CI archive --- .../rust-ci-full-nextest-platform.yml | 33 ++++++++++++++++--- .github/workflows/rust-ci-full.yml | 3 ++ codex-rs/exec/tests/suite/resume.rs | 24 +++----------- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/.github/workflows/rust-ci-full-nextest-platform.yml b/.github/workflows/rust-ci-full-nextest-platform.yml index 87ffe56a8e..e2633f9bbd 100644 --- a/.github/workflows/rust-ci-full-nextest-platform.yml +++ b/.github/workflows/rust-ci-full-nextest-platform.yml @@ -51,6 +51,10 @@ on: required: false default: false type: boolean + archive_timeout_minutes: + required: false + default: 60 + type: number # Caller workflow-level env does not flow through workflow_call, so keep the # Cargo git transport hardening on the archive and shard jobs directly here. @@ -62,7 +66,7 @@ jobs: name: Build nextest archive runs-on: ${{ inputs.archive_runner_group != '' && fromJSON(format('{{"group":"{0}","labels":"{1}"}}', inputs.archive_runner_group, inputs.archive_runner_labels)) || inputs.archive_runner != '' && inputs.archive_runner || inputs.runner_group != '' && fromJSON(format('{{"group":"{0}","labels":"{1}"}}', inputs.runner_group, inputs.runner_labels)) || inputs.runner }} continue-on-error: ${{ inputs.retry_archive }} - timeout-minutes: 60 + timeout-minutes: ${{ inputs.archive_timeout_minutes }} outputs: completed: ${{ steps.archive_completed.outputs.completed }} defaults: @@ -303,7 +307,28 @@ jobs: needs: archive if: inputs.retry_archive && always() && needs.archive.outputs.completed != 'true' runs-on: ${{ inputs.archive_runner_group != '' && fromJSON(format('{{"group":"{0}","labels":"{1}"}}', inputs.archive_runner_group, inputs.archive_runner_labels)) || inputs.archive_runner != '' && inputs.archive_runner || inputs.runner_group != '' && fromJSON(format('{{"group":"{0}","labels":"{1}"}}', inputs.runner_group, inputs.runner_labels)) || inputs.runner }} - timeout-minutes: 60 + continue-on-error: true + timeout-minutes: ${{ inputs.archive_timeout_minutes }} + outputs: + completed: ${{ steps.archive_completed.outputs.completed }} + defaults: + run: + working-directory: codex-rs + env: + ARCHIVE_CACHE_RUNNER: ${{ inputs.archive_runner != '' && inputs.archive_runner || inputs.runner }} + USE_SCCACHE: ${{ inputs.use_sccache && 'true' || 'false' }} + CARGO_INCREMENTAL: "0" + SCCACHE_CACHE_SIZE: 10G + NEXTEST_ARCHIVE_FILE: nextest-${{ inputs.artifact_id }}.tar.zst + TEST_HELPERS_ARTIFACT: nextest-test-helpers-${{ inputs.artifact_id }} + steps: *archive_steps + + archive_retry_2: + name: Retry build nextest archive 2 + needs: [archive, archive_retry] + if: inputs.retry_archive && always() && needs.archive.outputs.completed != 'true' && needs.archive_retry.outputs.completed != 'true' + runs-on: ${{ inputs.archive_runner_group != '' && fromJSON(format('{{"group":"{0}","labels":"{1}"}}', inputs.archive_runner_group, inputs.archive_runner_labels)) || inputs.archive_runner != '' && inputs.archive_runner || inputs.runner_group != '' && fromJSON(format('{{"group":"{0}","labels":"{1}"}}', inputs.runner_group, inputs.runner_labels)) || inputs.runner }} + timeout-minutes: ${{ inputs.archive_timeout_minutes }} outputs: completed: ${{ steps.archive_completed.outputs.completed }} defaults: @@ -320,8 +345,8 @@ jobs: shard: name: Tests shard ${{ matrix.shard }}/4 - needs: [archive, archive_retry] - if: always() && (needs.archive.outputs.completed == 'true' || needs.archive_retry.outputs.completed == 'true') + needs: [archive, archive_retry, archive_retry_2] + if: always() && (needs.archive.outputs.completed == 'true' || needs.archive_retry.outputs.completed == 'true' || needs.archive_retry_2.outputs.completed == 'true') runs-on: ${{ inputs.runner_group != '' && fromJSON(format('{{"group":"{0}","labels":"{1}"}}', inputs.runner_group, inputs.runner_labels)) || inputs.runner }} timeout-minutes: 60 defaults: diff --git a/.github/workflows/rust-ci-full.yml b/.github/workflows/rust-ci-full.yml index 9d9cfe2509..6cfb97c72a 100644 --- a/.github/workflows/rust-ci-full.yml +++ b/.github/workflows/rust-ci-full.yml @@ -494,11 +494,13 @@ jobs: runner: ubuntu-24.04-arm runner_group: codex-runners runner_labels: codex-linux-arm64 + archive_runner: ubuntu-24.04-arm target: aarch64-unknown-linux-gnu profile: ci-test artifact_id: linux-arm64 use_sccache: true retry_archive: true + archive_timeout_minutes: 120 secrets: inherit tests_windows_x64: @@ -529,6 +531,7 @@ jobs: artifact_id: windows-arm64 test_threads: 8 use_sccache: true + retry_archive: true secrets: inherit # --- Gatherer job for the full post-merge workflow -------------------------- diff --git a/codex-rs/exec/tests/suite/resume.rs b/codex-rs/exec/tests/suite/resume.rs index 904c6a8f19..df1c7bff49 100644 --- a/codex-rs/exec/tests/suite/resume.rs +++ b/codex-rs/exec/tests/suite/resume.rs @@ -239,7 +239,7 @@ async fn exec_resume_last_respects_cwd_filter_and_all_flag() -> anyhow::Result<( let test = test_codex_exec(); let server = MockServer::start().await; - let _response_mock = mount_exec_responses(&server, /*count*/ 5).await; + let _response_mock = mount_exec_responses(&server, /*count*/ 4).await; let dir_a = TempDir::new()?; let dir_b = TempDir::new()?; @@ -254,6 +254,10 @@ async fn exec_resume_last_respects_cwd_filter_and_all_flag() -> anyhow::Result<( .assert() .success(); + // `updated_at` is second-granularity, so ensure thread B is created in a later + // second than thread A and is deterministically newest before `resume --last --all`. + std::thread::sleep(std::time::Duration::from_millis(1100)); + let marker_b = format!("resume-cwd-b-{}", Uuid::new_v4()); let prompt_b = format!("echo {marker_b}"); test.cmd_with_server(&server) @@ -270,24 +274,6 @@ async fn exec_resume_last_respects_cwd_filter_and_all_flag() -> anyhow::Result<( let path_b = find_session_file_containing_marker(&sessions_dir, &marker_b) .expect("no session file found for marker_b"); - // `updated_at` is second-granularity, so ensure the touch lands in a later second - // than the initial session creation on fast CI (especially Windows). - std::thread::sleep(std::time::Duration::from_millis(1100)); - - // Make thread B deterministically newest according to rollout metadata. - let session_id_b = extract_conversation_id(&path_b); - let marker_b_touch = format!("resume-cwd-b-touch-{}", Uuid::new_v4()); - let prompt_b_touch = format!("echo {marker_b_touch}"); - test.cmd_with_server(&server) - .arg("--skip-git-repo-check") - .arg("-C") - .arg(dir_b.path()) - .arg("resume") - .arg(&session_id_b) - .arg(&prompt_b_touch) - .assert() - .success(); - // `resume --last` sorts by `updated_at`, which is second-granularity. Sleep so // the upcoming `resume --last --all` write lands in a later second and becomes // deterministically newest (instead of tying and falling back to UUID order).