fix(core): introduce BootstrapContext for improved server bootstrapping#63640
Closed
alan-agius4 wants to merge 5 commits intoangular:18.2.xfrom
Closed
fix(core): introduce BootstrapContext for improved server bootstrapping#63640alan-agius4 wants to merge 5 commits intoangular:18.2.xfrom
BootstrapContext for improved server bootstrapping#63640alan-agius4 wants to merge 5 commits intoangular:18.2.xfrom
Conversation
7d57459 to
b9aeba2
Compare
d68caf2 to
4bc5fba
Compare
hybrist
approved these changes
Sep 8, 2025
6e61a1a to
928aa8f
Compare
bab9312 to
fb203df
Compare
Use a more recent SHA, to fix issues with Chrome sandboxing.
b708d1b to
92f791c
Compare
The `ng_update_migrations` integration test is consistently failing due to Node.js engine incompatibilities. The test attempts to install an old version of `@angular/cli` (v12) which requires a Node.js version that is no longer available in our CI environment. This test has already been removed in the v19 branch. To align with that precedent and remove a failing test that is difficult to maintain, this commit removes the test entirely.
This commit separates the integration tests into their own CI job. This change aims to speed up the overall CI process by allowing integration tests to run independently. This also aligns the CI configuration with the v19 branch.
92f791c to
91b1d83
Compare
josephperrott
approved these changes
Sep 9, 2025
Member
josephperrott
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: dev-infra
AndrewKushnir
approved these changes
Sep 9, 2025
Contributor
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
josephperrott
approved these changes
Sep 9, 2025
Member
josephperrott
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: global-approvers
atscott
pushed a commit
that referenced
this pull request
Sep 9, 2025
…ping (#63640) This commit introduces a number of changes to the server bootstrapping process to make it more robust and less error-prone, especially for concurrent requests. Previously, the server rendering process relied on a module-level global platform injector. This could lead to issues in server-side rendering environments where multiple requests are processed concurrently, as they could inadvertently share or overwrite the global injector state. The new approach introduces a `BootstrapContext` that is passed to the `bootstrapApplication` function. This context provides a platform reference that is scoped to the individual request, ensuring that each server-side render has an isolated platform injector. This prevents state leakage between concurrent requests and makes the overall process more reliable. BREAKING CHANGE: The server-side bootstrapping process has been changed to eliminate the reliance on a global platform injector. Before: ```ts const bootstrap = () => bootstrapApplication(AppComponent, config); ``` After: ```ts const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, config, context); ``` A schematic is provided to automatically update `main.server.ts` files to pass the `BootstrapContext` to the `bootstrapApplication` call. In addition, `getPlatform()` and `destroyPlatform()` will now return `null` and be a no-op respectively when running in a server environment. (cherry picked from commit 8bf80c9) PR Close #63640
atscott
pushed a commit
that referenced
this pull request
Sep 9, 2025
This commit updates all usages of `angular/dev-infra/github-actions` to their latest SHA. This is necessary to ensure that all workflows are using the most up-to-date versions of the actions, which can include bug fixes, performance improvements, or new features. PR Close #63640
atscott
pushed a commit
that referenced
this pull request
Sep 9, 2025
Use a more recent SHA, to fix issues with Chrome sandboxing. PR Close #63640
atscott
pushed a commit
that referenced
this pull request
Sep 9, 2025
The `ng_update_migrations` integration test is consistently failing due to Node.js engine incompatibilities. The test attempts to install an old version of `@angular/cli` (v12) which requires a Node.js version that is no longer available in our CI environment. This test has already been removed in the v19 branch. To align with that precedent and remove a failing test that is difficult to maintain, this commit removes the test entirely. PR Close #63640
Contributor
|
This PR was merged into the repository. The changes were merged into the following branches:
|
atscott
pushed a commit
that referenced
this pull request
Sep 9, 2025
This commit separates the integration tests into their own CI job. This change aims to speed up the overall CI process by allowing integration tests to run independently. This also aligns the CI configuration with the v19 branch. PR Close #63640
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.
This commit introduces a number of changes to the server bootstrapping process to make it more robust and less error-prone, especially for concurrent requests.
Previously, the server rendering process relied on a module-level global platform injector. This could lead to issues in server-side rendering environments where multiple requests are processed concurrently, as they could inadvertently share or overwrite the global injector state.
The new approach introduces a
BootstrapContextthat is passed to thebootstrapApplicationfunction. This context provides a platform reference that is scoped to the individual request, ensuring that each server-side render has an isolated platform injector. This prevents state leakage between concurrent requests and makes the overall process more reliable.BREAKING CHANGE:
The server-side bootstrapping process has been changed to eliminate the reliance on a global platform injector.
Before:
After:
A schematic is provided to automatically update
main.server.tsfiles to pass theBootstrapContextto thebootstrapApplicationcall.In addition,
getPlatform()anddestroyPlatform()will now returnnulland be a no-op respectively when running in a server environment.(cherry picked from commit 8bf80c9)