Skip to content

ci: Run GitHub Actions jobs on Namespace runners - #25547

Merged
JPeer264 merged 1 commit into
developfrom
jp/namespace-arm64-runners
Oct 20, 2026
Merged

JPeer264 merged 1 commit into
developfrom
jp/namespace-arm64-runners

Conversation

@JPeer264

Copy link
Copy Markdown
Member

This moves all GitHub Actions jobs to Namespace runners. It keeps node_modules, the pnpm store and the Playwright browsers on Namespace cache volumes instead of the GitHub cache, so every job runs pnpm install --frozen-lockfile and there is no dependency cache key anymore.

Runner decisions

Jobs use 3 profiles, sized from the CPU and memory peaks in nsc instance report: -small (2 vCPU, 4 GB) for bots and checks, the default (4 vCPU, 8 GB) for E2E and light jobs, -large (8 vCPU, 16 GB) for build, lint and tests. One profile for all jobs is simpler, but slower or more expensive.

Cache decisions

All build.yml jobs share one cache volume through cache-tag=sentry-javascript, for all branches (last write wins). Alternative: let only develop write to it ("Protect caches from updates").

Comment thread .github/workflows/build.yml Outdated
Comment thread .github/actions/install-dependencies/action.yml Outdated
@JPeer264

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit da69d0e. Configure here.

@JPeer264
JPeer264 force-pushed the jp/namespace-arm64-runners branch from da69d0e to 49a4020 Compare October 20, 2026 09:45
@JPeer264
JPeer264 marked this pull request as ready for review October 20, 2026 10:48

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, did you check the wall time for full ci runs before/after?

jobs:
stale:
runs-on: ubuntu-latest
runs-on: namespace-profile-sentry-javascript-small

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: do we have other profiles available than small/default/large? just wondering if we could tune this further for instance in cases where we have jobs that take a long time but don't necessarily have good parallelism so having more cores doesn't help

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, those are custom. I created them manually and were already tuned by how much CPU/memory we use.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah so we can create custom profiles as we see fit or do we need to ask someone to do that for us?

@JPeer264 JPeer264 Oct 20, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly.

You can do it yourself, after I add you to the account

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's cool

Comment thread .github/workflows/build.yml
Comment thread .github/actions/restore-cache/action.yml
@JPeer264

Copy link
Copy Markdown
Member Author

nice, did you check the wall time for full ci runs before/after?

Yes.

Namespace: https://github.com/getsentry/sentry-javascript/actions?query=branch%3Ajp%2Fnamespace-arm64-runners+workflow%3A%22CI%3A+Build+%26+Test%22
vs GHA runners: https://github.com/getsentry/sentry-javascript/actions?query=workflow%3A%22CI%3A+Build+%26+Test%22+branch%3Adevelop

The details of each run, can be viewed in the namespace dashbaord. There is a nice list of when a Job started, when it finished - that's great for optimizing in the future

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's see what it can do 🚤

Move all jobs to the Namespace profiles namespace-profile-sentry-javascript-small,
namespace-profile-sentry-javascript and namespace-profile-sentry-javascript-large,
by the CPU and memory that each job needs. The build.yml jobs share one cache
volume through the cache tag sentry-javascript. Pull request jobs use
sentry-javascript-pr, so a pull request cannot change the node_modules that
develop and release builds install from.

Keep node_modules, the pnpm store, the Playwright browsers and their apt
packages on Namespace cache volumes instead of the GitHub cache. Every job
runs pnpm install, which is a no-op when the volume matches pnpm-lock.yaml,
so the dependency cache key is no longer needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/namespace-arm64-runners branch from 49a4020 to acc8012 Compare October 20, 2026 12:39
@JPeer264
JPeer264 enabled auto-merge (squash) October 20, 2026 12:47
@JPeer264
JPeer264 merged commit 782b0e5 into develop Oct 20, 2026
370 of 374 checks passed
@JPeer264
JPeer264 deleted the jp/namespace-arm64-runners branch October 20, 2026 12:53
Comment on lines +552 to +554
runs-on:
namespace-profile-sentry-javascript;overrides.cache-tag=sentry-javascript${{ github.event_name == 'pull_request'
&& '-pr' || '' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untrusted PRs can poison caches reused by secret-bearing CI

This expression gives every pull_request the same -pr cache tag, while merge_group jobs use the non-PR sentry-javascript tag. An untrusted run can alter the shared Playwright cache, then a later optional E2E job can reuse and execute the cached browser with E2E credentials.

Evidence
  • build.yml accepts both pull_request and merge_group; this tag expression isolates neither merge-group runs from the main cache nor individual PRs from one another.
  • job_build checks out the event commit and runs build commands after mounting the dependency cache. job_browser_playwright_tests uses the same tag, mounts the Playwright cache through install-playwright, and runs code from the checkout.
  • install-playwright/action.yml mounts the playwright cache and runs Playwright installation, which downloads only browsers missing from the cache. A PR-controlled test can alter the mounted cache after installation.
  • job_optional_e2e_tests uses the same cache-tag scheme, exposes E2E credentials, and installs and runs Playwright; it can therefore execute a browser persisted by another PR run. Merge-group runs also write to the cache used by trusted branch jobs.
Also found at 3 additional locations
  • .github/workflows/build.yml:1056-1058
  • .github/workflows/build.yml:194-196
  • .github/workflows/build.yml:69-71

Identified by Warden · security-review · 5UE-MCQ

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.

2 participants