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 error for sparse checkout #8019

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Conversation

benbp
Copy link
Member

@benbp benbp commented Apr 3, 2024

No description provided.

@benbp benbp requested a review from konrad-jamrozik as a code owner April 3, 2024 23:59
@benbp benbp added the Central-EngSys This issue is owned by the Engineering System team. label Apr 3, 2024
@benbp benbp requested a review from weshaggard as a code owner April 3, 2024 23:59
@benbp benbp self-assigned this Apr 3, 2024
@benbp benbp requested a review from danieljurek April 4, 2024 00:00
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@@ -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) ."
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow


# 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'
}

Copy link
Member

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.

Copy link
Member Author

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.

@benbp benbp enabled auto-merge (squash) April 10, 2024 18:47
azure-sdk added a commit to Azure/azure-sdk-for-js that referenced this pull request Apr 10, 2024
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]>
@benbp benbp merged commit d2d557d into main Apr 10, 2024
10 checks passed
@benbp benbp deleted the benbp/sparse-checkout-retry branch April 10, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants