Skip to content
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): allow to combine FetchBackend and InMemory services in the providers #52425

Closed
wants to merge 1 commit into from

Conversation

JeanMeche
Copy link
Member

@JeanMeche JeanMeche commented Oct 27, 2023

When using withFetch, the PRIMARY_HTTP_BACKEND token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated.


cc @alan-agius4, this is related to your comment on #52398

@JeanMeche JeanMeche force-pushed the fix/in-memory-with-fetch branch 3 times, most recently from 1c20160 to de13627 Compare October 27, 2023 18:20
@JeanMeche JeanMeche changed the title fix(http): Don't override the backend when using the InMemoryWebAPI fix(http): allow to combine FetchBackend and InMemory services in the providers Oct 27, 2023
@JeanMeche JeanMeche marked this pull request as ready for review October 27, 2023 18:22
@JeanMeche JeanMeche added target: rc This PR is targeted for the next release-candidate action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 27, 2023
Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

LGTM!

@ngbot ngbot bot added this to the Backlog milestone Oct 27, 2023
@jessicajaniuk jessicajaniuk added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 27, 2023
@dylhunn dylhunn added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Oct 31, 2023
@dylhunn
Copy link
Contributor

dylhunn commented Oct 31, 2023

Caretaker -- the aio failure looks spurious to me

@alxhub
Copy link
Member

alxhub commented Oct 31, 2023

This PR was merged into the repository by commit 49b037f.

alxhub pushed a commit that referenced this pull request Oct 31, 2023
…52425)

When using `withFetch`,  the `PRIMARY_HTTP_BACKEND` token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated

PR Close #52425
@alxhub alxhub closed this in 49b037f Oct 31, 2023
@JeanMeche JeanMeche deleted the fix/in-memory-with-fetch branch October 31, 2023 20:17
alxhub added a commit that referenced this pull request Oct 31, 2023
…WebAPI (#52425)"

This reverts commit 49b037f. Reason: it
breaks tests in aio-local.
@JeanMeche JeanMeche restored the fix/in-memory-with-fetch branch November 2, 2023 19:25
@JeanMeche JeanMeche reopened this Nov 2, 2023
@JeanMeche JeanMeche added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Nov 2, 2023
@JeanMeche
Copy link
Member Author

The initial merge was reverted in #52425 because of test regressions.

Those are now fixed.

When using `withFetch`,  the `PRIMARY_HTTP_BACKEND` token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 6, 2023
alxhub added a commit to alxhub/angular that referenced this pull request Nov 8, 2023
…WebAPI (angular#52425)"

This reverts commit 49b037f. Reason: it
breaks tests in aio-local.
pkozlowski-opensource pushed a commit that referenced this pull request Nov 8, 2023
…WebAPI (#52425)" (#52630)

This reverts commit 49b037f. Reason: it
breaks tests in aio-local.

PR Close #52630
@dylhunn dylhunn added target: patch This PR is targeted for the next patch release and removed target: rc This PR is targeted for the next release-candidate labels Nov 8, 2023
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit 291ba38.

jessicajaniuk pushed a commit that referenced this pull request Nov 8, 2023
…52425)

When using `withFetch`,  the `PRIMARY_HTTP_BACKEND` token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated

PR Close #52425
tbondwilkinson pushed a commit to tbondwilkinson/angular that referenced this pull request Dec 6, 2023
…ngular#52425)

When using `withFetch`,  the `PRIMARY_HTTP_BACKEND` token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated

PR Close angular#52425
tbondwilkinson pushed a commit to tbondwilkinson/angular that referenced this pull request Dec 6, 2023
…WebAPI (angular#52425)"

This reverts commit 49b037f. Reason: it
breaks tests in aio-local.
tbondwilkinson pushed a commit to tbondwilkinson/angular that referenced this pull request Dec 6, 2023
…ngular#52425)

When using `withFetch`,  the `PRIMARY_HTTP_BACKEND` token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated

PR Close angular#52425
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 9, 2023
@JeanMeche JeanMeche deleted the fix/in-memory-with-fetch branch December 24, 2023 14:39
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ngular#52425)

When using `withFetch`,  the `PRIMARY_HTTP_BACKEND` token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated

PR Close angular#52425
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ngular#52425)

When using `withFetch`,  the `PRIMARY_HTTP_BACKEND` token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated

PR Close angular#52425
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: common/http target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants