Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Project Management Automation: Avoid gracefully handling error #20009
This pull request seeks to change the behavior of our GitHub automation tasks to ensure that they fail loudly, rather than be silently absorbed.
For example, the following action was considered a success, despite the fact that it failed to assign the milestone:
We should want these tasks to fail loudly to ensure that they are working properly. This specific tasks has been dysfunctional for quite some time, but was only recently noticed to not be assigning the milestone.
If a task expects to possibly be throwing errors, it should do its own
It will likely not be possible to test this, assuming there are no errors in current automation.
That said, there is an error with the milestone assignment automation, which occurs when the next milestone has already been created. This could either be used as verification that the failures are logged loudly, or could be considered a blocker to resolve first before this is merged.
See also: #20011
Interesting! The process failed, but the task itself was still reported as a success:
I'll follow-up to investigate whether there are documented options for signalling that the the action failed.
Also because at some point in the future, we'd need to handle the failure explicitly anyways:
There appear to be two options, based on the documentation.
Or setting the exit code of the process:
I might have thought the uncaught error would already be causing a non-zero status code, but apparently not?