From e64c92a08787a665ffa9eb96677f74216998825d Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Mon, 3 Aug 2026 04:13:56 -0400 Subject: [PATCH 1/2] Use compact gh run watch in CI --- .github/workflows/internal-tests.yml | 47 ++++++--------------- tools/release/src/targets/github_release.rs | 11 ++++- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/.github/workflows/internal-tests.yml b/.github/workflows/internal-tests.yml index cd100558a69..2eeb70bd64d 100644 --- a/.github/workflows/internal-tests.yml +++ b/.github/workflows/internal-tests.yml @@ -87,41 +87,18 @@ jobs: - name: Wait for Internal Tests to complete if: steps.filter.outputs.non_docs == 'true' - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }} - script: | - const targetOwner = process.env.TARGET_OWNER; - const targetRepo = process.env.TARGET_REPO; - const runId = Number(`${{ steps.dispatch.outputs.run_id }}`); - const runUrl = `${{ steps.dispatch.outputs.run_url }}`; - const sleep = (ms) => new Promise(r => setTimeout(r, ms)); - - core.info(`Waiting for workflow result... ${runUrl}`); - - let conclusion = null; - for (let attempt = 0; attempt < 240; attempt++) { // up to ~2 hours - const runResp = await github.rest.actions.getWorkflowRun({ - owner: targetOwner, - repo: targetRepo, - run_id: runId - }); - const { status, conclusion: c } = runResp.data; - if (status === 'completed') { - conclusion = c || 'success'; - break; - } - await sleep(30000); - } - - if (!conclusion) { - core.setFailed('Timed out waiting for private workflow to complete.'); - return; - } - - if (conclusion !== 'success') { - core.setFailed(`Private workflow failed with conclusion: ${conclusion}`); - } + env: + GH_TOKEN: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }} + RUN_ID: ${{ steps.dispatch.outputs.run_id }} + RUN_URL: ${{ steps.dispatch.outputs.run_url }} + run: | + set -euo pipefail + echo "Waiting for workflow result... ${RUN_URL}" + gh run watch "$RUN_ID" \ + --repo "$TARGET_OWNER/$TARGET_REPO" \ + --exit-status \ + --compact \ + --interval 30 - name: Cancel invoked run if workflow cancelled if: ${{ cancelled() && steps.dispatch.outputs.run_id }} diff --git a/tools/release/src/targets/github_release.rs b/tools/release/src/targets/github_release.rs index aa135d87d2b..3b6524f6e8a 100644 --- a/tools/release/src/targets/github_release.rs +++ b/tools/release/src/targets/github_release.rs @@ -70,7 +70,16 @@ impl GithubRelease { } fn wait_for_workflow(&self, run_id: &str) -> Result<(), String> { - let cmd = cmd!("gh", "run", "watch", run_id, "--repo", REPO, "--exit-status"); + let cmd = cmd!( + "gh", + "run", + "watch", + run_id, + "--repo", + REPO, + "--exit-status", + "--compact" + ); println!("$> {:?}", cmd); cmd.run() .map(|_| ()) From 2bc63035ab4cc773a78986aa59e3c0e647d24fa3 Mon Sep 17 00:00:00 2001 From: clockwork-labs-bot Date: Mon, 3 Aug 2026 04:23:02 -0400 Subject: [PATCH 2/2] Remove compact run watch output --- .github/workflows/internal-tests.yml | 1 - tools/release/src/targets/github_release.rs | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/internal-tests.yml b/.github/workflows/internal-tests.yml index 2eeb70bd64d..d2529d6eaec 100644 --- a/.github/workflows/internal-tests.yml +++ b/.github/workflows/internal-tests.yml @@ -97,7 +97,6 @@ jobs: gh run watch "$RUN_ID" \ --repo "$TARGET_OWNER/$TARGET_REPO" \ --exit-status \ - --compact \ --interval 30 - name: Cancel invoked run if workflow cancelled diff --git a/tools/release/src/targets/github_release.rs b/tools/release/src/targets/github_release.rs index 3b6524f6e8a..aa135d87d2b 100644 --- a/tools/release/src/targets/github_release.rs +++ b/tools/release/src/targets/github_release.rs @@ -70,16 +70,7 @@ impl GithubRelease { } fn wait_for_workflow(&self, run_id: &str) -> Result<(), String> { - let cmd = cmd!( - "gh", - "run", - "watch", - run_id, - "--repo", - REPO, - "--exit-status", - "--compact" - ); + let cmd = cmd!("gh", "run", "watch", run_id, "--repo", REPO, "--exit-status"); println!("$> {:?}", cmd); cmd.run() .map(|_| ())