-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enables PIXL DB to operate as a service separate from Orthanc Raw #593
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #593 +/- ##
==========================================
+ Coverage 87.61% 87.64% +0.02%
==========================================
Files 76 76
Lines 3505 3512 +7
==========================================
+ Hits 3071 3078 +7
Misses 434 434 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking very nice!
I think the docs could do with updating in a couple of places:
- https://github.com/SAFEHR-data/PIXL/tree/main/cli#configuration
- https://github.com/SAFEHR-data/PIXL/tree/main/orthanc/orthanc-raw#step-1
And possibly some more places too. Which makes me wonder whether it would be worth describing all the environment variables in a single README rather than across the repo (as a separate PR)?
Also, if we use an external postgres instance, would we need to change how we handle alembic migrations? Currently we run them when the container is started, but I guess we'd need to apply them manually if postgres is running elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, thanks for getting this in 🎉 . Agree with Paul on the documentation places. Happy for you to merge once you've added that in (without another review) and resolved the other comments to your liking.
Currently we run them when the container is started, but I guess we'd need to apply them manually if postgres is running elsewhere?
I think its fine for us to still run migrations on imaging api going up, because it'll still need to check the migrations have happened anyway.
A note: my last commit removed the Two thoughts:
|
Yeah I think that's right - IIRC we have to do the test |
@stefpiatek – are you happy if we just remove the offending lines from the |
Previously, the db at 7001 was shared by PIXL DB and Orthanc Raw. We now have the ability to split the dbs. Orthanc Raw will always persist, hence keeping it as 7001. If PIXL DB is external, then it will be on 7011. If it is local, it will also be on 7001.
This reverts commit 2d30097.
@p-j-smith and I have discussed at (surprising) length how best to name the environment variables as it's fiddly and quite confusing. This simultaneously feels like making a mountain out of a molehill, so please excuse the lengthy comment, but also we're mindful of causing confusion further down the line for someone who might want to setup an external PIXL DB. We think that having the variable names We figured that your suggestions of using:
So... I've added a comment to the |
I'm going to tentatively say this is done now 🥶, if you guys wouldn't mind taking a look! For Stef, the docker-compose now has two db services:
Paul – some of the tests were failing after our last discussion. The main one was around PIXL/cli/src/pixl_cli/_docker_commands.py Lines 44 to 54 in d05829d
(There were also a bunch of typing issues which mypy was angry about, hence changing code more explicitly to lists) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Nice job getting this working. Just a few small suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really nice, one request to have the profile work from config and not from having to remember to call the right profile. Once you've done that I'm happy for you to merge 😄
I will merge tomorrow, unless someone spots something in the meantime. Thanks for your help both, especially Paul – owe you a 🍺 / 🍸 / ☕ (delete as preferred). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work @tomaroberts !
Thanks for your help both, especially Paul – owe you a 🍺 / 🍸 / ☕ (delete as preferred).
Ooo I do like me a nice ☕
Description
Fixes #517:
Adds the means to create two postgres services. Previously, PIXL DB was used by both Orthanc Raw and for storing patient metadata.
Now it is possible to have separate databases for Orthanc Raw and PIXL DB. By default and in keeping with previous design, the root
./docker-compose.yml
brings up a single postgres service, shared by both Orthanc Raw and PIXL DB.With this PR,
test/docker-compose.yml
now contains a new postgres service demonstrating how to bring up a separate service for PIXL DB.Type of change
Please delete options accordingly to the description.
Suggested Checklist
main
branch.squash and merge