atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

can't apply PR - suspect it's because commit has two parents

Open camilosantana opened this issue 7 years ago • 3 comments

steps to recreate

  • create branch A
  • create PR against master from branch A
  • create branch B from branchA
  • make changes to branch B
  • create PR against branch A from branch B
  • merge branch B into branch A
  • atlantis plan in the original PR
  • atlantis apply
    • Ran Apply for 0 projects:

this is what i see in atlantis logs

2019/03/05 22:58:57+0000 [EROR] company/repo#119: Will re-clone repo, could not determine if was at correct commit: git rev-parse HEAD^2: exit status 128: HEAD^2
fatal: ambiguous argument 'HEAD^2': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

camilosantana avatar Mar 05 '19 23:03 camilosantana

note: it's possible that this happens because the original PR started as a draft PR

camilosantana avatar Mar 05 '19 23:03 camilosantana

I think I answered the reason you're not getting applies in slack? You need to add -out $PLANFILE to your terraform plan command.

Atlantis recovers from the error you posted above and just re-clones the repo so it's more like a warning. It doesn't stop anything from working.

lkysow avatar Mar 06 '19 13:03 lkysow

confirmed. adding -out $PLANFILE to custom steps resolved issue. thanks @lkysow

camilosantana avatar Mar 20 '19 00:03 camilosantana