-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove GHA "Checkout PR tip" step #53719
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
Conversation
💊 CI failures summary and remediationsAs of commit 5ff823a (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
facebook-github-bot
left a comment
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.
@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Codecov Report
@@ Coverage Diff @@
## master #53719 +/- ##
==========================================
- Coverage 77.64% 77.64% -0.01%
==========================================
Files 1869 1869
Lines 182385 182385
==========================================
- Hits 141617 141610 -7
- Misses 40768 40775 +7 |
facebook-github-bot
left a comment
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.
@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: This PR replaces our current "Checkout PR tip" step (which is duplicated across many places) using a [scenario](https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit) from the `actions/checkout` README. We previously tried something similar in pytorch#49578, but using `github.head_ref` didn't work. The reason this PR works is because, for events besides `pull_request`, the value of `github.event.pull_request.head.sha` defaults to the empty string, so it's as if we didn't set the `ref` option for `actions/checkout` at all, so it just uses its default behavior (e.g. for `push` events). Incidentally, this PR also upgrades our use of `actions/checkout` from `v1` to `v2`, which introduces shallow clones by default. A couple of our jobs require deep clones, so we use `fetch-depth: 0` in those cases. Pull Request resolved: pytorch#53719 Test Plan: CI. Reviewed By: albanD Differential Revision: D26949121 Pulled By: samestep fbshipit-source-id: e06f8066682ae0557fb5a055a10ea33b6bd320db
This PR replaces our current "Checkout PR tip" step (which is duplicated across many places) using a scenario from the
actions/checkoutREADME. We previously tried something similar in #49578, but usinggithub.head_refdidn't work.The reason this PR works is because, for events besides
pull_request, the value ofgithub.event.pull_request.head.shadefaults to the empty string, so it's as if we didn't set therefoption foractions/checkoutat all, so it just uses its default behavior (e.g. forpushevents).Incidentally, this PR also upgrades our use of
actions/checkoutfromv1tov2, which introduces shallow clones by default. A couple of our jobs require deep clones, so we usefetch-depth: 0in those cases.Test plan:
CI.