Page MenuHomePhabricator

[keyserver] Prefetch URL facts in scripts
ClosedPublic

Authored by ashoat on Aug 1 2023, 6:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 2:12 AM
Unknown Object (File)
Fri, Nov 1, 5:13 PM
Unknown Object (File)
Oct 6 2024, 10:17 PM
Unknown Object (File)
Oct 6 2024, 10:13 PM
Unknown Object (File)
Oct 6 2024, 8:23 PM
Unknown Object (File)
Sep 26 2024, 5:34 PM
Unknown Object (File)
Sep 9 2024, 10:04 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