Skip to content

Not retry and report action download 403.#4391

Merged
TingluoHuang merged 1 commit into
mainfrom
users/tihuang/403
Apr 29, 2026
Merged

Not retry and report action download 403.#4391
TingluoHuang merged 1 commit into
mainfrom
users/tihuang/403

Conversation

@TingluoHuang
Copy link
Copy Markdown
Member

@TingluoHuang TingluoHuang commented Apr 29, 2026

403 most likely client side error with auth or security setting, so retry won't help bypass them.

image

@TingluoHuang TingluoHuang requested a review from a team as a code owner April 29, 2026 14:26
Copilot AI review requested due to automatic review settings April 29, 2026 14:26
}
}
catch (Exception ex) when (!(ex is OperationCanceledException) && !executionContext.CancellationToken.IsCancellationRequested)
catch (Exception ex) when (!(ex is AccessDeniedException) && !(ex is OperationCanceledException) && !executionContext.CancellationToken.IsCancellationRequested)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this will make sure we don't report the error to server.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the action archive download path in ActionManager to treat HTTP 403 (Forbidden) as a non-retryable failure, based on the assumption that it represents a client-side authorization/policy problem rather than a transient error.

Changes:

  • Detect HttpStatusCode.Forbidden when downloading an action archive and throw AccessDeniedException immediately (no retry).
  • Add a dedicated catch (AccessDeniedException) inside the retry loop for logging.
  • Adjust the outer exception filter to exclude AccessDeniedException from being wrapped.
Show a summary per file
File Description
src/Runner.Worker/ActionManager.cs Adds explicit handling for 403 responses during action archive downloads to avoid retrying.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 4

Comment thread src/Runner.Worker/ActionManager.cs
Comment thread src/Runner.Worker/ActionManager.cs
Comment thread src/Runner.Worker/ActionManager.cs
Comment thread src/Runner.Worker/ActionManager.cs
@TingluoHuang TingluoHuang merged commit 4550db3 into main Apr 29, 2026
16 checks passed
@TingluoHuang TingluoHuang deleted the users/tihuang/403 branch April 29, 2026 14:44
github-actions Bot pushed a commit to johngeorgewright/actions-runner that referenced this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants