Skip to content

ci: run workflows on the CodeBuild runner - #158

Merged
yaythomas merged 1 commit into
mainfrom
ci/codebuild-runners
Nov 6, 2026
Merged

yaythomas merged 1 commit into
mainfrom
ci/codebuild-runners

Conversation

@yaythomas

@yaythomas yaythomas commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #75 by @wangyb-A: it moves CI, CodeQL, the cloud tests and the conformance tests to the CodeBuild-hosted runner. This branch rebases that change onto main and addresses both review comments on #75. The second commit of #75 (clippy fixes for Rust 1.99) is not needed, because main already passes on current stable.

Why

On 2026-11-05, jobs on GitHub-hosted runners waited up to 94 minutes for a runner. The same day, the jobs on the CodeBuild runner in the JS and Python repositories started within two minutes, half of them within 30 seconds.

What changes

  • ci.yml and codeql.yml: pushes, the CodeQL schedule and same-repository pull requests run on codebuild-github-actions-runner-<run_id>-<attempt>. Fork and Dependabot pull requests run on ubuntu-latest, with the expression of ci: run all workflows on CodeBuild runner aws-durable-execution-sdk-python#747.
  • cloud-tests.yml and conformance-tests.yml: fork and Dependabot pull requests skip every job, because the jobs need secrets those runs cannot read. All other jobs run on the CodeBuild runner.
  • .github/actions/ensure-rustup (from ci: run CI, cloud tests, conformance and CodeQL on the CodeBuild runner #75) runs before every rustup call and installs a pinned, sha256-verified rustup-init where rustup is missing, as on the CodeBuild image. free-disk-space runs only on GitHub-hosted runners.
  • check (sdk) asks for the large instance (label suffix -large, 16 GiB, as ubuntu-latest has). On the project's default instance, the kernel killed the rustc that compiles the SDK's unit tests in the first run of this pull request; that rustc alone peaks above 7 GiB.

Review comments on #75

  1. Dependabot: added to the hosted-runner condition of every ci.yml and codeql.yml job, and to the skip condition of the cloud and conformance jobs.
  2. Timeouts: every job now times out below the 60-minute CodeBuild limit, at 50 minutes, or 45 for the two test jobs that deploy stacks. On the last 30 main runs, the longest job took 17.5 minutes (example-tests), and stack deletion took at most 3.6 minutes (cloud) and 6.6 minutes (conformance wait), so the in-job teardown step fits before the limit. A timeout cannot help when CodeBuild stops the runner for another reason, so each AWS workflow also gets a teardown job that needs the tests, runs with if: always() on a fresh runner, and deletes the stacks by name. The cloud-tests concurrency group moves from the job to the workflow, so a run's teardown finishes before the next run deploys the same stack names. Fork and Dependabot runs take a group of their own, so they cannot cancel a waiting run.

Verification

All four workflows run on this pull request. Every job should show a codebuild-github-actions-runner-… label, start within a few minutes and pass, and the two teardown jobs should find no stacks left to delete.

@yaythomas
yaythomas temporarily deployed to ai-pr-review-runtime November 6, 2026 18:22 — with GitHub Actions Inactive
On 2026-11-05, jobs waited up to 94 minutes for a GitHub-hosted runner,
while the JS and Python SDKs' jobs on the CodeBuild-hosted runner
started in under two minutes. This builds on #75, which moved the four
workflows to that runner, rebases it onto main and addresses its review
comments:

- ci.yml and codeql.yml run fork and Dependabot pull requests on
  ubuntu-latest, so a dependency update's build scripts and procedural
  macros do not run in the CodeBuild account before review. Everything
  else runs on the CodeBuild runner.
- cloud-tests.yml and conformance-tests.yml skip fork and Dependabot
  pull requests, which cannot read the test secrets.
- Every job times out before the CodeBuild build limit, the jobs that
  deploy stacks soonest, so that their own teardown step can finish.
  A teardown job in each AWS workflow deletes the stacks by name on a
  fresh runner, also when CodeBuild stops a test runner. The
  cloud-tests concurrency group moves to the workflow, so a run deletes
  its stacks before the next run deploys stacks of the same names.
- check (sdk) asks for the large instance: on the default one, the
  kernel killed the rustc that compiles the unit tests.
- The action ensure-rustup installs a pinned, checksummed rustup-init
  where rustup is missing. free-disk-space runs only on GitHub-hosted
  runners.

Co-authored-by: Alex Wang <wangyb@amazon.com>
@yaythomas
yaythomas force-pushed the ci/codebuild-runners branch from 8933fb3 to a14d975 Compare November 6, 2026 19:01
@yaythomas
yaythomas merged commit 5a56df3 into main Nov 6, 2026
30 checks passed
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