GitHub Actions is referencing old code

We have an action for doing a website build. This build is failing in GitHub Actions, and the error it’s throwing is based on an issue from 15 commits prior. We have pulled down the PR multiple times and confirmed that the code referenced in the build error doesn’t exist anywhere in the codebase, except for 15 commits behind PR branch head.

We haven’t been able to find any issues on our end. GitHub Status shows no known incidents for Actions. We’re at a total loss. It’s like the runner keeps referencing old code and it doesn’t update.

Does anyone have any clue what might be going on here? Are there any known issues with Actions in a PR getting stuck on an old commit?

Is this the best place to get a quick response to this type of issue?

Thanks,
Luke Pighetti

git log -n 2 is only showing one commit. Not sure if something funny goes on behind the scenes with actions.

commit 9cb723c5e38a812aeddff425176092fb4b3580db
10
Author: Luke Pighetti <xxxxxx@xxxxx.com>
11
Date:   Tue Mar 23 07:41:55 2021 -0400
12

13
    Merge aeee948754c9487e3f7f3428eb6af8bf939beb25 into c8263130b6414b4efe40ecf41631ff787dc9f97c

Meanwhile the commit being tested is aeee948. master head is c826313. Is it possible that there are merge conflicts that are showing up only in Actions? This PR branch is a hefty refactor.

Pull request builds run on a temporary merge commit, that’s the commit you’re seeing in the git log output. By default actions/checkout does a shallow clone with only the last commit, which is why you’re not seeing more (set fetch-depth if you want to change that).

Why the merge looks the way it does is impossible without seeing the code, but the solution will be to either merge the target branch into your feature branch, or to rebase the feature branch on the target branch. In that process you may have to resolve conflicts or otherwise make adjustments to ensure things are merged the way you want it.

1 Like

I think you nailed it. We ended up doing a Merge commit to master and in doing so the conflict popped out (but wasn’t considered a merge conflict) and we were able to issue a one liner fix to resolve. Any insights as to what might have happened?

The confusing part to me is why GitHub Actions would have been including that commit that wasn’t merged into the feature branch. Is this normal?

1 Like