Skip to content

Avoid abuse of priority parameter #1123

@mattias-p

Description

@mattias-p

Today the job_create method has a priority parameter. Any user can set any priority they like and we trust users not to abuse this. There is no penalty if they do.

The priority feature is needed on single-machine Backend installations with both a GUI and a batch client. A job from the GUI ought to be processed as soon as possible instead of waiting in line for the entire batch to finish.

My current understanding is that singular jobs (from job_create) need to run at a higher priority than batch jobs (from batch_create), but that finer granularity than this is not required.

I could think of the these options to improve the situation:

  1. Remove the priority parameter from the job_create and batch_create methods. Let these use methods always create jobs with their respective "default" priorities.
  2. Configure priorities for "singular" and "batch" jobs per RPCAPI instance.
  3. Add an API key parameter to job_create and set priority per API key. Perhaps there could be a default priority for the API key is omitted.

Edit: At first I didn't realize the importance of the priority feature. I have since updated the description with my new understanding.

Stabilization

Tracking issue

Affected interfaces

Incompatibly changed:

  • job_create
  • batch_create

Dependencies

None

Overlapping proposals

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions