-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Checking out wrong commit? #299
Comments
Local discussion of issue: golangci/golangci-lint#1229 |
This is similar to #237 |
Same happens when using with I've described more details at #237 (comment) |
@andymckay fyi |
This looks quite serious (allows to sneak not validated code as valid) @ericsciple is there any specific timeline for this? |
I was able to use the following work-around:
|
This affects us, we found this documentation: https://developer.github.com/v3/pulls/#response-1. I searched code in this repository for mergeable and merge_commit_sha, but couldn't find anything. Feels like it's related. |
I'm having the same problem in this pull request run: https://github.com/ssantichaivekin/empress/runs/900765234 It seems that this can be fixed by making a commit that is up to date with the current |
We just ran into what I think is another instance of this issue in https://github.com/DFHack/scripts/runs/910104637?check_suite_focus=true#step:4:375 About 2 minutes after re-running the check reproduced the issue, I ran this locally, which resulted in fetching a correct merge, so I'm pretty sure the issue is on the action's end:
|
Revert actions/checkout to V1 from V2, as there are existing bugs within checkout@V2 causing it to possibly checkout the wrong commit SHA. See: - actions/checkout#299 - quisquous#1600
Revert actions/checkout to V1 from V2, as there are existing bugs within checkout@V2 causing it to possibly checkout the wrong commit SHA. See: - actions/checkout#299 - #1600
v2 uses the wrong commit sometimes (seen on #152 and #159 so far): actions/checkout#299
v2 uses the wrong commit sometimes: actions/checkout#299
v2 uses the wrong commit sometimes: actions/checkout#299
try to fix problem, when GHA running not on the latest commit. It causes here https://github.com/insolar/assured-ledger/pull/568/checks?check_run_id=901992719 look at commit hashes in "checkout code" job and in left up corner <img width="1119" alt="image" src="https://user-images.githubusercontent.com/5444090/88382164-9078de80-cdb0-11ea-95c2-29b06f44e23c.png"> discussion where i take this solution actions/checkout#299 I never done this before, so i hope I do it right
Seeing this issue as well with the v2 of checkout.
The commit *hashC still checked out *hashA code to run tests on. |
+1 I had the same issue with this run and noticed because the commit was introducing a modification to the workflow YAML file that was not honored. A few of our contributors reported the same too, for instance in this PR spack/spack#17755 If it matters, in my case the issue was with a force pushed commit on a PR where tests on previous commits were still running. |
@hashtagchris should i set you as the assignee? |
@ericsciple which issue should we follow this one (#299) or #237? |
I believe this is a dupe of #237, please see my comment here: #237 (comment) |
This seems to happen for me still, my action is checking out the wrong branch, static analysis is complaining about code which it's not supposed to be testing. 🤔 |
Workaround for actions/checkout#299
Workaround for actions/checkout#299
Workaround for actions/checkout#299
Beware: this checks out the current head of the branch, whereas by Is there a way to check out the correct merge commit without race |
@wchargin You can wait for the merge_commit_sha
I have not released my actions from ReleaseManager yet so here is the typescript code.
|
@tonyhallett: This is also incorrect, because it fetches the most
If at point (5) you fetch the current merge commit for PR 123, you |
The GitHub Checkout Actions checks out the wrong commit when the commit is force-pushed. This error is known and reported already. (actions/checkout#299) To fix this error, we use the sha provided by the pull request.
The GitHub Checkout Actions checks out the wrong commit when the commit is force-pushed. This error is known and reported already. (actions/checkout#299) To fix this error, we use the sha provided by the pull request.
Closing, this is a dup of #237 and was resolved there. If you believe that you're seeing any problems here, please contact support. |
The GitHub Checkout Actions checks out the wrong commit when the commit is force-pushed. This error is known and reported already. (actions/checkout#299) To fix this error, we use the sha provided by the pull request.
…counted for This happens in open pull requests when new commits are pushed to the merged branch. See actions/checkout#299
I just introduced a failing test into the main branch of a project; the failing tests (introduced in the commit triggering the build) appeared not to have run in the PR build.
When I look at the
actions/checkout
output, I am surprised by what I see.Specifically, the build is running on commit
2dca06e
-- however,actions/checkout
appears to be merging the prior commit --c0121d5
-- (without the tests) into the project's main branch.Is this expected?
The project's checkout configuration is completely vanilla: https://github.com/golangci/golangci-lint/blob/master/.github/workflows/pr.yml#L46
The text was updated successfully, but these errors were encountered: