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

Add retry on specific git output #5747

Merged
merged 8 commits into from
Mar 22, 2023
Merged

Conversation

scbedd
Copy link
Member

@scbedd scbedd commented Mar 18, 2023

Attempts to address #5660

Given the fact that we're shelling out and the exit code isn't different for every error, this looks like the way to go.

@scbedd scbedd requested a review from mikeharder as a code owner March 18, 2023 00:09
@scbedd scbedd requested a review from benbp March 18, 2023 00:09
@scbedd scbedd self-assigned this Mar 18, 2023
@scbedd
Copy link
Member Author

scbedd commented Mar 18, 2023

/azp run tools - test-proxy - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scbedd
Copy link
Member Author

scbedd commented Mar 18, 2023

/azp run tools - test-proxy - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

… when IsRetriableGitError is definitely the abstraction I needed to keep it simple
@scbedd
Copy link
Member Author

scbedd commented Mar 22, 2023

/azp run tools - test-proxy - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scbedd
Copy link
Member Author

scbedd commented Mar 22, 2023

/azp run tools - test-proxy - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

StdOut = stdOut,
Arguments = arguments
};
attempts++;
Copy link
Member Author

Choose a reason for hiding this comment

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

for @benbp

enter loop, attempts = 1
invoke command, continueToAttempt = true
attempts = 2
delay 4 seconds because continueToAttempt = true
invoke command, continueToAttempts = true
attempts = 3
delay 6 seconds because continueToAttempt = true
invoke command, continueToAttempts = true
attempts = 4
we do not delay before exiting the loop, because 4 is not < max retry count and we won't be retrying anyway

For a grand total of 3 attempts, 2 retries. I'm good with this to start.

@scbedd
Copy link
Member Author

scbedd commented Mar 22, 2023

/azp run tools - test-proxy - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scbedd scbedd merged commit 5390bfe into Azure:main Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants