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

Draft PRs in Github #491

Closed
liorrozen opened this issue Feb 24, 2019 · 3 comments
Closed

Draft PRs in Github #491

liorrozen opened this issue Feb 24, 2019 · 3 comments
Labels
feature New functionality/enhancement

Comments

@liorrozen
Copy link

liorrozen commented Feb 24, 2019

Sent on behalf of TailorBrands

Issue:

atlantis commands are not being executed when a PR changes from draft to open
Atlantis version: 0.4.13
Steps to reproduce:

  1. Create a draft PR in a repository
  2. Run atlantis commands (plan)
  3. Take the PR out of "draft" status
  4. Atlantis commands are no longer executed

Logs:

There are no logs to include since nothing is printed when the PR is opened or atlantis commands are executed.

Summary:

Hello, we are experiencing some strange issues with our PRs and atlantis. It seems as if once a PR has been opened as a draft, atlantis is able to execute plan commands but as soon as the PR is taken out of "draft" status, no atlantis commands are being recognised. This is not a "command not found" error - rather atlantis seems to be completely ignoring the PR. Furthermore, with autoplan enabled in the repos atlantis.yaml file, I do see the github check for atlantis but once I push another commit to the PR, the atlantis check disappears.

@lkysow
Copy link
Member

lkysow commented Feb 25, 2019

Hi Lior,
So in my testing GitHub (right now) doesn't send any events when a pull request is marked as "ready for review'.

My ideal workflow would be:

  1. Atlantis ignores new draft pull requests (because it's a draft so you're probably not ready to run terraform on it)
  2. When the pull request is marked as "ready for review", then it's treated as a new pull request and you get autoplan, etc.

However we can't do 2. right now because we don't get any event.

I think for now, Atlantis should ignore draft pull requests and then require you to manually run plan once the pull request transitions to ready for review.

Regarding your bug:

but as soon as the PR is taken out of "draft" status, no atlantis commands are being recognised.

I'm not able to replicate this behaviour. When I take a pull request out of draft I'm still able to run plan/apply commands without any issue. (See this PR for an example of it working) To help me debug, can you send me the logs and also look into the webhook history via the GitHub UI and tell me what the response is to the comment events once the pull request changes to ready for review.

@majormoses
Copy link
Contributor

If it ever does support sending the payloads my ideal workflow would be:

  1. open draft PR, autoruns plan, discards plan output (or does not store the plan) or create any atlantis locks (it would still create the terraform locks itself)
  2. When a plan is "ready" the pull request is transitioned to a regular pull request and it acts as normal (would do the auto plan unless disabled via config)

My rationale would be that its useful while you are developing terraform modules to see the output of a plan while you are working on it without having to bug anyone until its ready which is a main reason for draft PRs.

My org at work is grandfathered into the old plan so I can't play with them too much but I wish I had them 😞 for some reason github decided that older plans don't get that new feature.

@lkysow
Copy link
Member

lkysow commented Apr 21, 2020

Closed by #977

@lkysow lkysow closed this as completed Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement
Projects
None yet
Development

No branches or pull requests

3 participants