Repository navigation
Repair the lockfile and unbreak the master deploy - #12
Merged
Merged
Conversation
PR #11 left the root install unrunnable, so the master deploy after its merge failed at "Lockfile consistency" and k8s-pods was never uploaded. Two defects: - The scoped `@datadog/apps-frontend` override used `$react` / `$react-dom`. npm resolves `$name` against the root package's own direct dependencies, not against a sibling override entry, and this root depends on neither react nor react-dom — so every install died with `npm error Unable to resolve reference $react`. Spell the versions out. - `package-lock.json` had the nested `@datadog/apps-frontend` entry removed without a regeneration, leaving dangling references and failing `npm ci` with `Missing: @datadog/apps-frontend@0.0.9` and `Missing: zod@4.3.6`. Regenerated with `npm install`. Also correct the `$react` claim in docs/agents/scaffolding.md, which is what the broken override was written from. apps/k8s-pods goes to 0.0.2 because the deploy workflow only uploads apps whose files changed in the pushed range; without a touch under apps/ this fix would land green and still not redeploy k8s-pods. Verified locally on npm 10.9.8 / node 22: npm ci, the workspace React alignment check, typecheck, lint and build all pass, and the lockfile contains no apps/*/node_modules/react entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Why
The master deploy after #11 failed at Lockfile consistency, so
Typecheck, lint & buildandUpload k8s-podswere both skipped and the k8s-pods blank-render fix never went live. The last app actually deployed is still #10's pre-fix build.What was broken
1. The scoped override could never install. #11 added:
npm resolves a
$nameoverride reference against the root package's own direct dependencies — not against a sibling entry in the sameoverridesblock. This root depends on neitherreactnorreact-dom(only@types/*), so every install failed outright:Fixed by spelling the versions out. The intent of #11 — forcing
@datadog/apps-frontend's^18 || ^19peer range down to a single React 18 copy — is preserved.2. The lockfile was edited, not regenerated. #11 deleted the nested
apps/k8s-pods/node_modules/@datadog/apps-frontendentry and left references to packages that no longer had entries, sonpm cirejected it:Regenerated with
npm install, which restores both entries. The many"peer": trueremovals in the diff are normal npm 10.9.8 re-resolution output, not hand edits.Also in here
docs/agents/scaffolding.mdasserted that "the$reactreference resolves to the rootreactoverride". That claim is what the broken override was written from, so it's corrected with a note on the actual failure mode.apps/k8s-podsversion0.0.1→0.0.2. TheDetect changed appsjob only builds a matrix from paths that changed underapps/in the pushed range, so a lockfile-only fix would land green and still not redeploy k8s-pods. This touch is what makes the merge actually ship it.Verification
Run locally on npm 10.9.8 / node 22.23.1, matching CI's
node-version: 22:npm ci --ignore-scripts— passes (the step that was failing)npm ci— passesnpm run typecheck/npm run lint/npm run build— all passgrep 'apps/.*/node_modules/react' package-lock.json— no matches, i.e. no duplicate React, which is the checkscaffolding.mdprescribesFollow-up worth considering
The workflow has no
workflow_dispatchtrigger and gates uploads on changed paths, so there is no way to re-run a deploy that failed for a reason unrelated to the app itself — recovery always needs a dummy commit underapps/. Worth adding a manual trigger separately.