-
Notifications
You must be signed in to change notification settings - Fork 183
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 error for sparse checkout #8019
Conversation
The following pipelines have been queued for testing: |
@@ -48,10 +65,10 @@ steps: | |||
|
|||
if ($repository.Commitish -match '^refs/pull/\d+/merge$') { | |||
Write-Host "git clone --no-checkout --filter=tree:0 -c remote.origin.fetch='+$($repository.Commitish):refs/remotes/origin/$($repository.Commitish)' https://github.com/$($repository.Name) ." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move the command logging into this retry function now as well? Just a way to save some lines of our inline script and also reduce some duplication of the command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I could move all logging into the function, and make it a generic runner with a retries int, that way we can pass all commands through it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weshaggard ok made this update here. Overdue anyway.
The following pipelines have been queued for testing: |
|
||
# Set non-cone mode otherwise path filters will not work in git >= 2.37.0 | ||
# See https://github.blog/2022-06-27-highlights-from-git-2-37/#tidbits | ||
Write-Host "git sparse-checkout set --no-cone '/*' '!/*/' '/eng'" | ||
git sparse-checkout set --no-cone '/*' '!/*/' '/eng' | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you remember why we used Invoke-Expression in the lines below? If not needed we could use the Run there as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a lot of issues with commands that contained any sort of glob/wildcard when sourcing those values dynamically. We may be able to improve upon this by using invoke expression everywhere, I will have to test it out.
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#8019 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: Ben Broderick Phillips <[email protected]>
No description provided.