Skip to content

Add retry on error for sparse checkout#8019

Merged
benbp merged 3 commits intomainfrom
benbp/sparse-checkout-retry
Apr 10, 2024
Merged

Add retry on error for sparse checkout#8019
benbp merged 3 commits intomainfrom
benbp/sparse-checkout-retry

Conversation

@benbp
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Write-Host "git sparse-checkout set --no-cone '/*' '!/*/' '/eng'"
git sparse-checkout set --no-cone '/*' '!/*/' '/eng'
}

Copy link
Copy Markdown
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
Copy Markdown
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 <bebroder@microsoft.com>
@benbp benbp merged commit d2d557d into main Apr 10, 2024
@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

Development

Successfully merging this pull request may close these issues.

4 participants