Skip to content
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

Dangling Commits cause bad PR checkouts #646

Open
jeffreye-intel opened this issue Dec 2, 2021 · 4 comments
Open

Dangling Commits cause bad PR checkouts #646

jeffreye-intel opened this issue Dec 2, 2021 · 4 comments

Comments

@jeffreye-intel
Copy link

Related to #299 and #237, we've found that a dangling/unreachable commit following a force push is now being used as the merge commit on every PR in the repository. We've tested several prior versions of actions/checkout and have reproduced the result. This run occurs in a private repository, so I can't share the log and commit info unfortunately.

@jeffreye-intel
Copy link
Author

Found this occurs when the runner side git repo ends up in the detached head state. When in that state, the action seems to be unable to find the appropriate commit, but "git checkout " in the repo does properly find the commit.

@thastings3
Copy link

We are hitting the same symptom as well - and possibly due to the same cause. I can see one dangling commit but unsure how to get the runner side git repo back into a good state

@thastings3
Copy link

thastings3 commented Dec 6, 2021

In converting our build step from:

on: 
  pull_request:
    branches: 
      - main
  push:
    branches:
      - main

to:

on: push

We were then able to successfully snag the correct SHA for our staging level builds. So maybe I was just seeing a similar symptom but a totally different cause

@marcandrews
Copy link

I created a branch from an older commit and added commits to this branch and I experiencing this build issue as well. @thastings3 solution seems to have resolved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants