-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix github action "performance-8.0" when PR is from a fork. #35192
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
Fix github action "performance-8.0" when PR is from a fork. #35192
Conversation
szaimen
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.
Thanks
|
|
Thanks for kicking the builds off (first time contributor so they wont kick off automatically). Now that they've run and we can see that error, I'll tweak then amend the commit, which should kick off a new build, then comment back once it is building as expected. |
d9372cc to
ba88faf
Compare
|
Oh gosh, it needs approval every time I make a change. Let me go try forking my fork, so that I can simulate this without having to bother you all. Will report back when I am more confident in the solution. |
ba88faf to
753ef54
Compare
|
Okay, have tried this with a fork-of-a-fork requesting a PR to my fork, and it now should work as expected. Code is more explicit and probably what I would do if I was typing the commands out manually (create a new remote, and use that remote when fetching and referring to remote refs). |
There is an assumption that the PR is from the same remote as the base it is being merged into. This is fixed so that instead of doing a `git fetch origin`, it now fetches from the `clone_url` of the PR head. Signed-off-by: Peter Serwylo <[email protected]>
753ef54 to
56aee55
Compare
|
Phew, think we're doing the right thing now, hopefully good to go: https://github.com/nextcloud/server/actions/runs/3479487910/jobs/5818120859 |
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
|
Thanks a lot for that @pserwylo 👍 |
|
/backport to stable25 |

I noticed in another PR of mine that the
performance-8.0test was failing, where it was passing for many other PRs. On inspection, there were others PRs where this failed, and all of them were where the PR came from a fork rather than a branch in this repo.This is because there is an assumption in the workflow that the PR is from the same origin as the base it is being merged into. This is fixed so that instead of doing a
git fetch origin, it now fetches from theclone_urlof the PR head.Subsequent to fetching commits from that repository, it then clones based on sha1 instead of branch name. This is because we didn't name the remote when performing a fetch, so can't use the syntax
remote-name/ref(e.g. "myusername/fix-issue-12").We could equally go and add a remote before fetching, then fetch from that remote (e.g
git add remote head ...&&git fetch head) which would then let usgit merge head/${{ ref }}- it doesn't really matter which way we do it.