HomePhabricator
Diffusion Comm 0d6361611755

[keyserver] Introduce mechanism for dynamically loading URL facts

Description

[keyserver] Introduce mechanism for dynamically loading URL facts

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

Reviewers: atul, palys-swm

Reviewed By: palys-swm

Subscribers: Adrian, yayabosh

Differential Revision: https://phabricator.ashoat.com/D3974

Details

Provenance
ashoatAuthored on May 7 2022, 1:12 PM
Reviewer
tomek
Differential Revision
D3974: [keyserver] Introduce mechanism for dynamically loading URL facts
Parents
rCOMMafeb360a8018: Update `staff.json`
Branches
Unknown
Tags
Unknown