[webservice] Select partition based on beamtime dates
Description
Beamtimes can be active for a longer period of time, even though there is no user experiment ongoing, for reasons such as compensation time.
This leads to a problem where the jobs for such proposals are ran with high priority, although they're on ongoing.
MyMDC provides information regarding the beamtime, on top of the proposal status, with the begin and end dates.
These dates, as well as the proposal status, are now used to select the correct slurm partition.
How Has This Been Tested?
The changes were tested with the test installation with the following settings:
Proposal | Run | Action | Proposal Status | Beamtime | Expected Partition |
---|---|---|---|---|---|
900113 | 9999 | correct | FR | 2019-12-12T13:54:29.000+01:00 - 2019-12-17T13:54:29.000+01:00 | exfel |
900113 | 9999 | correct | A | 2019-12-17T13:54:29.000+01:00 - 2019-12-17T13:54:29.000+01:00 | exfel |
3014 | 267 | dark | FR | 2022-08-31T15:29:37.902435 - 2022-09-02T15:30:06.322790 (ongoing as of this MR) | upex-high |
3014 | 267 | correct | A | 2022-08-31T15:29:37.902435 - 2022-09-02T15:30:06.322790 (ongoing as of this MR) | upex-middle |
Note that the replies from MyMDC were intercepted to change the beamtime dates and proposal status.
Tests were added to check for various scenarios.
Relevant Documents (optional)
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
- My code follows the code style of this project.
- My change requires a change to the documentation.
- I have updated the documentation accordingly.
- I added tests where appropriate.
Reviewers
Merge request reports
Activity
added 1 commit
- 7dba78e3 - Update tests to take beamtime dates into account
added 1 commit
- 696b3e23 - Update tests to take beamtime dates into account
added 1 commit
- 4df50b51 - Clarify log message to add beamtime date check
573 574 if status_beamtime in ['R', 'A']: @manettim Shall we keep the status check at all to determine priority privilege or only look at beamtimes?
@schmidtp Good question... it looks redundant, but I would keep it. The automatic state transitions happen at the beginning of the first beamtime (R -> A) and at the end of the last one (A -> F), so, in principle a proposal with a current beamtime should always be in Active (A) status (it could be in status Ready only before the start of the first beamtime). That means that the status check is redundant. However, keeping it will give the possibility of "manually" giving less priority even to proposals with an active beamtime in very special cases (by marking the proposal as Inactive from myMdC).
- Resolved by Cyril Danilevski
changed milestone to %3.7.0
added 1 commit
- fdaafb21 - Check for beamtimes only when proposal in Running or Active
mentioned in commit 0224d0bf