Revert js-yaml 5 (#809): the image no longer booted - #824
Merged
Merged
Conversation
The runtime image copies only the hoisted node_modules of the prod-deps stage, not packages/backend/node_modules. js-yaml 5 was the backend's first nested dependency (the root keeps 4.3.2 for other packages), so the backend loaded 4.3.2 at runtime and crashed on CORE_SCHEMA.withTags. Unit tests resolve the nested copy and passed; only the post-merge Docker boot check caught it. Nothing was published. Back to js-yaml 4.3.2 (not in the advisory's 5.0.0-5.4.0 range). The YAML merge-key regression test stays: it passes on 4.x as well.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Main does not produce a bootable image since #809. The post-merge Docker check failed with
TypeError: js_yaml_1.CORE_SCHEMA.withTags is not a function.Why: the runtime stage copies only the hoisted
node_modulesofbackend-prod-deps, notpackages/backend/node_modules. js-yaml 5 was the backend's first nested dependency (the root keeps 4.3.2 for swagger-parser and friends), so at runtime the backend loaded 4.3.2. Unit tests resolve the nested copy, which is why CI on the PR was green. Nothing was published or deployed from this commit; the cloud runs 2a85a15.This goes back to js-yaml 4.3.2, which is outside the advisory's 5.0.0-5.4.0 range. The YAML merge-key regression test from #809 stays and passes on 4.x.
Checked locally: image built from this branch boots and answers
/health(10 s), backend loads js-yaml 4.3.2; full backend suite passes.Follow-ups worth doing: run the Docker boot job on PRs that touch
package.json,package-lock.jsonor theDockerfile(today it only runs after the merge), and copypackages/backend/node_modulesinto the runtime image so a nested dependency can't vanish again.