-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
perf(CI): Shallow git clone that works with PRs from forks #19757
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [d7d0a6f]
Page Load Metrics (1734 ± 38 ms)
Bundle size diffs
|
Codecov Report
@@ Coverage Diff @@
## develop #19757 +/- ##
========================================
Coverage 69.83% 69.83%
========================================
Files 980 980
Lines 36886 36886
Branches 9890 9890
========================================
Hits 25757 25757
Misses 11129 11129 |
|
||
# Set up SSH access | ||
# This SSH key is the current github.com SSH key as of June 2023, but it will need to be changed whenever github changes their key (probably every few years) | ||
GITHUB_SSH_KEY="AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" |
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.
Should this be a secret?
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.
No, it's GitHub's public key
.circleci/config.yml
Outdated
set -u | ||
set -o pipefail | ||
|
||
# This Shallow Git Clone code is adapted from what the standard CircleCI `checkout` command does for the case of an external PR (specifically pull/19693): |
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.
Could you add a link to where we can find these steps (ideally a permalink)? So that we can verify this in the future and compare it with future versions of that command.
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.
I added a link, but I don't know how long CircleCI keeps these logs around
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.
Ah, I thought you found it in some source code repository or something. Didn't realize it was from logs
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.
I originally found it from logs, and when you asked, I tried to find it in source, but I think it's in the closed-source part of CircleCI.
Co-authored-by: Brad Decker <[email protected]> Co-authored-by: Mark Stacey <[email protected]> Co-authored-by: legobeat <[email protected]>
d7d0a6f
to
368abe9
Compare
Builds ready [368abe9]
Page Load Metrics (1509 ± 39 ms)
Bundle size diffs
|
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.
LGTM!
Explanation
Reboot of #18783 and #18491
Does a
git clone --depth 1
to speed up every step of the CI by 11 secondsNow properly works with PRs from forks
I'm not sure how to actually test the
CIRCLE_TAG
code path, because GitHub doesn't let you make a PR from a tag. It might happen during the release process?