Use Workflow Run ID instead of job request id

This commit is contained in:
Nikola Jokic 2025-09-10 09:42:03 +02:00
parent 425c977a64
commit ca5f25b388
No known key found for this signature in database
GPG Key ID: E4104494F9B8DDF6
3 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ func (er *EphemeralRunner) IsDone() bool {
}
func (er *EphemeralRunner) HasJob() bool {
return er.Status.JobRequestId != 0
return er.Status.WorkflowRunId != 0
}
func (er *EphemeralRunner) HasContainerHookConfigured() bool {

View File

@ -213,7 +213,7 @@ var _ = Describe("EphemeralRunner", func() {
).Should(Succeed(), "failed to get ephemeral runner")
// update job id to simulate job assigned
er.Status.JobRequestId = 1
er.Status.WorkflowRunId = 1
err := k8sClient.Status().Update(ctx, er)
Expect(err).To(BeNil(), "failed to update ephemeral runner status")
@ -224,7 +224,7 @@ var _ = Describe("EphemeralRunner", func() {
if err != nil {
return 0, err
}
return er.Status.JobRequestId, nil
return er.Status.WorkflowRunId, nil
},
ephemeralRunnerTimeout,
ephemeralRunnerInterval,

View File

@ -454,7 +454,7 @@ func (r *EphemeralRunnerSetReconciler) deleteIdleEphemeralRunners(ctx context.Co
}
if !isDone && ephemeralRunner.HasJob() {
log.Info("Skipping ephemeral runner since it is running a job", "name", ephemeralRunner.Name, "jobRequestId", ephemeralRunner.Status.JobRequestId)
log.Info("Skipping ephemeral runner since it is running a job", "name", ephemeralRunner.Name, "workflowRunId", ephemeralRunner.Status.WorkflowRunId)
continue
}