-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Refactor actions client error to include request id #3430
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
Conversation
| 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 |
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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!
Co-authored-by: Francesco Renzi <rentziass@gmail.com>
Co-authored-by: Francesco Renzi <rentziass@gmail.com>
This PR aims to change the actions error, and introduce a
GitHubAPIErrorto log the request ID whenever we receive a response from the server.This can help diagnose problems such as the one described here: #3204