Page MenuHomePhabricator

[keyserver] Prefetch URL facts in scripts
ClosedPublic

Authored by ashoat on Aug 1 2023, 6:43 AM.
Tags
None
Referenced Files
F2910543: D8696.id29451.diff
Sun, Oct 6, 10:17 PM
F2910529: D8696.id29432.diff
Sun, Oct 6, 10:13 PM
F2910193: D8696.diff
Sun, Oct 6, 8:23 PM
Unknown Object (File)
Thu, Sep 26, 5:34 PM
Unknown Object (File)
Mon, Sep 9, 10:04 PM
Unknown Object (File)
Sep 1 2024, 6:11 PM
Unknown Object (File)
Sep 1 2024, 6:11 PM
Unknown Object (File)
Sep 1 2024, 6:11 PM
Subscribers

Details

Summary

make-channel-private.js was crashing because updateThread calls fetchServerThreadInfos, which ends up calling getUploadURL for thread avatars (recent change).

getUploadURL needs to know the URL facts to construct the URL. I can pass those in via envvar when invoking the script, but I need this change in order for the URL facts to be loaded.

Test Plan

On my keyserver:

# enter Docker container for Node.js
docker exec -it ba4b6d866573 /bin/bash
# run the make-channel-private.js script, while passing in the URL facts as an envvar
COMM_JSONCONFIG_facts_commapp_url='{"baseDomain":"https://web.comm.app","basePath":"/","https":true,"baseRoutePath":"/commweb/","proxy":"apache"}' yarn script dist/scripts/make-channel-private.js

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable