fix(ci): stream nx output so failures are not lost in buffered dumps#831
Merged
Conversation
Ignacio Nistal (ignacionistal)
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title*
fix(ci): back-end pipeline — fix cdk synth type error and stop losing failure logs
Type of Change*
Description
The
cicd-release-qualityBuild & Deploy Back-End job has failed on every push todevelopmentsince PR #823 (aws-cdk-lib 2.176 → 2.260). This PR fixes the actual root cause and the log-visibility defect that hid it for days. Two commits:1.
fix(infra): guard optional GSI partitionKey so cdk synth compiles on cdk 2.26x— the real pipeline fix.The back-end build task is
compile → test → package → cdk synth. aws-cdk-lib 2.26x changedSchemaOptions.partitionKeyto be optional, so the GSI loop indynamodb-construct.ts(value.partitionKey.name) no longer compiles under strict mode whencdk synthtype-checksmain.tsvia ts-node. Every failing CI run actually passed both Jest phases (~11 min of green tests) and then died on this compile error in the synth step — the very last step of the build. The fix adds a guard that narrows the type and throws a descriptive error if a GSI is ever defined without a partition key.2.
fix(ci): stream nx output so failures are not lost in buffered dumps— the reason this took days to find.The CICD scripts ran nx with
--outputStyle=static, which buffers the entire target output and dumps it all at once when the target fails. The GitHub runner closes the output pipe when the process exits, discarding the unread tail of the dump — which is exactly where the Jest summary and the synth error live. Every failing run's log therefore cut off mid-test-noise, hiding the real error and misdirecting diagnosis toward Jest/memory. Switching to--outputStyle=stream(already used by the localbuild-back-endscript) prints output live so nothing can be lost. Both changes are made in.projenrc.tsand regenerated.Related context: PR #823 introduced the regression; PRs #828/#830 addressed other real issues surfaced by the same investigation (CI test memory, js-yaml override, Node 20.20.2 floor, CDK CLI schema version, nuxt dev-server pin) but could not fix the pipeline because this synth error was invisible.
Testing*
pnpm exec projen synth:silentinpackages/back-endfails ondevelopmentwithTS18048: 'value.partitionKey' is possibly 'undefined'— the same failure CI has been hitting.cdk synth -qexits 0 and synthesizes both stacks (*-main-back-end-stack,*-easy-genomics-api-stack);projen compile(tsc) exits 0.CI_CD=true,AWS_ACCOUNT_ID,ENV_NAME,JWT_SECRET_KEY, etc.) to rule out env-dependent test failures.Impact
developmentafter this merge should get past the back-end build for the first time since Jul 6.Additional Information
cdk deployagainst the quality account — that step has not run since Jul 6 and cannot be tested locally, so watch the first run through the deploy phase.nvm install 20.20.2 && nvm use—.nvmrcis updated) since PR fix(security): dependabot follow-up — transitive overrides + remove stale npm lockfile #830.Checklist*