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

Ensure "race-network-and-fetch-handler" is used with a fetch handler #1719

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

yoshisatoyanagisawa
Copy link
Collaborator

@yoshisatoyanagisawa yoshisatoyanagisawa commented May 31, 2024

As covered in https://github.com/WICG/service-worker-static-routing-api?tab=readme-ov-file#how-does-it-work-if-there-is-no-fetch-handler, the fetch handler must exists not only for the "fetch-handler" source but also the "race-network-and-fetch-handler" source. The "race-network-and-fetch-handler" source was not written in the last update.


Preview | Diff

As covered in https://github.com/WICG/service-worker-static-routing-api?tab=readme-ov-file#how-does-it-work-if-there-is-no-fetch-handler, the fetch handler must exists not only for the "fetch-handler" source but also the "race-network-and-fetch-handler" source.  The "race-network-and-fetch-handler" source was not written in the last update.
@yoshisatoyanagisawa
Copy link
Collaborator Author

@domenic @mkruisselbrink Will you take a look?

Thank you.

Copy link
Contributor

@sisidovski sisidovski left a comment

Choose a reason for hiding this comment

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

LGTM

@yoshisatoyanagisawa
Copy link
Collaborator Author

Thanks Domenic for the review.
@mkruisselbrink Will you take a look?

@yoshisatoyanagisawa
Copy link
Collaborator Author

I think this is a simple spec mistake on the previous edit. Since race-network-and-fetch-handler also depends on the fetch event, having the handler should also be ensured.
I also filed https://issues.chromium.org/issues/391990601 for Chromium.

@yoshisatoyanagisawa
Copy link
Collaborator Author

Since the race-network-and-fetch-event source in ServiceWorker static routing API does competition on network and fetch handler, this PR asks the fetch handler to exist on using the source.

@yoshisatoyanagisawa yoshisatoyanagisawa merged commit a14460b into w3c:main Jan 28, 2025
2 checks passed
github-actions bot added a commit that referenced this pull request Jan 28, 2025
SHA: a14460b
Reason: push, by yoshisatoyanagisawa

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to asleekgeek/ServiceWorker that referenced this pull request Jan 28, 2025
SHA: a14460b
Reason: push, by pull[bot]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
aarongable pushed a commit to chromium/chromium that referenced this pull request Jan 29, 2025
This reflects the change in w3c/ServiceWorker#1719.
Instead of silently fallback to network, let me make `addRoutes()` raise
if the race-network-and-fetch-handler source is used without having a
fetch handler.

Fixed: 391990601
Change-Id: Ic944e183286cd056235b0fe272c543533dfaa86f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6211317
Reviewed-by: Takashi Toyoshima <[email protected]>
Commit-Queue: Yoshisato Yanagisawa <[email protected]>
Reviewed-by: Shunya Shishido <[email protected]>
Reviewed-by: Hidehiko Abe <[email protected]>
Reviewed-by: Keita Suzuki <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1412763}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 29, 2025
This reflects the change in w3c/ServiceWorker#1719.
Instead of silently fallback to network, let me make `addRoutes()` raise
if the race-network-and-fetch-handler source is used without having a
fetch handler.

Fixed: 391990601
Change-Id: Ic944e183286cd056235b0fe272c543533dfaa86f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6211317
Reviewed-by: Takashi Toyoshima <[email protected]>
Commit-Queue: Yoshisato Yanagisawa <[email protected]>
Reviewed-by: Shunya Shishido <[email protected]>
Reviewed-by: Hidehiko Abe <[email protected]>
Reviewed-by: Keita Suzuki <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1412763}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 29, 2025
This reflects the change in w3c/ServiceWorker#1719.
Instead of silently fallback to network, let me make `addRoutes()` raise
if the race-network-and-fetch-handler source is used without having a
fetch handler.

Fixed: 391990601
Change-Id: Ic944e183286cd056235b0fe272c543533dfaa86f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6211317
Reviewed-by: Takashi Toyoshima <[email protected]>
Commit-Queue: Yoshisato Yanagisawa <[email protected]>
Reviewed-by: Shunya Shishido <[email protected]>
Reviewed-by: Hidehiko Abe <[email protected]>
Reviewed-by: Keita Suzuki <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1412763}
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.

4 participants