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

ServiceWorker static routing API #1701

Merged
merged 59 commits into from
Feb 22, 2024

Commits on Nov 28, 2023

  1. Revive of PR w3c#1686.

    I used to work on the specification update to support the
    ServiceWorker static routing API
    (https://github.com/WICG/service-worker-static-routing-api)
    w3c#1686
    
    However, I accidentally closed it by force-sync to the ServiceWorker
    specification's repository HEAD.
    
    This CL is for reviving it.
    yoshisatoyanagisawa committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    0a553af View commit details
    Browse the repository at this point in the history
  2. Update generate.yml

    Just trying to add workflows rule to run CI in static_routing_api repository.
    yoshisatoyanagisawa authored Nov 28, 2023
    Configuration menu
    Copy the full SHA
    a884283 View commit details
    Browse the repository at this point in the history
  3. Update generate.yml

    revert
    yoshisatoyanagisawa authored Nov 28, 2023
    Configuration menu
    Copy the full SHA
    b650b57 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2023

  1. Configuration menu
    Copy the full SHA
    bdc2474 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ef050e2 View commit details
    Browse the repository at this point in the history
  3. clean up.

    yoshisatoyanagisawa committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    39b670f View commit details
    Browse the repository at this point in the history
  4. another dfn fix.

    yoshisatoyanagisawa committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    75d848a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    025eb82 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d90ac0b View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2023

  1. Configuration menu
    Copy the full SHA
    6577640 View commit details
    Browse the repository at this point in the history
  2. Update the case without the urlPattern condition.

    Considering the future update of the condition, we should mark the case
    handled as one of conditions.  Also, we need to make it extensible.
    yoshisatoyanagisawa committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    cd5c864 View commit details
    Browse the repository at this point in the history
  3. Fix the urlPattern existence handling.

    It was flipped by mistake.
    yoshisatoyanagisawa committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    0162980 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4639e6c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f4f57ec View commit details
    Browse the repository at this point in the history
  6. Fix typo.

    yoshisatoyanagisawa committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    0d4ed51 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. Configuration menu
    Copy the full SHA
    dd0590b View commit details
    Browse the repository at this point in the history
  2. siple fix.

    yoshisatoyanagisawa committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    8bfef6f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0909c9c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2fd1936 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bef5857 View commit details
    Browse the repository at this point in the history
  6. Fixed typo.

    yoshisatoyanagisawa committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    1d8cf97 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    acdd79d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    745eeeb View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. Add 'fetch-event' source

    azaika committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    f647207 View commit details
    Browse the repository at this point in the history
  2. Fix "fetch-event" to fetch

    azaika committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    df4fe98 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. fxi references

    azaika committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    538c264 View commit details
    Browse the repository at this point in the history
  2. minor fix

    azaika committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    be86954 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2023

  1. Configuration menu
    Copy the full SHA
    40eaa69 View commit details
    Browse the repository at this point in the history
  2. delete redundant files

    azaika committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    c0033b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d3bad31 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. Fix |routerRules| handling

    azaika committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    46a5f2e View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2023

  1. remove |hasFetchEventSource|

    azaika committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    e99b357 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2 from azaika/add_fetch_source

    Add 'fetch-event' source
    yoshisatoyanagisawa authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    0f3c65d View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2023

  1. fix router rule initialization

    azaika authored and yoshisatoyanagisawa committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    f51a224 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a44f9a4 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. Configuration menu
    Copy the full SHA
    7b4f2d8 View commit details
    Browse the repository at this point in the history
  2. Addressed comments.

    - added a note on multiple conditions.
    - changed continue to [=continue=].
    yoshisatoyanagisawa committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    f9df489 View commit details
    Browse the repository at this point in the history
  3. Addressed comment.

    - remove checking if runningStatus is one of RunningStatus.
    - use "will" instead of "should".
    yoshisatoyanagisawa committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    9709650 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Configuration menu
    Copy the full SHA
    768861b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c966f7 View commit details
    Browse the repository at this point in the history
  3. Address comments.

    - Use ByteString instead USVString for requestMethod.
    - typos on forgetting "=" in closing "=]".
    yoshisatoyanagisawa committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    9c57f5f View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. Configuration menu
    Copy the full SHA
    ca833a4 View commit details
    Browse the repository at this point in the history
  2. Reflect comments.

    - mutual to mutually.
    - |or condition| or |or conditions| to |orCondition| or |orConditions|.
    - simplify the for loop upon WICG/service-worker-static-routing-api#9.
    yoshisatoyanagisawa committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    42d01eb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d0d848 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2024

  1. Add "cache" source support. (#4)

    * Add "cache" source support.
    * Use |client| as settingsObject to evaluate COEP.
    
    When the ServiceWorker static routing API is used and source other than
    "fetch-event" is used, results are directly returned without running
    ServiceWorker.  In that case, we use the request's COEP instead of
    ServiceWorker's COEP.
    yoshisatoyanagisawa authored Jan 31, 2024
    Configuration menu
    Copy the full SHA
    8304676 View commit details
    Browse the repository at this point in the history
  2. Bug fix: Make |registration| has a meaningful value. (#8)

    * Make |registration| set.
    
    In the previous specification, |registration| looks null when the
    ServiceWorker static routing API is used.
    Let me fix that by moving the step after configuring the registration.
    
    * Remove unnecessary blank line.
    yoshisatoyanagisawa authored Jan 31, 2024
    Configuration menu
    Copy the full SHA
    bde360b View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Add cacheName support. (#9)

    With this change, cacheName is supported.  It means that if there is
    multiple cache storage and developers want to choose which storage to
    use, they can specify the storage by cacheName.
    yoshisatoyanagisawa authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    55f9360 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. Use ServiceWorkerGlobalScope instead of request's settingsObject for …

    …COEP. (#11)
    
    When we designed the ServiceWorker static routing API, it was designed to be offloading simple things ServiceWorkers do. With that concept, if we evaluate the cache COEP, it should not be a request's COEP, but to be a ServiceWorker's COEP to make it behave as an offload.
    
    To make it happen, we set up the ServiceWorkerGlobalScope to be used for the COEP check.
    Since we only need ServiceWorkerGlobalScope for CSP checks, this PR separated the Run ServiceWorker
    algorithm to ServiceWorkerGlobalScope setup and others, and make it called before the static routing's
    cache COEP check if ServiceWorkerGlobalScope is not ready.
    yoshisatoyanagisawa authored Feb 9, 2024
    Configuration menu
    Copy the full SHA
    5a48d55 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Address comments in the main PR. (#12)

    * Reflect some of comments in w3c#1701
    * Clarified the cache name matching.
    * Run soft update during the router is selected.
    * Explicitly unset the flag on terminate.
    * add definition for agent.
    * Use registration's cache map instead of this's.
    * renamed to add "flag", but I still need to find a better name.
    yoshisatoyanagisawa authored Feb 15, 2024
    Configuration menu
    Copy the full SHA
    59e1de9 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Add race-network-and-fetch-handler source

    race-network-and-fetch-handler is a source to allow request to do competition between a network fetch and a fetch handler.  To implement the feature, this CL factored out the process to run a fetch handler in agent.  It is called from both the ServiceWorker static routing API part and the original part.  In the static routing API part, a fetch controller also runs in parallel, and the Handle Fetch algorithm returns a response coming earlier to the queue.
    sisidovski authored Feb 16, 2024
    Configuration menu
    Copy the full SHA
    c324260 View commit details
    Browse the repository at this point in the history
  2. Go with the XXX algorithm form

    In the previous CLs, there was a mix of the X algorithm and X algorithm.
    This CL changes all to the X algorithm when calling the algorithm
    defined in this PR.
    yoshisatoyanagisawa committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    e67a439 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9635f8a View commit details
    Browse the repository at this point in the history
  4. Add note.

    yoshisatoyanagisawa committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    088bb7b View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Remove |raceResponseMap|

    sisidovski authored Feb 21, 2024
    Configuration menu
    Copy the full SHA
    d237b4a View commit details
    Browse the repository at this point in the history
  2. Update docs/index.bs

    Co-authored-by: Marijn Kruisselbrink <[email protected]>
    yoshisatoyanagisawa and mkruisselbrink authored Feb 21, 2024
    Configuration menu
    Copy the full SHA
    7791260 View commit details
    Browse the repository at this point in the history
  3. Re-format {{ServiceWorkerGlobalScope}} part and move `It is initially…

    … unset` phrase (#14)
    
    * Remove |raceResponseMap|
    
    * Re-format {{ServiceWorkerGlobalScope}} part and move `It is initially unset` phrase
    sisidovski authored Feb 21, 2024
    Configuration menu
    Copy the full SHA
    16c38c1 View commit details
    Browse the repository at this point in the history
  4. Not to modify |activeWorker| for handling the static routing API

    Upon the review request, this CL makes |activeWorker| not modified
    in the Setup ServiceWorkerGlobalScope algorithm.  It is the caller's
    responsibility to update the active service worker's global scope.
    
    With this change, an effemeral ServiceWorkerGlobalScope can be used
    for a cache source in the static routing API.
    yoshisatoyanagisawa committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    c96dba0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9a0f50d View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Update race handling, lookup race response algorithm (#16)

    * Remove |raceResponseMap|
    
    * Re-format {{ServiceWorkerGlobalScope}} part and move `It is initially unset` phrase
    
    * Fix |url| in Lookup Race Response
    
    * Update race handling, lookup race response algorithm
    sisidovski authored Feb 22, 2024
    Configuration menu
    Copy the full SHA
    31f3b94 View commit details
    Browse the repository at this point in the history