Skip to content

Add per-worker variable injection for parallel job execution #4488

@PhilShaughnes

Description

@PhilShaughnes

Problem to solve

Say I am testing some jobs that require locking behavior: https://url/job/namespace

Where:

  • each namespace is locked while the job is running
  • subsequent requests will just wait to try and get a lock

When running multiple jobs, this means I can't actually run tests against multiple namespaces simultaneously(e.g. namespace-one, namespace-two, namespace-three, etc) without wrapping hurl in parallel or something similar.

Proposal

Ideally each file could have something like POST https://url/job/test_{{SUFFIX}}
and then I could specify --job-variables SUFFIX="red,green,blue" or something (indicates run a max of 3 jobs)?

Additional context and resources

Just injecting a the worker number as a variable could make this workable, but less ergonomic.
Originally posted in #3786.

Tasks to complete

  • add additional cli parsing
  • modify job creation to inject a different variable per job instead of cloning all variables
  • testing
  • documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions