Use keyserver migration logic to apply developoment defaults which
work without use of Apache.
Update native url logic to account for explicit port usage
Differential D5846
[Keyserver] Migrate to non-apache config, update native • jon on Dec 8 2022, 11:37 AM. Authored by Tags None Referenced Files
Subscribers
Details Use keyserver migration logic to apply developoment defaults which Update native url logic to account for explicit port usage First need to create an existing app, which uses the apache configuration git checkout master nix develop # optional, if legacy dev env already applied # In one terminal cd keyserver yarn dev # In another terminal cd native yarn dev # Run follwoing command in another terminal yarn react-native run-ios --simulator='iPhone 14 Pro' --configuration=Debug # Should be able to do normal iOS Dev workflow: # No "DISCONNECTED" bar appears, able to create chat threads # Profile > Developer tools, should show http://localhost/comm Next, we need apply url-utils changes: arc patch D5846 # Keyserver should apply the migration, but still needs to restart for routing changes # restart `yarn dev` in `keyserver/` # App should update to new defaultURL without intervention, but to start it again yarn react-native run-ios --simulator='iPhone 14 Pro' --configuration=Debug # Should be able to do normal iOS Dev workflow: # No "DISCONNECTED" bar appears, able to create chat threads # Profile > Developer tools, should show http://localhost:3000/comm
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions
The developer paths seem to fallback to hardcoded paths here: https://github.com/CommE2E/comm/blob/824a62323ca29e4fbff784ecdf87e822ac5ca1fb/native/utils/url-utils.js#L57-L63 I'll try launching the native app in release mode and post the "Profile > Developer Tools" output. Comment Actions Nevermind, release mode removes developer tools section from profile. Instead I was able to submit a friends request when running it in release: Comment Actions Thanks for updating the Test Plan! Last step here is this one:
To be clear, I'm more concerned about the keyserver side of production (eg. that we're going to create facts/squalcal_url.json / facts/commapp_url.json / facts/landing.json in production)... not worried about the native side of production (where I agree the app will just used the hardcoded paths).
Comment Actions Test plan should be modified to check two more things:
COMM_DATABASE_DATABASE=<database> COMM_DATABASE_USER=<db_user> COMM_DATABASE_PASSWORD=<password> COMM_JSONCONFIG_facts_landing_url='<landing_url>' COMM_JSONCONFIG_facts_commapp_url='<commapp_url>' COMM_JSONCONFIG_facts_squadcal_url='<squadcal_url>'
Comment Actions Also I don't think both of these things are in the test plan yet: "localhost:3000/ root" was something I jotted down quickly during a 1:1 after explaining to you that squdcal_url.json was supposed to handle that baseRoutePath, but I'm guessing you didn't fully grasp that in the 1:1, and the diff comment didn't have much detail. Either way, you should make sure to test that, as based on my previous comment I think your solution here won't work. As for the Docker keyserver build, we need you to test that to make sure the production environment doesn't break. Just like the rest of the environments you test, you should make sure to play around with the app a little bit to make sure it works.
Comment Actions Almost there!! Heads-up, your screenshot failed to attach... see here: https://www.notion.so/commapp/Attaching-files-and-images-on-Phabricator-af8e2195fc91462689cc8de5c96a6759 Thanks for the context on the testing. Maybe the reason the basePath being / wasn't an issue is that native is the only place that has the "sticky" configuration, and maybe native's usage doesn't rely so much on keyserver being able to construct URLs. Either glad, glad it's fixed.
Comment Actions
Keep forgetting that phabricator doesn't do this by default.
Comment Actions Okay, based on my review of the code this looks good. The test plan looks thorough, too – hope we caught everything!
|