Skip to content

fix(deps, frontend): deduplicate Angular toolchain under @angular-builders/custom-webpack - #8127

Merged
aglinxinyuan merged 3 commits into
apache:mainfrom
Musxeto:fix/angular-toolchain-version-mismatch
Sep 17, 2026
Merged

aglinxinyuan merged 3 commits into
apache:mainfrom
Musxeto:fix/angular-toolchain-version-mismatch

Conversation

@Musxeto

@Musxeto Musxeto commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Adds three Yarn resolutions entries to frontend/package.json to force
@angular-builders/custom-webpack's transitive dependencies to the same versions
already pinned in devDependencies:

  • @angular-devkit/build-angular → 21.2.19
  • @angular/build → 21.2.19
  • @ngtools/webpack → 21.2.19

@angular-builders/custom-webpack@21.1.0 declares a loose dep on
@angular-devkit/build-angular: ^21.0.0, which Yarn was resolving to 21.2.18.
This created a nested copy of the toolchain under the builder's own node_modules/
while the pinned 21.2.19 sat unused at the workspace root. Because angular.json
routes both build and serve through @angular-builders/custom-webpack, the
older toolchain (21.2.18) was the one actually compiling the app and running the
dev server — silently, with CI staying green. The same split affected @angular/build
and @ngtools/webpack.

The resolutions field was already in use in frontend/package.json for
monaco-editor, webpack, and jschardet; this PR follows the same pattern.

Result: 276 lines removed from yarn.lock; all three packages now have a single
lockfile entry at 21.2.19; the nested
@angular-builders/custom-webpack/node_modules/@angular-devkit/ copy is gone.

No production source code files were modified.

Any related issues, documentation, discussions?

Closes #8052

How was this PR tested?

Verified the lockfile and installed tree after running yarn install inside frontend/:

# 1. Single lockfile entry per package — no more split at 21.2.18:
grep -n '^"@angular-devkit/build-angular@\|^"@angular/build@\|^"@ngtools/webpack@' \
  frontend/yarn.lock
# 298:"@angular-devkit/build-angular@npm:21.2.19":
# 571:"@angular/build@npm:21.2.19":
# 4294:"@ngtools/webpack@npm:21.2.19":

# 2. No nested @angular-devkit copy under the builder:
ls frontend/node_modules/@angular-builders/custom-webpack/node_modules/
# only `source-map` remains — no @angular-devkit

# 3. Installed version matches the pin:
node -e "console.log(require('./frontend/node_modules/@angular-devkit/build-angular/package.json').version)"
# 21.2.19

Was this PR authored or co-authored using generative AI tooling?

No

…lders/custom-webpack

@angular-builders/custom-webpack@21.1.0 declares a loose dep on
@angular-devkit/build-angular@^21.0.0. Yarn was resolving that range to
21.2.18, creating a nested copy under the builder's own node_modules/
while the pinned 21.2.19 sat at the workspace root. Because angular.json
routes both build and serve through @angular-builders/custom-webpack, the
older toolchain (21.2.18) was the one actually compiling the app.

Fix: add Yarn resolutions for @angular-devkit/build-angular, @angular/build,
and @ngtools/webpack pinned to 21.2.19, mirroring the existing devDependencies
pins. This collapses the three duplicate lockfile entries (276 lines removed)
and ensures the installed toolchain matches the pinned version.

Closes apache#8052
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file fix frontend Changes related to the frontend GUI labels Aug 30, 2026
@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Aug 30, 2026
@github-actions
github-actions Bot requested a review from xuang7 August 30, 2026 13:14
@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. release/* labels drive the post-merge backport, so add or remove one to change where this fix lands.

Release branch Analysis
⚠️ release/v1.3 Not labeled automatically — none of the files this PR modifies exist on this branch (frontend/package.json, frontend/yarn.lock). The fix may target code that isn't on this release, or the files were moved/renamed after the branch was cut. Please check and add release/v1.3 by hand if this fix should be backported here.
✅ release/v1.2 Already labeled — this fix is queued to backport here.

Auto-label run.

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @mengw15
    You can notify them by mentioning @mengw15 in a comment.

@codecov-commenter

codecov-commenter commented Aug 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.96%. Comparing base (3733b2a) to head (8e4cc6e).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8127      +/-   ##
============================================
+ Coverage     92.94%   92.96%   +0.01%     
- Complexity     4883     4885       +2     
============================================
  Files          1232     1232              
  Lines         51628    51628              
  Branches       6354     6354              
============================================
+ Hits          47988    47994       +6     
+ Misses         2076     2073       -3     
+ Partials       1564     1561       -3     
Flag Coverage Δ *Carryforward flag
access-control-service 71.78% <ø> (ø) Carriedforward from dcf8217
agent-service 99.32% <ø> (ø) Carriedforward from dcf8217
amber 89.02% <ø> (+0.03%) ⬆️ Carriedforward from dcf8217
computing-unit-managing-service 54.61% <ø> (ø) Carriedforward from dcf8217
config-service 87.37% <ø> (ø) Carriedforward from dcf8217
file-service 81.53% <ø> (ø) Carriedforward from dcf8217
frontend 96.71% <ø> (ø)
notebook-migration-service 83.73% <ø> (ø) Carriedforward from dcf8217
pyamber 98.47% <ø> (ø) Carriedforward from dcf8217
workflow-compiling-service 74.09% <ø> (ø) Carriedforward from dcf8217

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xuang7
xuang7 requested a review from aglinxinyuan September 13, 2026 04:20

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@xuang7 xuang7 removed the release/v1.2 back porting to release/v1.2 label Sep 13, 2026
@xuang7
xuang7 removed their request for review September 13, 2026 23:06
@Ma77Ball

Ma77Ball commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

@xuang7 and @aglinxinyuan, please fix the CI (rerun it on GitHub UI). It seems related to the time the release label was removed.

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Sep 17, 2026
Merged via the queue into apache:main with commit 08c1ee9 Sep 17, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend build runs an older Angular toolchain than package.json pins

6 participants