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

fix: Preventing merging without running atlantis apply on Gitlab #4651

Merged
merged 6 commits into from
Jun 15, 2024
Merged

fix: Preventing merging without running atlantis apply on Gitlab #4651

merged 6 commits into from
Jun 15, 2024

Conversation

shurkus
Copy link
Contributor

@shurkus shurkus commented Jun 11, 2024

what

Preventing merging without running atlantis apply on Gitlab

why

Preventing merging without running atlantis apply on Gitlab

tests

  • I have tested my changes

references

#4372

@shurkus shurkus requested review from a team as code owners June 11, 2024 22:19
@shurkus shurkus requested review from GenPage, nitrocode and X-Guardian and removed request for a team June 11, 2024 22:19
@github-actions github-actions bot added the go Pull requests that update Go code label Jun 11, 2024
@shurkus shurkus changed the title Preventing merging without running atlantis apply on Gitlab #4372 fix: Preventing merging without running atlantis apply on Gitlab Jun 11, 2024
@chenrui333
Copy link
Member

I have fixed the tests per #4653 refreshed the pr and rerun

@chenrui333
Copy link
Member

chenrui333 commented Jun 12, 2024

@shurkus please rebase your PR to the latest main branch. (I actually cannot refresh your branch due to permission denied issue)

For future pull requests, please allow maintainers to edit your PR to simplify the merge process.

@shurkus
Copy link
Contributor Author

shurkus commented Jun 13, 2024

@chenrui333 rebased also allow edit

@chenrui333 chenrui333 added provider/gitlab bug Something isn't working labels Jun 14, 2024
@chenrui333 chenrui333 merged commit e286690 into runatlantis:main Jun 15, 2024
28 checks passed
@chenrui333
Copy link
Member

Thanks @shurkus!

@Unibozu
Copy link

Unibozu commented Jul 3, 2024

Hi @shurkus @chenrui333

I wanted to highlight this feels like a breaking change in the way atlantis works with Gitlab Merge Requests, not a fix. This should be behind a feature flag, documented and fully tested (not just a "it works on my machine").

Especially as it's a weird workaround (the apply steps will always look like it's "running") with Gitlab lacking a way to enforce passing a certain CI job to merge an MR. The other difference is that on Github I can control which repositories require this enforcement, while this change will make all MRs on Gitlab requiring an apply before becoming mergeable.

Can we consider to revert the changes until this is better implemented?

@lukemassa
Copy link
Contributor

I agree that this should be reverted as we come up with a more holistic solution here, for a few reasons:

  1. This is a breaking change that changes behavior, not a fix
  2. I'm not sure why this is implemented only for auto plans and not for comment plans
  3. This makes it look like atlantis apply is "stuck", which is best case confusing, and worst case might have some other effects (e.g. interact poorly with mergeable)

I think one issue is the semantics of "pending" are different in gitlab and github, and I think we should either commit to unifying the two notions, or acknowledging they are different and document them differently.

I definitely want to address these issues, and maybe pre-emptively making "apply" be running is part of that solution, but I think it requires more discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code provider/gitlab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants