Skip to content

Add a configurable limit to the number of test pods a user can have running at a given time #2496

@eamansour

Description

@eamansour

Story

As a Galasa service admin, I want to limit the number of tests runs that a user can have running at once, so that available test pod slots are shared more evenly amongst users.

Background

Moved from #2176

Refinement: user limit enforcement

We could also enforce that each user can submit 'n' tests at any one point in time.
Currently this is policed client-side using the 'throttle' mechanism, which is insufficient to protect a service from abuse. eg: I could run any number of parallel command-line tools each with their own throttle.

eg: Fred can have 1 active test running at once, but Wilma can have two, so U4 would not be eligible to be scheduled until U1 was complete.

This could be very useful when we have a large number of tests scheduled, and as an admin we want to prioritise automation tests over ad-hoc tests. We could assign the automated test user n parallel tests, but each ad-hoc user only gets to run 2 in parallel... or you could scale those down to 1 during times you don't want so much interference from ad-hoc users..etc.

Default behaviour is no max engines limit for any users (Max integer value). 0 means they cannot schedule tests. Anything inbetween is used as their max engines.

Example Payload

PUT on /users/{userNumber}

{
  "role": "string", // optional - emit if not updating
  "maxEngines": 0, // optional - emit if not updating
  "priority": 0 // optional - emit if not updating
}

CLI example

galasactl users set --max-engines 10 --login-id joe

where joe is the username.

Security considerations

  • Only admin users can set the max engines for themselves or other users.

Tasks

  • Add a field to user records that indicates the current maximum number of test runs that a user can have running at any given time
  • Make this field settable via the REST API
  • Make this field settable via the CLI
  • Documentation/release notes updates

Metadata

Metadata

Assignees

No one assigned

    Labels

    4-customer-enhancementEnhancements requested by a customer6-EcosystemEcosystem/Automation system issues

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions