Page MenuHomePhabricator

[keyserver] Introduce mechanism for dynamically loading URL facts
ClosedPublic

Authored by ashoat on May 9 2022, 3:35 PM.
Tags
None
Referenced Files
F2181222: D3974.id12453.diff
Wed, Jul 3, 5:13 PM
Unknown Object (File)
Mon, Jul 1, 3:30 AM
Unknown Object (File)
Mon, Jul 1, 12:53 AM
Unknown Object (File)
Sun, Jun 30, 7:43 PM
Unknown Object (File)
Sat, Jun 29, 11:52 PM
Unknown Object (File)
Wed, Jun 26, 4:56 PM
Unknown Object (File)
Mon, Jun 24, 3:15 PM
Unknown Object (File)
Fri, Jun 21, 8:45 PM

Details

Summary

Currently we load these "statically", using standard import syntax. We want to make it possible for the keyserver to run without all of the URL facts defined, so we want to move to dynamic await import so we can catch the failure to load the URL facts.

In order to do that, we have to deal with the fact that await import requires await. Instead of worrying about making every callsite an async function, instead I'm going to make sure we call await prefetchAllURLFacts() before anything else.

This diff actually doesn't change anything, it just introduces the mechanism and calls the prefetch. Following diffs will change callsites.

Test Plan

Make sure I can still use the keyserver

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.May 9 2022, 3:35 PM
Harbormaster failed remote builds in B8941: Diff 12451!
ashoat requested review of this revision.May 9 2022, 3:49 PM
This revision is now accepted and ready to land.May 10 2022, 1:20 AM
keyserver/src/utils/urls.js
41 ↗(On Diff #12453)

I missed a newline here

This revision was landed with ongoing or failed builds.May 10 2022, 6:01 AM
This revision was automatically updated to reflect the committed changes.