Repository navigation
ci: faster, cheaper, consistently named CI - #8750
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
… a ci gate The PR critical path was the PostgreSQL integration suite (~15 min), run in full on an 8 vCPU runner once per provisioning path. Its files run one at a time, so the runner sat mostly idle. - integration: each provisioning path (push, migrate) is split into 4 Vitest shards on 4 vCPU runners. Both paths keep the full suite: migrations add triggers, checks and NOT VALID constraints that db:push does not, so the schemas differ. - e2e: the four next-dev groups (scim, cli, stop-after, desktop-inbox) run as a matrix, each on its own database. The boot/wait/stop shell lives once in http-e2e.sh. - lint: lint, audits, type-check and schema sync split off from the tests. - test: apps/sim unit tests sharded 2 ways; shard 1 also runs root scripts and the other workspaces. Each shard has its own Turbo cache disk. - ci: one aggregate job that fails unless every check passed (skipped is allowed), so a ruleset can require a single stable check. Deploy gating is unchanged: migrate still requires the whole Test and Build workflow.
Naming
- Workflow files: test-build -> checks, migrations -> migrate, deploy-trigger-dev ->
trigger-dev, docs-embeddings -> docs, companion-pr-check -> companion, stickydisk-gc
-> disk-gc. ci.yml, helm.yml and codeql.yml keep their paths: they sign or analyze, and
the path is part of the signer identity and code-scanning key.
- Composite actions: setup-workspace -> setup, cache-mount -> cache, docker-build -> image.
- Every workflow and job display name is a short lowercase id, matching the job id, with
any matrix value in parentheses: ci / checks / integration (push, 1/4), image-amd64 (app).
Duplicates
- Nine hand-written Setup Bun + actions/cache + bun install blocks use the setup action.
It gains node-version (empty keeps the runner's Node, as those jobs had) and registry-url
(npm publishing). This also ends restoring node_modules from another lockfile through the
`${runner.os}-bun-` prefix restore key.
- The runner expression is anchored once per file and aliased after.
Consistency
- One SHA per action: checkout v6 (helm was on v4, codeql on v5), setup-node v6 (desktop
on v4), cache v5 (desktop-release on v4), softprops/action-gh-release v3.0.3 (was v1,
Node 16). Redis 8.2 everywhere.
- secrets: inherit replaced by the secrets each callee reads; the checks workflow reads none.
The dev migration gets only DEV_DATABASE_URL, and staging/production never see it.
- Timeouts on the three macOS desktop-e2e jobs (none before, so a hang billed 6 hours),
and a cache for their Electron, electron-builder and Playwright downloads.
- Publish workflows: values moved from ${{ }} in run blocks to env, concurrency on the
npm/PyPI publishers, persist-credentials: false on checkouts that never push.
- Dependabot for github-actions (one grouped weekly PR), and actionlint in the lint job.
Fixes
- PyPI version check matched substrings (0.1.1 "existed" once 0.1.10 did) and treated a
PyPI outage as "not published". It now asks PyPI for the exact version and fails on
anything but 200 or 404.
Job wiring (runner, if, needs, permissions, timeout, outputs) is unchanged: verified by
loading the old and new ci.yml, checks.yml and helm.yml and comparing every job.
8ba3d02 to
569288f
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 29 files
Confidence score: 5/5
- In
.github/workflows/desktop-e2e.yml, the canary job shares its cache key withe2e, so its cache save is skipped. Give the canary a distinct cache key if you expect it to save its Electron download.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/desktop-e2e.yml">
<violation number="1" location=".github/workflows/desktop-e2e.yml:85">
P3: The canary job shares its cache key with the `e2e` job, so its cache save is silently skipped: `bun add --no-save electron@latest` leaves bun.lock unchanged and `e2e` already created `desktop-downloads-${{ runner.os }}-<lock hash>` on the prior PR run. Every weekly canary run re-downloads electron@latest (~120 MB), so the new download caching never helps this job. Give the canary its own key segment (e.g. `...-${{ runner.os }}-canary-${{ hashFiles('bun.lock') }}` while keeping the `desktop-downloads-${{ runner.os }}-` restore-keys prefix) so each job saves and restores its own entries.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
What
A cleanup of the GitHub Actions setup. It makes PR checks faster and cheaper, collapses duplicated setup, aligns versions, and gives every workflow, job and composite action a short name. What gets tested and how deploys are gated are unchanged.
Speed and cost (
checks.yml)integration (push|migrate, n/4): 8 shards on 4 vCPU, 3–7 min eache2e (scim|cli|stop-after|desktop-inbox)in parallel, ≤4.7 minlint1.1 min +test (1/2),test (2/2)ci: one aggregate status for every checkdb:pushdoes not create..github/scripts/http-e2e.sh.desktop-liveis now the longest PR job. About 10 min: a cold Next compile plus tests that deliberately wait out tool budgets. Untouched here.Names
Workflow files:
test-buildchecksmigrationsmigratedeploy-trigger-devtrigger-devdocs-embeddingsdocscompanion-pr-checkcompanionstickydisk-gcdisk-gcci.yml,helm.ymlandcodeql.ymlkeep their paths, because the path is part of the Sigstore signer identity and the code-scanning analysis key.Composite actions:
setup-workspace→setup,cache-mount→cache,docker-build→image.Job and workflow display names: short lowercase IDs that match the job ID, e.g.
ci / checks / integration (push, 1/4),ci / image-amd64 (app),ci / promote,ci / trigger-promote.Duplicates and consistency
Shared setup: 9 hand-written Bun cache + install blocks now use
./.github/actions/setup. It gains two inputs:node-version(empty keeps the runner's Node, as those jobs had) andregistry-url(for npm publish). This also ends restores ofnode_modulesbuilt from a different lockfile.Runner expression: anchored once per file with YAML anchors.
One pinned SHA per action:
checkoutsetup-nodecachesoftprops/action-gh-releaseRedis is 8.2 everywhere.
Secrets:
secrets: inheritis replaced with only the secrets each callee reads.checksreads none. The dev migration receives onlyDEV_DATABASE_URL.macOS
desktop-e2e: timeouts added (there were none, so a hang billed up to 6 h), plus a cache for the Electron, electron-builder and Playwright downloads.Publish workflows:
run:blocks moved toenv:.persist-credentials: falseon checkouts that never push.Dependabot: added for
github-actionsonly, as one grouped weekly PR to staging.actionlint: pinned and checksum-verified, in the
lintjob.Fix
0.1.1counted as published once0.1.10existed, and it read a PyPI outage as "not published". It now looks up the exact version and fails on anything other than 200 or 404.Not changed, on purpose
latest. They got the shared setup and the fixes above, but not a restructure.fsModuleCache. Measured on apps/sim shard 1/2: 140 s with no cache, 157 s cold, 118 s warm. The two test shards share one node_modules disk where the last writer wins, so one would usually run cold.After merge (needs a repo admin)
Add
ci / checks / cias the one required status check in the staging and main rulesets. Today the rulesets require no status checks, so a red PR can merge.Verify
ci.yml,checks.ymlandhelm.ymlwith a YAML parser and compared every job's runner,if,needs, permissions, timeout and outputs: only the intended renames differbun run lint:check,check:audits(58),test:scripts(354 tests, including the ones that run the real promote/prune/migrate shell from the workflows),check:skillsmigrate,trigger-upload,promote,trigger-promote,publish-sim-cli,publish-sim-setup