Page MenuHomePhabricator

[keyserver] stop hosting `sql.js` binary file
ClosedPublic

Authored by kamil on Jul 19 2023, 7:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 7:07 AM
Unknown Object (File)
Tue, Nov 5, 7:07 AM
Unknown Object (File)
Tue, Nov 5, 7:07 AM
Unknown Object (File)
Tue, Nov 5, 7:04 AM
Unknown Object (File)
Wed, Oct 16, 6:19 PM
Unknown Object (File)
Wed, Oct 16, 8:50 AM
Unknown Object (File)
Sep 28 2024, 1:49 AM
Unknown Object (File)
Sep 25 2024, 9:54 PM
Subscribers

Details

Summary

Now we are using .wasm database module with logic from native

Depends on D8561

Test Plan

Flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jul 19 2023, 9:12 AM

Is there a chance that older web clients will still try to fetch this file?

Is there a chance that older web clients will still try to fetch this file?

No, there is not - if a site wasn't reloaded the file is there and a worker is operating on it, and if the site was reloaded this means the server sent new logic, which is not using this file.
Also, we are using contenthash, and this file is cached on the client anyway since its content did not change (likely this still might fail because browsers first need to hit keyserver to get a proper response but as I said - this should not happen).

Overall, I will probably wait with landing this for a couple of days to make sure it works, hosting this old file does not cause any harm but it'll make it easier to revert changes when something will go wrong.

In D8562#254725, @kamil wrote:

Is there a chance that older web clients will still try to fetch this file?

No, there is not - if a site wasn't reloaded the file is there and a worker is operating on it, and if the site was reloaded this means the server sent new logic, which is not using this file.
Also, we are using contenthash, and this file is cached on the client anyway since its content did not change (likely this still might fail because browsers first need to hit keyserver to get a proper response but as I said - this should not happen).

Overall, I will probably wait with landing this for a couple of days to make sure it works, hosting this old file does not cause any harm but it'll make it easier to revert changes when something will go wrong.

There's a tiny race condition here: if a page was fetched just before deploying this diff, and a browser starts fetching just after the deployment, something will go wrong. The probability is almost zero, but maybe we can split this diff into two: one where we stop fetching, and one where we stop serving and land the second one in a release after the first one?

This revision is now accepted and ready to land.Jul 28 2023, 1:42 AM
In D8562#254976, @tomek wrote:
In D8562#254725, @kamil wrote:

Is there a chance that older web clients will still try to fetch this file?

No, there is not - if a site wasn't reloaded the file is there and a worker is operating on it, and if the site was reloaded this means the server sent new logic, which is not using this file.
Also, we are using contenthash, and this file is cached on the client anyway since its content did not change (likely this still might fail because browsers first need to hit keyserver to get a proper response but as I said - this should not happen).

Overall, I will probably wait with landing this for a couple of days to make sure it works, hosting this old file does not cause any harm but it'll make it easier to revert changes when something will go wrong.

There's a tiny race condition here: if a page was fetched just before deploying this diff, and a browser starts fetching just after the deployment, something will go wrong. The probability is almost zero, but maybe we can split this diff into two: one where we stop fetching, and one where we stop serving and land the second one in a release after the first one?

Yeah, that's what I meant by waiting with landing, we stopped using this file in D8560. I'll land the rest of the stack after release and making sure that everything works on prod.

Looks like everything works after release, despite some problems right after (ENG-4530), but it should be safe to land this right now. (cc. @tomek)