Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
left a comment
There was a problem hiding this comment.
I like the idea but we can squeeze more from here. I'd also explore optimization opportunities before sharding. Not saying we shouldn't be sharding but I'm sure there are things that would speed us up before sharding.
| - name: Build project dependencies | ||
| run: pnpm --filter 'sentry^...' --if-present run build | ||
| - run: pnpm --filter sentry run ci:prepare |
There was a problem hiding this comment.
I wonder if this part can be cached/shared through artifacts to save time. We may even get incremental builds?
There was a problem hiding this comment.
tested shared preparation:
4m41s versus 4m37s with preparation in each shard (single run).
So it make sense to keep jobs independent for now. Haven't tested cross-run build caching and incremental build. we'll look into it later
There was a problem hiding this comment.
Why do I not believe you now. Opus 5.5 can you get me fresh and true numbers with details please?
| - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4 | ||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION_22 }} | ||
| cache: pnpm | ||
| - run: pnpm install --frozen-lockfile | ||
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 |
There was a problem hiding this comment.
Do we need all this crap only to merge coverage reports? What are we even doing here?
There was a problem hiding this comment.
trimmed this to a CLI-only install with scripts disabled. Node/pnpm are still needed to run vitest's report merge. the final job takes about ~30s
| - run: pnpm --filter sentry run ci:prepare | ||
| - name: Build standalone CLI | ||
| run: pnpm --filter sentry run build | ||
| run: pnpm --filter sentry run tsx script/build.ts --single |
There was a problem hiding this comment.
You know tsx is the evil, right? We should do this or something like that: https://nodejs.org/learn/typescript/run-natively
There was a problem hiding this comment.
the build script we had already used tsx. this calls the same final step directly to avoid repeating dependency builds and generation.
for switching to node we need to adapt existing imports, so i'd do it in a separate PR
| }); | ||
|
|
||
| it("requires CLI E2E success when selected and a skip otherwise", () => { | ||
| it("requires every selected CLI test job and rejects unexpected skips", () => { |
There was a problem hiding this comment.
Lol, we should just make this a silly bash script and get rid of the nodejs overhead :D
There was a problem hiding this comment.
ok here do you mean replacing the Node → YAML → Bash test plumbing or simplifying the project selection script?
it takes ~0.2s but it could be good to remove layers if you're referring to the first
There was a problem hiding this comment.
It's not about time, it's simplicity as you mentioned.
There was a problem hiding this comment.
(I'm Opus 5.5) Agreed. 1608137 removes the Node → YAML → Bash layer: this test, the asset-catalog gate test that used the same trick, and the regex checks on test.yml are all gone. What's left in ci-projects.test.mjs tests the discovery script's own logic.
Generated by Claude Code
cc1856d to
4548ccf
Compare
4548ccf to
314f082
Compare
2f2b82a to
f3b6c01
Compare
BYK
left a comment
There was a problem hiding this comment.
would love for you to address my comments before merging
| needs: discover-projects | ||
| if: contains(fromJSON(needs.discover-projects.outputs.matrix).include.*.name, 'sentry') | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 |
There was a problem hiding this comment.
(I'm Opus 5.5) Fair. The shards took 2m43s to 4m21s across the last three runs, so 1c131fc lowers the timeout to 10 minutes, the same as the coverage merge job.
Generated by Claude Code
| "coverage": false, | ||
| "e2e": false, | ||
| "npmRuntime": "bundle", | ||
| "policy": "ci:policy", | ||
| "test": "ci:test:unit", | ||
| "test": false, |
There was a problem hiding this comment.
(I'm Opus 5.5) Two of them did nothing. coverage: false already follows from test: false, and discovery picks ci:policy by default, so 97591cf drops both; the generated matrix is identical. The rest do something: build, e2e and test are false because dedicated CLI jobs run them, npmRuntime names the npm build, and typecheck picks ci:typecheck so the project job doesn't regenerate everything.
Generated by Claude Code
| mkdirSync, | ||
| mkdtempSync, | ||
| readFileSync, | ||
| rmSync, | ||
| writeFileSync, |
There was a problem hiding this comment.
All file I/O should be async, ideally promisified.
There was a problem hiding this comment.
(I'm Opus 5.5) After 1608137 the file no longer reads or writes any files, so there's no I/O left to make async.
Generated by Claude Code
| }); | ||
|
|
||
| it("runs CLI E2E independently after project discovery", () => { | ||
| it("runs three CLI unit shards and E2E independently after discovery", () => { |
There was a problem hiding this comment.
okay delete this test please, wtf is this checking the existing file???
There was a problem hiding this comment.
| } | ||
| }); | ||
|
|
||
| it("rejects missing or empty shard reports before merging coverage", () => { |
There was a problem hiding this comment.
| }); | ||
|
|
||
| it("requires CLI E2E success when selected and a skip otherwise", () => { | ||
| it("requires every selected CLI test job and rejects unexpected skips", () => { |
There was a problem hiding this comment.
It's not about time, it's simplicity as you mentioned.
|
You may wanna update the numbers in PR desc before merging |
The shards took 2m43s to 4m21s across the last three runs, so a 30-minute timeout only delayed failure on a hung shard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017M6odVf4dibAURdbCfXv4q
`coverage: false` already follows from `test: false`, and discovery picks `ci:policy` by default. The generated matrix is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017M6odVf4dibAURdbCfXv4q
Remove the tests that matched workflow text with regexes or extracted its bash and ran it from Node, and the asserts that mirrored package.json values. The remaining tests cover ci-projects.mjs logic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017M6odVf4dibAURdbCfXv4q
(I'm Opus 5.5) Updated. The description now compares the Generated by Claude Code |
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
sentryproject job. Stacked on #1726.1b42251, unsharded)1608137)Testworkflowsentryproject jobsentrysentryRuns: #1726, this PR. 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 installvspnpm --filter 'sentry...' install, both--frozen-lockfile), with install scripts kept. Sharing preparation through artifacts was no faster in a one-off benchmark (4m41s vs 4m37s), so each job prepares its own inputs.Same tests and coverage scope; CodeQL is unchanged. Drops the
ci-projectstests that only assertedtest.yml's own text or ran its bash from Node.Recompute job times from any run
Generated by Claude Code