diff --git a/apis/actions.github.com/v1alpha1/ephemeralrunner_types.go b/apis/actions.github.com/v1alpha1/ephemeralrunner_types.go index 114dbaa2..c8dcbd91 100644 --- a/apis/actions.github.com/v1alpha1/ephemeralrunner_types.go +++ b/apis/actions.github.com/v1alpha1/ephemeralrunner_types.go @@ -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 { diff --git a/controllers/actions.github.com/ephemeralrunner_controller_test.go b/controllers/actions.github.com/ephemeralrunner_controller_test.go index 563608c5..497045a1 100644 --- a/controllers/actions.github.com/ephemeralrunner_controller_test.go +++ b/controllers/actions.github.com/ephemeralrunner_controller_test.go @@ -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, diff --git a/controllers/actions.github.com/ephemeralrunnerset_controller.go b/controllers/actions.github.com/ephemeralrunnerset_controller.go index ee766ef1..8707152d 100644 --- a/controllers/actions.github.com/ephemeralrunnerset_controller.go +++ b/controllers/actions.github.com/ephemeralrunnerset_controller.go @@ -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 }