Conversation
|
I see this covers json:submit and you can't change an ID with changesheets. What about queries:run updates? |
|
Maybe needless to say: Once the index exists in Mongo, Mongo, itself, will prevent operations that violate the index. The things I'm adding to this branch are about UX (user experience). Since some writes happen via Dagster, the endpoint (and user) doesn't have a way to know whether the write succeeds or fails (unless they follow up with Dagster). Currently, the endpoint will say "yes, I've created the job to perform the write," whether that write will eventually succeed or fail. So, I'm updating the endpoints to check whether the write would (if performed right now) fail, so the endpoint can return an actionable response to the user. |
|
For now, only In short, once I merge this PR into
|
On this branch, I updated the Runtime's bootup routine to ensure the Mongo database has a unique compound index on
(name, associated_studies), so that no two biosamples associated with the same study can have the same name.Details
I also implemented a generic test that demonstrates that such a unique compound index works the way I expect.
Related issue(s)
Fixes #1417
Related subsystem(s)
docsdirectory)Testing
I tested these changes by confirming all tests pass, including the newly-introduced one.
Documentation
docsdirectory)Maintainability
study_id: str)# TODOor# FIXMEblackto format all the Python files I created/modified