Repair the CDK deployment toolchain - #2068
Merged
Merged
Conversation
Neither `npm run build` nor `cdk diff` currently works in the deployment packages, so the deployment steps in the ehr-proxy and forms-server READMEs cannot be followed from a clean checkout. Two independent causes: Compilation fails in every deployment package with "Cannot find name 'Disposable'" from aws-cdk-lib's core/lib/private/perf.d.ts. The tsconfigs target ES2020 and do not set skipLibCheck, so tsc type checks a dependency's declaration files against a lib that predates the symbols they use. Set skipLibCheck, which is the CDK project default and what the library expects. The CDK CLI is pinned at 2.1031.0 while aws-cdk-lib is 2.260.0. The library now emits a cloud assembly with schema version 54, and a CLI that old reads at most schema 48, so every synth ends in "This CDK CLI is not compatible with the CDK library used by your application". Raise the CLI to ^2.1134.0; schema 54 requires at least 2.1128.0. Both predate the RDS work and affect all six deployment packages equally. With these changes `npm run build` succeeds in all six and `cdk diff` runs against the deployed stacks using only the repo's own toolchain.
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.
Problem
The deployment steps documented in
deployment/ehr-proxy/README.mdanddeployment/forms-server/README.mdcannot be followed from a clean checkout. Bothnpm run buildandcdk difffail, for two unrelated reasons.1. Compilation fails in all six deployment packages.
The tsconfigs target ES2020 and never set
skipLibCheck, sotsctype checks a dependency's.d.tsfiles against alibthat predates the symbols they use.skipLibCheckis the CDK project default and what the library expects.2. The CDK CLI cannot read its own library's output.
The CLI is pinned at
^2.1031.0whileaws-cdk-libis2.260.0. Raised to^2.1134.0, the current release.Scope
Both problems predate the RDS work in #2065 and #2066. I confirmed this by checking out the commit before #2065 and reproducing the identical build error, and by reading the CLI and library versions out of that commit's lock file, which already pins the same incompatible pair.
The change is one line per tsconfig, the CLI range in six
package.jsonfiles, and a lock file update whose only version change is:Verification
With only the repo's own toolchain, no workarounds:
npm run buildsucceeds in all six deployment packages.npx cdk diffruns against the live stacks and correctly reports the pending Back the HAPI FHIR servers with RDS PostgreSQL #2065 changes (6 RDS-related additions per stack, no deletions).npm ci,npm run lintandnpm run prettierall pass.Follow-up, not in this PR
The construct packages declare
aws-cdk(the CLI) underdependenciesrather thandevDependencies, which pulls the whole CLI into anything consuming them. Worth tidying, but it changes the dependency graph and is unrelated to unbreaking the build.