Skip to content

Use sparse checkout instead of remote tracking#25847

Merged
sima-zhu merged 3 commits into
Azure:mainfrom
sima-zhu:fix_fetch
Dec 8, 2021
Merged

Use sparse checkout instead of remote tracking#25847
sima-zhu merged 3 commits into
Azure:mainfrom
sima-zhu:fix_fetch

Conversation

@sima-zhu
Copy link
Copy Markdown
Contributor

@sima-zhu sima-zhu commented Dec 7, 2021

Description

git remote + git fetch together is doing clone job which downloads all delta changes besides of /metadata/, package.json.

Using sparse checkout is less expensive for docs repo.

Testing pipeline: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1233606&view=logs&j=5e8cddd4-765d-5046-f31f-2d7d6b215293&t=f589ca01-2aac-4ede-b74c-f8d152bfdd02

Error one: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1233498&view=logs&j=dc056dfc-c0cf-5958-c8c4-8da4f91a3739&t=d08ed1f2-0ec2-5498-48a9-682643d126ca

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.


# git fetch on fork repo
Write-Host "git fetch $remoteName $(DailyDocsBranchName)"
git fetch $remoteName "$(DailyDocsBranchName)"
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.

@benbp it would be good to understand why adding another remote and then fetching a branch to checkout doesn't work as expected when using sparse checkout. https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1233498&view=logs&j=dc056dfc-c0cf-5958-c8c4-8da4f91a3739&t=d08ed1f2-0ec2-5498-48a9-682643d126ca

Copy link
Copy Markdown
Contributor Author

@sima-zhu sima-zhu Dec 8, 2021

Choose a reason for hiding this comment

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

Based on git man documentation, git fetch do downloading the deltas besides of sparse checkout files.
There is no sparse checkout like functionality for git fetch
https://git-scm.com/docs/git-remote#Documentation/git-remote.txt-emaddem

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

I don't think that is the same situation that we have here. We already do the no-checkout on clone but we should be able to add a remote and then fetch a new set of commits down and checkout just those changes.

@sima-zhu sima-zhu merged commit f550ea2 into Azure:main Dec 8, 2021
@sima-zhu sima-zhu deleted the fix_fetch branch December 8, 2021 00:23
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-java that referenced this pull request Sep 20, 2023
Rename Microsoft.StorageTasks to Microsoft.StorageActions (Azure#25847)

* Replace Microsoft.StorageTasks to Microsoft.StorageActions

* Updating readme.md file and OperationsList Example
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.

3 participants