Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with ephemeralRunner Succeeded state before build executed #3528

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

kr-sabre
Copy link
Contributor

@kr-sabre kr-sabre commented May 17, 2024

Fixes #3527

Seems that changing order of actions fixes the issues:

  • first call GH services and update ephemeral runner status
  • apply finalizers on CR

@kr-sabre
Copy link
Contributor Author

But I'm wondering if returning result after each finalizer apply isn't more correct approach...
Please advise

@@ -149,6 +149,11 @@ func (r *EphemeralRunnerReconciler) Reconcile(ctx context.Context, req ctrl.Requ
return ctrl.Result{}, nil
}

if ephemeralRunner.Status.RunnerId == 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I don't think that changing the registration and then patching the finalizers should be the right way to go. However, I noticed that the order in which we applied finalizers is incorrect.
We first need to apply the ephemeralRunnerFinalizerName, then the ephemeralRunnerActionsFinalizerName.

Would you be interested in trying out that approach?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will do the tests, but shouldn't we return Result also after ephemeralrunner.actions.github.com/runner-registration-finalizer apply?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, we should!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the code, please check now

I don't see such issues with the updated code, let me check a little longer - will be back with update on Monday

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'll wait for your feedback on Monday before merging it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also fix the test ☺️ The order of finalizers is different now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'll wait for your feedback on Monday before merging it.

We didn't observe the issue since Wednesday :)

@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label May 30, 2024
Copy link
Member

@nikola-jokic nikola-jokic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@nikola-jokic nikola-jokic merged commit d0fb720 into actions:master Jun 3, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gha-runner-scale-set Related to the gha-runner-scale-set mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ephemeral runner gets stuck in Successful state
2 participants