Skip to content

Conversation

@smalho01
Copy link
Contributor

This PR runs alongside (mcode/pims#44). See the description there for instructions on how to run

JIRA: REMS-457

@jtquach1
Copy link
Contributor

Thank you for providing the instructions to replicate your changes. I found that the pims frontend hot reloads, but I wasn't able to get the pims backend to hot reload.
These are the steps I took where I made these observations.

Setup

  1. Remove all containers manually through Docker Desktop
  2. Remove all images manually through Docker Desktop
  3. Remove all volumes manually through Docker Desktop
  4. git checkout pims-hot-reload in the rems-setup repo
  5. git checkout fix-hot-reload in the pims repo
  6. Do git submodule update on rems-smart-on-fhir and rems-setup
  7. Do git checkout dev on all other repos (not pims and rems-setup)
  8. docker-sync-stack start in rems-setup
  9. Go to http://localhost:5050/DoctorOrders
  10. Click the Verified Orders tab
  11. Observe the standard output rems_dev_pims container

Steps I took to observe the pims backend (hot reloading doesn't work)

  1. Add a console.log("foo bar baz"); in the /api/getRx endpoint in pims/backend/src/routes/doctorOrders.js. I see this output in my local Terminal where I ran docker-sync-stack start in rems-setup:
Looking for changes
  Waiting for changes from server
Reconciling changes

1 items will be synced, 0 skipped
7.2 KiB to be synced from local to 048db88183d1
0 B to be synced from 048db88183d1 to local
Propagating updates
Unison 2.53.3 (ocaml 4.14.0) started propagating changes at 14:21:41.67 on 29 Aug 2023
[BGN] Updating file backend/src/routes/doctorOrders.js from /Users/jquach/drls/pims to //048db88183d1//app_sync
[END] Updating file backend/src/routes/doctorOrders.js
Unison 2.53.3 (ocaml 4.14.0) finished propagating changes at 14:21:41.68 on 29 Aug 2023, 0.012 s
Saving synchronizer state
  1. Observe the standard output in the rems_dev_pims container. I noticed the console.log from step 12 didn't show up.
  2. Repeat step 12 but with console.log('hello world');. I saw the same output:
Looking for changes
  Waiting for changes from server
Reconciling changes

1 items will be synced, 0 skipped
7.2 KiB to be synced from local to 048db88183d1
0 B to be synced from 048db88183d1 to local
Propagating updates
Unison 2.53.3 (ocaml 4.14.0) started propagating changes at 14:34:00.01 on 29 Aug 2023
[BGN] Updating file backend/src/routes/doctorOrders.js from /Users/jquach/drls/pims to //048db88183d1//app_sync
[END] Updating file backend/src/routes/doctorOrders.js
Unison 2.53.3 (ocaml 4.14.0) finished propagating changes at 14:34:00.02 on 29 Aug 2023, 0.012 s
Saving synchronizer state

Steps I took to observe the pims frontend (hot reloading works)

  1. Click on the "Picked Up Orders" tab on http://localhost:5050/DoctorOrders
  2. Replace <h1>PickedUpOrders</h1> in pims/frontend/src/views/DoctorOrders/PickedUpOrders/PickedUpOrders.tsx with <h1>hello world</h1>
  3. Observe that the header text successfully changed to "hello world".
  4. Observe the output in the Terminal where docker-sync-stack start was issued in the rems-setup directory.
Looking for changes
  Waiting for changes from server
Reconciling changes

1 items will be synced, 0 skipped
281 B to be synced from local to 048db88183d1
0 B to be synced from 048db88183d1 to local
Propagating updates
Unison 2.53.3 (ocaml 4.14.0) started propagating changes at 14:39:49.03 on 29 Aug 2023
[BGN] Updating file frontend/src/views/DoctorOrders/PickedUpOrders/PickedUpOrders.tsx from /Users/jquach/drls/pims to //048db88183d1//app_sync
[END] Updating file frontend/src/views/DoctorOrders/PickedUpOrders/PickedUpOrders.tsx
Unison 2.53.3 (ocaml 4.14.0) finished propagating changes at 14:39:49.04 on 29 Aug 2023, 0.013 s
Saving synchronizer state
rems_dev_pims                   | Compiling...
Synchronization complete at 14:39:49  (1 item transferred, 0 skipped, 0 failed)
Looking for changes
  Waiting for changes from server
Reconciling changes
Nothing to do: replicas have not changed since last sync.

Copy link
Contributor

@avirgulto avirgulto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@smalho01 smalho01 merged commit 0e8924a into dev Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants