-
Notifications
You must be signed in to change notification settings - Fork 25.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(http): create macrotask during request handling instead of load start. #50406
Conversation
cff320f
to
b35e352
Compare
…tart This commit schedules the macrotask creation to happen before the XHR `loadStart` event. This is needed as in some cases, Zone.js becomes stable too early. With this commit, we also update the internal `createBackgroundMacroTask` method to use Zone.js `scheduleMacroTask` as otherwise the `setTimeout` would cause `fakeAsync` tests to fail due to pending timers. Closes angular#50405
46377b9
to
0ae44ee
Compare
Caretaker note: G3 failures are pre-existing. |
TGP after de-flaking. https://fusion2.corp.google.com/OCL:534055856:BASE:534833825:1684939158934:3afcaf79 |
This PR was merged into the repository by commit 2cdb4c5. |
…tart (#50406) This commit schedules the macrotask creation to happen before the XHR `loadStart` event. This is needed as in some cases, Zone.js becomes stable too early. With this commit, we also update the internal `createBackgroundMacroTask` method to use Zone.js `scheduleMacroTask` as otherwise the `setTimeout` would cause `fakeAsync` tests to fail due to pending timers. Closes #50405 PR Close #50406
…f load start (angular#50406)" This reverts commit 2cdb4c5.
…rPendingTasks` This commits refactors the HTTP client to use `InitialRenderPendingTasks` insteas of Zone.js macrotask. This is another approach to angular#50406 which was revert due to a failure in G3.
…rPendingTasks` This commits refactors the HTTP client to use `InitialRenderPendingTasks` insteas of Zone.js macrotask. This is another approach to angular#50406 which was revert due to a failure in G3.
…rPendingTasks` This commits refactors the HTTP client to use `InitialRenderPendingTasks` instead of Zone.js macrotask. This is another approach to angular#50406 which was revert due to a failure in G3.
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@angular/animations](https://github.com/angular/angular) | dependencies | patch | [`16.0.2` -> `16.0.4`](https://renovatebot.com/diffs/npm/@angular%2fanimations/16.0.2/16.0.4) | | [@angular/common](https://github.com/angular/angular) | dependencies | patch | [`16.0.2` -> `16.0.4`](https://renovatebot.com/diffs/npm/@angular%2fcommon/16.0.2/16.0.4) | | [@angular/compiler](https://github.com/angular/angular) | dependencies | patch | [`16.0.2` -> `16.0.4`](https://renovatebot.com/diffs/npm/@angular%2fcompiler/16.0.2/16.0.4) | | [@angular/compiler-cli](https://github.com/angular/angular/tree/main/packages/compiler-cli) ([source](https://github.com/angular/angular)) | devDependencies | patch | [`16.0.2` -> `16.0.4`](https://renovatebot.com/diffs/npm/@angular%2fcompiler-cli/16.0.2/16.0.4) | | [@angular/core](https://github.com/angular/angular) | dependencies | patch | [`16.0.2` -> `16.0.4`](https://renovatebot.com/diffs/npm/@angular%2fcore/16.0.2/16.0.4) | | [@angular/forms](https://github.com/angular/angular) | dependencies | patch | [`16.0.2` -> `16.0.4`](https://renovatebot.com/diffs/npm/@angular%2fforms/16.0.2/16.0.4) | | [@angular/platform-browser](https://github.com/angular/angular) | dependencies | patch | [`16.0.2` -> `16.0.4`](https://renovatebot.com/diffs/npm/@angular%2fplatform-browser/16.0.2/16.0.4) | | [@angular/platform-browser-dynamic](https://github.com/angular/angular) | dependencies | patch | [`16.0.2` -> `16.0.4`](https://renovatebot.com/diffs/npm/@angular%2fplatform-browser-dynamic/16.0.2/16.0.4) | --- ### Release Notes <details> <summary>angular/angular</summary> ### [`v16.0.4`](https://github.com/angular/angular/blob/HEAD/CHANGELOG.md#​1604-2023-06-01) [Compare Source](angular/angular@16.0.3...16.0.4) ##### animations | Commit | Type | Description | | -- | -- | -- | | [df65c4fc8f](angular/angular@df65c4f) | fix | Trigger leave animation when ViewContainerRef is injected ([#​48705](angular/angular#48705)) | ##### common | Commit | Type | Description | | -- | -- | -- | | [7e1bc513de](angular/angular@7e1bc51) | fix | untrack subscription and unsubscription in async pipe ([#​50522](angular/angular#50522)) | ##### core | Commit | Type | Description | | -- | -- | -- | | [9970b29ace](angular/angular@9970b29) | fix | update `ApplicationRef.isStable` to account for rendering pending tasks ([#​50425](angular/angular#50425)) | <!-- CHANGELOG SPLIT MARKER --> ### [`v16.0.3`](https://github.com/angular/angular/blob/HEAD/CHANGELOG.md#​1603-2023-05-24) [Compare Source](angular/angular@16.0.2...16.0.3) ##### core | Commit | Type | Description | | -- | -- | -- | | [c11041e372](angular/angular@c11041e) | fix | adds missing symbols for animation standalone bundling test ([#​50434](angular/angular#50434)) | | [98e8fdf40e](angular/angular@98e8fdf) | fix | fix `Self` flag inside embedded views with custom injectors ([#​50270](angular/angular#50270)) | | [199ff4fe7f](angular/angular@199ff4f) | fix | host directives incorrectly validating aliased bindings ([#​50364](angular/angular#50364)) | ##### http | Commit | Type | Description | | -- | -- | -- | | [080bbd2137](angular/angular@080bbd2) | fix | create macrotask during request handling instead of load start ([#​50406](angular/angular#50406)) | <!-- CHANGELOG SPLIT MARKER --> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1915 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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. |
…tart (angular#50406) This commit schedules the macrotask creation to happen before the XHR `loadStart` event. This is needed as in some cases, Zone.js becomes stable too early. With this commit, we also update the internal `createBackgroundMacroTask` method to use Zone.js `scheduleMacroTask` as otherwise the `setTimeout` would cause `fakeAsync` tests to fail due to pending timers. Closes angular#50405 PR Close angular#50406
This commit schedules the macrotask creation to happen before the XHR
loadStart
event. This is needed as in some cases, Zone.js becomes stable too early.With this commit, we also update the internal
createBackgroundMacroTask
method to use Zone.jsscheduleMacroTask
as otherwise thesetTimeout
would causefakeAsync
tests to fail due to pending timers.Closes #50405