Skip to content

Improve the way we track job identities.#60

Merged
ispasov merged 1 commit intomainfrom
is/job-key
Mar 13, 2026
Merged

Improve the way we track job identities.#60
ispasov merged 1 commit intomainfrom
is/job-key

Conversation

@ispasov
Copy link
Copy Markdown
Collaborator

@ispasov ispasov commented Mar 12, 2026

Description

  • Improve the way we track job identities.

JobID was used to uniquely identify jobs.
This ID used to allow us to cnacel a runner provisioning if the job is cancelled.
However, there are cases in which the JobID is not avaialble, but the RunnerRequestId is.

There are two main flows:

  1. A job is assinged to the integration
    • In this case there is a JobID, but the RunnerRequestId is not available.
  2. A job is acquired by the integration
    • In this case there is a RunnerRequestId, but the JobID is not available.

We now use a jobIdentity struct to uniquely identify a job.
This struct contains the JobID and the RunnerRequestId.

The decision to cancel a runner provisioning is now based on the jobIdentity struct.
In the case both IDs are not available, we will not cancel the runner provisioning.

Testing

Standard Run

Run a job and ensures it completes

Cancel Job

Ensure there are not enough resources on an env
Start a job
See that provisioning starts to fail
Cancel the job
Ensure the provisioning stops

Multiple Jobs

Ensure there are not enough resources on an env
Start a job
Start another job
Cancel one of the jobs
Free space in the env
The non-cancelled job should complete

JobID was used to uniquely identify jobs.
This ID used to allow us to cnacel a runner provisioning if the job is cancelled.
However, there are cases in which the JobID is not avaialble, but the RunnerRequestId is.

There are two main flows:

1. A job is assinged to the integration
    - In this case there is a JobID, but the RunnerRequestId is not available.
2. A job is acquired by the integration
    - In this case there is a RunnerRequestId, but the JobID is not available.

We now use a jobIdentity struct to uniquely identify a job.
This struct contains the JobID and the RunnerRequestId.

The decision to cancel a runner provisioning is now based on the jobIdentity struct.
In the case both IDs are not available, we will not cancel the runner provisioning.
@ispasov ispasov requested a review from a team as a code owner March 12, 2026 09:57
@ispasov ispasov merged commit 6a52844 into main Mar 13, 2026
2 checks passed
@ispasov ispasov deleted the is/job-key branch March 13, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants