-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Follow-up to #971.
Summary taken from "Future Work" of #1141:
As mentioned in #971, part of the reason the bug was occurring was due to the structure of this part of the DB. The plan's revision, which should be part of scheduling_request, is instead on scheduling_specification. This means that the UI has to update the scheduling spec before it hits the schedule endpoint, which updates the specs revision, which allows for a duplicate request to be created (since the PK is currently (spec_id, spec_revision)).
The correct design is to have plan_revision be on scheduling_request, as well as other changes to synchronize the design of the scheduling rq and sim rq tables. This is not possible, however, because plan revision data is stored in the Merlin DB. There are a few solutions possible:
- Merge the Databases. We can then grant the scheduler read permission on the
plantable and it can properly fetch the plan's revision in the same way that sim rqs fetch revisions. - Create GraphQL requests in the Scheduler Server. This would require adding in additional envvars to the scheduler server container, and potentially duplicating some code from the
scheduler-driverpackage. Additionally, the place this GQL request would be made would be in the middle of a section of code that is reading from and then writing to Postgres inCachedSchedulerService. - Have the Scheduler Server exclusively use GQL requests. This would entirely alleviate the awkwardness of (2), while very likely being more work. Additionally, it would be odd that one container is not able to interact directly with a database that it owns.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status