Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| - name: Build standalone CLI | ||
| run: pnpm --filter sentry run build | ||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: |
There was a problem hiding this comment.
We should defer this step after the standalone build and use that already-built artifact for e2e tests. This should also save us time.
There was a problem hiding this comment.
The Node 24 switch already follows the standalone build and E2E reuses the binary via SENTRY_CLI_BINARY.
also removed the duplicate standalone build from the CLI project job
There was a problem hiding this comment.
???
The lines above this literally are:
- name: Build project dependencies
run: pnpm --filter 'sentry^...' --if-present run build
- run: pnpm --filter sentry run ci:prepare
- name: Build standalone CLI
run: pnpm --filter sentry run tsx script/build.ts --single
Which builds the dependencies and gets a new CLI build. We should be using the build going in for nightly which means we need to download it from a previous job as an artifact.
There was a problem hiding this comment.
Measured it in #1791 (test PR) runs E2E against artifacts:
- CLI binary (linux-x64) builds with nightly’s Build Binary command
- NPM package (sentry) uploads its tarball
- and CLI E2E downloads both.
Three runs, each paired with a re-run of this PR’s head:
- 5m36s → 6m07s
- 5m00s → 6m04s
- 4m13s → 4m48s
+43s mean, first job start to last job end. The E2E job itself gets about 1 min faster, but it now waits 1m25s–1m39s for the binary job.
On saving time: that held for the version you reviewed. At 2c1cde7 the sentry job built a binary nobody used, and E2E built it again (E2E job 6m24s). 756b806 removed that duplication. The binary is now 13s of the E2E job.
So artifacts cost about 40s per run in exchange for testing exactly what nightly builds. I’d keep this as it is; if you’d rather pay that for fidelity, I’ll bring #1791’s commit over.
There was a problem hiding this comment.
Your code said - name: Build like the nightly binary which means you added another build step???
We already build the nightlies so e2e tests should just follow that instead of the smoke test.
See what Spotlight is doing: https://github.com/getsentry/spotlight/blob/main/.github/workflows/build.yml
There is no way in hell rebuilding the binary is cheaper than downloading a ready-made artifact unless the servers/network are extremely slow or we do some stupid stuff with compression and paying the cost of that. We are definitely going in the high-fidelity route.
Runs the CLI unit tests in three parallel shards and merges their Vitest blob reports into one coverage report, instead of running the whole suite inside the `sentry` project job. Stacked on #1726. | Job | #1726 (`1b42251`, unsharded) | This PR (`1608137`) | | --- | --- | --- | | `Test` workflow | 10m18s | 5m48s | | `sentry` project job | 9m57s | 1m57s | | CLI unit tests | inside `sentry` | 2m24s / 3m48s / 3m33s (3 shards) | | CLI coverage merge | inside `sentry` | 0m25s | | CLI E2E (Node 24) | 4m30s | 3m30s | Runs: [#1726](https://github.com/getsentry/toolkit/actions/runs/41057051286), [this PR](https://github.com/getsentry/toolkit/actions/runs/41126676840). One run each; workflow time is first job start to last job done. The last job to finish was `CLI asset catalog (macOS arm64)`. Shards install only the CLI and its workspace dependencies: 1,508 → 774 packages (`pnpm install` vs `pnpm --filter 'sentry...' install`, both `--frozen-lockfile`), with install scripts kept. Sharing preparation through artifacts was no faster in a [one-off benchmark](https://github.com/getsentry/toolkit/actions/runs/41088577518) (4m41s vs 4m37s), so each job prepares its own inputs. Same tests and coverage scope; CodeQL is unchanged. Drops the `ci-projects` tests that only asserted `test.yml`'s own text or ran its bash from Node. <details> <summary>Recompute job times from any run</summary> ```sh gh run view <run-id> -R getsentry/toolkit --json jobs --jq '.jobs[] | select(.name | test("^sentry$|^CLI")) | ((.completedAt | fromdate) - (.startedAt | fromdate)) as $s | "\($s / 60 | floor)m\($s % 60)s\t\(.name)"' ``` </details> --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The job takes 3m28s-4m45s, the same range the unit shards cap at 10 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The
sentryproject job ran every CLI check in sequence, with a 12m26s median. This splits it into parallel jobs:CLI unit tests (n/3)run the unit suite in three Vitest shards on Node 22.CLI coveragemerges their blob reports intopackages/cli/coverage/lcov.info.CLI E2E (Node 24)builds the workspace dependencies, generated sources, standalone binary and npm bundle once, then tests both on Node 24.sentryproject job keeps lint, typecheck and the policy checks.Also:
test.ymlandcli-build.ymlread the exact Node 20, 22 and 24 versions from.github/node-versions/.actions/*steps intest.ymluse the latest major tags.ci-projects.test.mjsno longer assertstest.yml's text or copiespackage.jsonvalues.main)sentryproject jobsentrysentryTestworkflowWorkflow time is first job start to last job end.
Recompute from any run:
Generated by Claude Code