Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Problem you have encountered:
A small number of Cloud Builds finished with an INTERNAL_ERROR Code 13, those can be retried and finished successfully. When possible, Cloud Build should better handle and retry those Cloud Builds
What you expected to happen:
Reduce the number of Cloud Builds that ends with code 13
Steps to reproduce:
Sometimes Cloud Builds finis with code 13, those builds can be retried and finished correctly.
Other information (workarounds you have tried, documentation consulted, etc):
Monitor the status of the Build using API [1] and use Retry method [2] in case of INTERNAL_ERROR status
For a solution without pooling Cloud Build status, Create a Log Sink for log records about build failures[3], connect a pub/sub to that Log Sink, connect a Cloud Function to the pub/sub [4] to process and retry the build that fail using Retry method [2]
[1]https://cloud.google.com/build/docs/api/reference/rest/v1/projects.builds/get
[2]https://cloud.google.com/build/docs/api/reference/rest/v1/projects.builds/retry
[3]https://medium.com/@amanar98/how-to-trigger-cloud-function-from-logs-on-google-cloud-platform-7a114447a97
[4]https://cloud.google.com/functions/docs/calling/logging