Page MenuHomePhabricator

[nix] Create new url facts
ClosedPublic

Authored by michal on Oct 6 2023, 8:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 12:47 AM
Unknown Object (File)
Mon, Nov 25, 12:00 AM
Unknown Object (File)
Sun, Nov 24, 11:41 PM
Unknown Object (File)
Sun, Nov 24, 11:38 PM
Unknown Object (File)
Sun, Nov 24, 9:46 PM
Unknown Object (File)
Wed, Nov 20, 1:21 AM
Unknown Object (File)
Mon, Nov 11, 8:07 PM
Unknown Object (File)
Mon, Nov 11, 6:41 PM
Subscribers

Details

Summary

Part of ENG-5153
Depends on D9397

We would like to separate hosting web app on dev environment to localhost:3000/webapp/ and move the keyserver logic to localhost:3000/keyserver/ (so in the end nothing will be hosted on localhost:3000/) to simplify the dev environment and allow for web <-> keyserver separation. We can also use this opportunity to cleanup the naming. This diff automatically adds new files on nix start. They will be used in the later diff.

Production will need to be updated so that keyserver_url.json contains data from squadcal_url.json and webapp_url.json contains data from commapp_url.json

Test Plan

Run nix develop, check if files are generated

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

michal added inline comments.
scripts/templates/keyserver_url.json
6 ↗(On Diff #31746)

squadcal_url had a "proxy": "apache" here, but we aren't using apache in dev env anymore and it broke the ip detection when you pointed the web app at the keyserver endpoints.

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 6 2023, 8:47 AM
Harbormaster failed remote builds in B23056: Diff 31746!

LGTM, two notes:

  1. This will probably require changes in our docs to reflect new URLs
  2. Might be good for @ashoat to take a look as this will require adding a .json file to the prod keyserver
This revision is now accepted and ready to land.Oct 16 2023, 3:29 AM

Overall I agree with the renaming – this makes a lot more sense.

Won't we need a dev environment migration if we're changing the name of these URL files? We could make it happen with a MariaDB migration (keyserver/src/database/migration-config.js)... kind of weird pattern but it's what we've used before.

I can make the change manually in production (keyserver/.env before Docker build).

I think we will also likely need to update docs to mention /webapp/ instead of /comm/ for loading the web app

Added a migration for the new files alongside the nix automatically creating them on nix develop. I don't think we need to remove the old files, they will be just ignored and if someone had some custom configuration in it we don't want to override it. The docs changes are in the next diff because this diff doesn't change the behaviour and only handles adding the new files.

Thanks!! Reminder to make sure you mention to me after you land this, so I can make the appropriate changes to keyserver/.env on my keyserver in production before deploying the changes