Repository navigation
ci: stop gating the React package job on build - #1041
arkhindi12 wants to merge 1 commit into
Conversation
`react-package` declared `needs: [build]`, and `build` declares `needs: [lint-typecheck]`. So a single SDK type error skipped `build`, which skipped `react-package` — and because a skipped job is not a failing job, the React package's checks never ran and never reported anything. That is how `@streamfi/react` reached 20 type errors and 40 failing tests against a green-looking CI: the job's last recorded runs show `skipping`, and the one time it did execute (conduit-protocol#1038) it failed. The gate was also redundant. The job installs and builds the SDK itself: ```yaml - run: npm ci - run: npm run build - run: npm ci working-directory: packages/react ``` No job in this workflow uploads or downloads artifacts (`grep -c artifact` returns 0), so nothing is shared through the dependency — `needs: [build]` only ordered the jobs. Removing it makes an SDK type error and a React type error independently visible instead of one masking the other. `build` keeps its own gate on `lint-typecheck`, and `e2e-browser` keeps `needs: [build]` because it is a nightly-only job where ordering is the intent. Verified: YAML parses, `react-package` has no `needs`, all other jobs unchanged.
Closing — my premise was wrongI claimed this gate was redundant because "no job shares artifacts". That reasoning was wrong, and I verified it by removing The React package depends on the SDK as "main": "dist/cjs/index.js",
"exports": { ".": { "import": "./dist/esm/index.js", "types": "./dist/types/index.d.ts" } }So the job genuinely needs a built SDK. It gets one through the
And the errors were never hidden anywayMy second claim — that the gate hid these errors — is also false. The SDK type errors surface in So on broken What I should have concludedThe skip is correct behaviour for a dependency that cannot be satisfied, not a CI defect. My change would have made the React job fail on every PR to Closing this. No change is needed here; #1038 and #1039 stand on their own and the combined state is verified green (7/7 jobs, including Thanks for the review prompt — the check was cheap and the claim was wrong. |
The reason this went unnoticed
react-packagedeclaredneeds: [build], andbuilddeclaresneeds: [lint-typecheck]:So one SDK type error skipped
build, which skippedreact-package— and a skipped job is not a failing job. The React package's checks never ran, so its 20 type errors and 40 failing tests were never reported. Every run of this job in the repository's history showsskipping, and the one time it actually executed (#1038) it failed immediately.The gate was also redundant
The job installs and builds the SDK itself before touching the package:
And no job in this workflow shares artifacts:
So
needs: [build]ordered the jobs without passing anything between them. The only thing it achieved was letting a failure in one package hide a failure in the other.Change
Drop
needs: [build]fromreact-packageonly.buildkeepsneeds: [lint-typecheck]— its gate is legitimate, since it verifiesdistactually loads.e2e-browserkeepsneeds: [build]— it is nightly-only, where ordering after a successful build is the intent.Net effect: an SDK type error and a React type error are now independently visible instead of one masking the other. This job will start running on every PR to
mainand reporting its real result.Interaction with the other PRs
This is the root-cause fix; #1039 is the symptom fix.
skippinguntil fix: restore green CI — 23 type errors and 28 failing tests #1038 lands.main),react-packagewill now run and fail — correctly reporting the 20 type errors that were previously invisible. That is the point: the red is real, not new.If you would rather not see a red
react-packagein the interim, merge this last. Its value is preventing the same silent-skip from hiding the next regression.Verification
YAML parses;
react-packagehas noneeds; all six jobs otherwise unchanged.