Count actions resolve failures as infra failures (#851)

During job run we may fail to resolve actions download info, and this
stack is fully controlled by GitHub actions so it should be counted as
infrastructure failure instead of user failure.
This commit is contained in:
Yang Cao
2020-12-11 11:07:43 -05:00
committed by GitHub
parent 9ceb3d481a
commit 1e12b8909a
5 changed files with 55 additions and 7 deletions

View File

@@ -335,6 +335,14 @@ namespace GitHub.Runner.Worker
context.Result = TaskResult.Canceled;
throw;
}
catch (FailedToResolveActionDownloadInfoException ex)
{
// Log the error and fail the JobExtension Initialization.
Trace.Error($"Caught exception from JobExtenion Initialization: {ex}");
context.InfrastructureError(ex.Message);
context.Result = TaskResult.Failed;
throw;
}
catch (Exception ex)
{
// Log the error and fail the JobExtension Initialization.