Skip to content

Angular upgrade from version 16 to 17#7085

Merged
cdavalos7 merged 14 commits intotensorflow:masterfrom
cdavalos7:feature/upgrade16-17
Apr 16, 2026
Merged

Angular upgrade from version 16 to 17#7085
cdavalos7 merged 14 commits intotensorflow:masterfrom
cdavalos7:feature/upgrade16-17

Conversation

@cdavalos7
Copy link
Copy Markdown
Contributor

@cdavalos7 cdavalos7 commented Apr 2, 2026

Motivation for features / changes

This PR is the second step in a planned major Angular upgrade cycle, where each major version will be delivered in a separate PR, incrementally progressing until the project reaches Angular 21. This specific PR upgrades TensorBoard from Angular 16 to Angular 17

Technical description of changes

  • Upgrade Angular, NgRx, and Material from v16 to v17
    • Upgrade TypeScript to 5.2.2 and zone.js to 0.14
    • Use Node.js 18 in Bazel and CI (required by Angular 17)
    • Update build-tooling patch to match Angular 17 version
    • Fix Bazel TypeScript compiler crash caused by TypeScript 5.x
    • Fix 3 snackbar tests that broke due to Material 17 behavior change
    • Remove deprecated Material legacy theme APIs

Screenshots of UI changes (or N/A)

Detailed steps to verify changes work correctly (as executed by you)

  • All 2022 webapp tests pass
  • yarn lint passes with Node 18
  • App builds and runs locally

Alternate designs / implementations considered (or N/A)

@cdavalos7 cdavalos7 marked this pull request as ready for review April 8, 2026 20:20
@cdavalos7 cdavalos7 requested a review from arcra April 8, 2026 20:21
Comment thread .github/workflows/ci.yml
});

it('closes the snackbar on click', async () => {
it('closes the snackbar on click', fakeAsync(() => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Replaced async/await with fakeAsync/flush(). Angular Material 17 no longer triggers immediate change detection when dismissing the snackbar. Since the snackbar lives in an overlay outside the test component, fixture.detectChanges() doesn't reach it. flush() forces all pending tasks to complete globally, including the overlay

@@ -9,24 +9,24 @@ index d5a8645..4b57378 100755
+ "@npm//@babel/helper-split-export-declaration",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated for the Angular 17 version of build-tooling, adding the missing Babel dependency

+ {[launcher]: {base: browser, flags: ['--no-sandbox', ...additionalArgs]}};
conf.browsers.push(launcher);
}
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated patch from 5.7.0 to 5.8.1. This version already includes the TypeScript 5.x fix and Chrome sandbox fix that we had to patch manually in 5.7.0

"source-map-support": "0.5.9",
- "tsutils": "3.21.0"
+ "tsutils": "3.21.0",
+ "typescript": "5.2.2"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added typescript as a direct dependency because the Bazel sandbox can't find it otherwise.

Why 5.8.1 and not 6.x: rules_nodejs 6.x removed most of the build rules we depend on (concatjs, esbuild, typescript, etc.) and moved them to a separate project (rules_js). This effort will be done in future upgrades

"buffer",
"punycode",
"string_decoder",
],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This vz_projector plugin depends on @tensorflow/tfjs library.

tfjs is designed to run in the browser and in Node.js server, so it includes node-fetch for the Node.js side.

When esbuild bundles everything for the browser, it tries to include node-fetch and fails because it can't resolve Node.js built-ins. The external list just tells esbuild to ignore those server only packages since they'll never be used in the browser.

Comment thread .github/workflows/ci.yml


exceptions = frozenset([])
# @TODO: Remove this exception when the patch file is no longer needed.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The format we use is usually one of:

# TODO(<username or bug>): blah, blah...
OR
# TODO: <username or bug> - blah, blah...

Let's follow this format.

Comment thread WORKSPACE Outdated
@cdavalos7 cdavalos7 merged commit af354e9 into tensorflow:master Apr 16, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants