Skip to content
Snippets Groups Projects

[webservice] Select partition based on beamtime dates

Merged Cyril Danilevski requested to merge feat/proposal_date_slurm_partition into master
2 unresolved threads

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

@roscar @schmidtp

Edited by Cyril Danilevski

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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).

  • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

  • Cyril Danilevski marked this merge request as ready

    marked this merge request as ready

  • Cyril Danilevski changed title from Draft: Select partition based on beamtime dates to [webservice] Select partition based on beamtime dates

    changed title from Draft: Select partition based on beamtime dates to [webservice] Select partition based on beamtime dates

  • Cyril Danilevski changed the description

    changed the description

  • All right, looks done. I tested from end to end.

  • No comments really, LGTM :thumbsup:

  • Robert Rosca approved this merge request

    approved this merge request

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Philipp Schmidt changed milestone to %3.7.0

    changed milestone to %3.7.0

  • added 1 commit

    • fdaafb21 - Check for beamtimes only when proposal in Running or Active

    Compare with previous version

  • mentioned in commit 0224d0bf

  • Please register or sign in to reply
    Loading