atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

GitHub: Checks rerunning on duplicate PR's

Open snorlaX-sleeps opened this issue 3 years ago • 2 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

This may not be a valid case, but noticed while testing an Atlantis installation:

  • I have a main branch where Atlantis is integrated, which plans successfully, no applies run yet.
  • Created a duplicate branch from this branch and created a PR - atlantis unlock was run on the initial branch.

When running plans on the duplicate branch (by duplicate I mean the same commits), both branches report the same status checks at the bottom:

  • so when I forgot to atlantis unlock the original PR, both branches reported failures
  • when I successfully plan on the second PR, both branches report a success

I am wondering if this is because of how status checks are reported? Is it based on the latest commit ID? I have only noticed this happening since the individual "plan" status checks for each workspace / project were added, unsure if it was occurring before. Also note this is during an Atlantis installation, so I am modifying every workspace in my repo.

This installation is a Kubernetes statefulset Looking on the Atlantis pod, I can see the initial PR's workspaces have all been deleted after the unlock, leaving only the "default"

Reproduction Steps

  1. Create a branch, run some atlantis plans
  2. Create a second branch from the first (pointing to the same "source" branch, in my case main)
  3. Run atlantis plan
  4. Both branches should report the status from the second branch

Logs

Logs look like standard plan and apply logs, there is the commit ID mentioned when doing pulls and plans.

Environment details

Kubernetes version: v1.21

Running a statefulset with a lot of environment variables

Atlantis version: latest / v0.19.2

Repo Config:

repos:
- id: /.*/
  apply_requirements: [approved, mergeable]
  allowed_overrides: [apply_requirements, workflow, delete_source_branch_on_merge]
  allow_custom_workflows: true

Additional Context

Both PR's showing identical status checks while planning image

snorlaX-sleeps avatar Apr 07 '22 18:04 snorlaX-sleeps

is this still happening in v0.19.8?

jamengual avatar Aug 26 '22 04:08 jamengual

Unsure @jamengual - we are still using the nightly build created by this PR: #2180 So haven't got any new features. We require parallel plans to support workspaces with the same name aka <product>-<region_code> and need that change in before we can upgrade.

snorlaX-sleeps avatar Aug 26 '22 11:08 snorlaX-sleeps