Skip to content

Conversation

@nikola-jokic
Copy link
Collaborator

This PR aims to change the actions error, and introduce a GitHubAPIError to log the request ID whenever we receive a response from the server.

This can help diagnose problems such as the one described here: #3204

@nikola-jokic nikola-jokic added the gha-runner-scale-set Related to the gha-runner-scale-set mode label Apr 12, 2024
@nikola-jokic nikola-jokic marked this pull request as draft April 12, 2024 10:26
@nikola-jokic nikola-jokic marked this pull request as ready for review April 12, 2024 11:52
strings.Contains(actionsError.ExceptionName, "JobStillRunningException") {
log.Info("Runner is still running the job. Re-queue in 30 seconds")
return ctrl.Result{RequeueAfter: 30 * time.Second}, nil
if err == nil { // if NO error
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to flip this? It's a bit counter-intuitive to have the happy path indented 🤔

Copy link
Collaborator Author

@nikola-jokic nikola-jokic Apr 16, 2024

Choose a reason for hiding this comment

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

Good point! I flipped this because error handling was huge, so I wanted to exit here to avoid having large if body (which I dislike more than not having happy path on the left 😄 ) Great point, I'll change it! Thanks!

@nikola-jokic nikola-jokic merged commit 8075e5e into master Apr 16, 2024
@nikola-jokic nikola-jokic deleted the nikola-jokic/log-request-ids branch April 16, 2024 10:57
unpollito pushed a commit to DistruApp/actions-runner-controller that referenced this pull request Jan 21, 2026
Co-authored-by: Francesco Renzi <rentziass@gmail.com>
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.

2 participants