-
Notifications
You must be signed in to change notification settings - Fork 25.7k
set fetch-depth: 1 #75783
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
set fetch-depth: 1 #75783
Conversation
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 91a40b0 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
| # deep clone, to allow use of git merge-base | ||
| fetch-depth: 0 | ||
| # --depth=1 for speed, manually fetch history and other refs in workflows as necessary | ||
| fetch-depth: 1 |
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.
🎉
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.
Mostly LGTM but seems like a good opportunity to move some of the repeated code blocks into composite actions to make them easier to update later on
.github/workflows/lint.yml
Outdated
| - name: Checkout rest of history and master | ||
| env: | ||
| HASH: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha }} | ||
| run: git fetch --no-tags --prune --no-recurse-submodules --unshallow origin "${HASH}" master |
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.
Would it make sense to make these repeated code blocks just composite actions?
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.
+1 could these be rolled into the checkout pytorch composite action?
6444e9f to
1b73e0b
Compare
606c46a to
3837900
Compare
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.
woooooooo~
|
Though I think you should change the PR title cuz you're doing the opposite |
|
@pytorchbot merge this please |
Fixes #ISSUE_NUMBER Follow up to #75783 Inputs are always strings, and the string wasn't empty, so the if statement always evaluated to true, so it always checked out the extra branches. Add check that the input is literally 'true' in order to checkout the extra branches tested via #75955 Pull Request resolved: #75957 Approved by: https://github.com/seemethere
Summary: Fixes #ISSUE_NUMBER tested via #75232 b/c need to change the source of the workflow - set fetch-depth: 1 - manually checkout additional branches/history (usually either viable/strict, or master and the rest of the commit's history) when needed - seems to reduce checkout time by about 30s for jobs that don't need additional branches/history, but minimal improvement otherwise - checkouts for most lint jobs now takes <15s Rough estimates for how long different parts of checkout take on linux (windows is similar, but scaled up): - just the commit, no history: <15s, seems to be around 6-7s - viable/strict: 25-30s - submodules: 80-120s - master + commit history: 40-50s (if checked out viable/strict before this, then this time is much smaller, <10s) Pull Request resolved: #75783 Approved by: https://github.com/seemethere, https://github.com/janeyx99 Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/991c89b2d12ce46d618969767b931016e049fecb Reviewed By: mehtanirav Differential Revision: D35721631 Pulled By: clee2000 fbshipit-source-id: e7dc833a34caa64e81c3b1c67124f78cd4ef74d7
Summary: Fixes #ISSUE_NUMBER Follow up to #75783 Inputs are always strings, and the string wasn't empty, so the if statement always evaluated to true, so it always checked out the extra branches. Add check that the input is literally 'true' in order to checkout the extra branches tested via #75955 Pull Request resolved: #75957 Approved by: https://github.com/seemethere Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/cdbd39ba5714d37398c261a283ede26754e1025e Reviewed By: seemethere Differential Revision: D35751449 Pulled By: clee2000 fbshipit-source-id: e8afbdaceffe056827f484d3c6ad3ece5eb96452
Fixes #ISSUE_NUMBER undo #75783 b/c setting fetch depth 1 doesn't really help reduce time b/c most of the jobs need either master or viable/strict also, more branches need viable/strict than i thought, so sharding isn't picking up test times (although default sharding seems to do pretty well) (regarding the jobs i didn't realize needed viable/strict: it looks like the linux-bionic jobs don't fail when `git rev-parse viable/strict` is run but viable/strict doesn't exist but the linux-xenial ones do) pretty sure jobs are broken only b/c its using the master version of `checkout-pytorch/action.yml` tested via #76077 Pull Request resolved: #76090 Approved by: https://github.com/seemethere
Fixes #ISSUE_NUMBER Follow up to #75783 Inputs are always strings, and the string wasn't empty, so the if statement always evaluated to true, so it always checked out the extra branches. Add check that the input is literally 'true' in order to checkout the extra branches tested via #75955 Pull Request resolved: #75957 Approved by: https://github.com/seemethere (cherry picked from commit cdbd39b)
Fixes #ISSUE_NUMBER undo #75783 b/c setting fetch depth 1 doesn't really help reduce time b/c most of the jobs need either master or viable/strict also, more branches need viable/strict than i thought, so sharding isn't picking up test times (although default sharding seems to do pretty well) (regarding the jobs i didn't realize needed viable/strict: it looks like the linux-bionic jobs don't fail when `git rev-parse viable/strict` is run but viable/strict doesn't exist but the linux-xenial ones do) pretty sure jobs are broken only b/c its using the master version of `checkout-pytorch/action.yml` tested via #76077 Pull Request resolved: #76090 Approved by: https://github.com/seemethere (cherry picked from commit 5477f0a)
Summary: Fixes #ISSUE_NUMBER undo #75783 b/c setting fetch depth 1 doesn't really help reduce time b/c most of the jobs need either master or viable/strict also, more branches need viable/strict than i thought, so sharding isn't picking up test times (although default sharding seems to do pretty well) (regarding the jobs i didn't realize needed viable/strict: it looks like the linux-bionic jobs don't fail when `git rev-parse viable/strict` is run but viable/strict doesn't exist but the linux-xenial ones do) pretty sure jobs are broken only b/c its using the master version of `checkout-pytorch/action.yml` tested via #76077 Pull Request resolved: #76090 Approved by: https://github.com/seemethere Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/5477f0ae60d40f3fcc138a0292608afd753c8569 Reviewed By: seemethere Differential Revision: D35785884 Pulled By: clee2000 fbshipit-source-id: 66e3bf8b1fec837632e416c49e85b78e6d7ebc5f
Fixes #ISSUE_NUMBER
tested via #75232 b/c need to change the source of the workflow
Rough estimates for how long different parts of checkout take on linux (windows is similar, but scaled up):