Skip to content
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

Throw NonRetryableException on GetNextMessage from broker as needed. #2828

Merged
merged 1 commit into from Sep 5, 2023

Conversation

TingluoHuang
Copy link
Member

@TingluoHuang TingluoHuang commented Sep 5, 2023

The runner exit itself as expected instead of a infinite restart loop.

@TingluoHuang ➜ /workspaces/actions/runner/_layout $ ./run.sh 
Current runner version: '2.308.0'
2023-09-05 18:10:10Z: Listening for Jobs
2023-09-05 18:10:56Z: Runner connect error: Failed to get job message: Error: Not Found. Retrying until reconnected.
An error occurred: Get next message failed with non-retryable error.
Runner listener exit with terminated error, stop the service, no retry needed.
Exiting runner...

@TingluoHuang TingluoHuang requested a review from a team as a code owner September 5, 2023 20:59
@@ -108,7 +108,7 @@ public async Task<TaskAgentMessage> GetNextMessageAsync(CancellationToken token)

if (!IsGetNextMessageExceptionRetriable(ex))
{
throw;
throw new NonRetryableException("Get next message failed with non-retryable error.", ex);
Copy link
Member Author

Choose a reason for hiding this comment

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

We didn't do this with the other Listener since we are preventing the loop during CreateSeesion.

Since the broker listener doesn't really have a concept for create session, i need to break out the loop at here for now.

@TingluoHuang TingluoHuang merged commit d2f0a46 into main Sep 5, 2023
10 checks passed
@TingluoHuang TingluoHuang deleted the users/tihuang/runnerdel branch September 5, 2023 21:21
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.

None yet

2 participants