Use Workflow Run ID instead of job request id
This commit is contained in:
parent
425c977a64
commit
ca5f25b388
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue