This message was deleted.
# atlantis-community
s
This message was deleted.
o
1. I have
ATLANTIS_GH_ALLOW_MERGEABLE_BYPASS_APPLY
set to
true
. 2. These are my server-side configuration options:
Copy code
apply_requirements: [approved, undiverged]
allowed_overrides: [apply_requirements, workflow]
3. I'm also using GitHub App for Atlantis authentication to GitHub and nothing has been changed there in regards to permissions. 4. I also have status check requirements set (they are exactly the same when using branch protection rules):
Version:
"version": "v0.25.0 (commit: a12823e) (build date: 2023-08-11T20:51:19.440Z)"
I've updated to the latest Atlantis version (
"version": "v0.26.0 (commit: bb18da2) (build date: 2023-10-06T16:29:35.868Z)"
) and the issue remained.
I've noticed however that disabling the "Require status checks to pass before merging" resolved the issue with the "missing approval".
Yeah, so the culprit was the
atlantis/apply
check. Removing this resolved the issue, but not sure how to approach this check from now on. Any ideas?
c
There is a flag to make it ignore the apply check when it comes to deciding if it is mergeable. Let me see if I can find it real quick.
o
ATLANTIS_GH_ALLOW_MERGEABLE_BYPASS_APPLY
? We have this set to
true
already 🙂
c
Yep, that's it. 😕
Sorry, i should read the whole thread 😛
o
So it does not work. My intention is to forbid merging PRs when
atlantis apply
did not run.
It used to work though with the default branch protection rules rather than the new GitHub's feature called RuleSets.
c
Yeah, it works for me, but I'm not using RuleSets, so that may be it.
l
I've been looking into this/thinking about approval vs mergeability; I have a change up for gitlab that clarifies the distinction I wonder if this makes sense for github too https://github.com/runatlantis/atlantis/pull/3830
Basically my proposal is that
approved
means literally "Pull request must be approved by at least one person other than the author before running apply" for all VCSs and if you want more fine-grained approval criteria (gitlab calls them Merge Request Approval Rules, sounds like "RuleSets" in github might be similar), we would make
mergeable
respect them
Note that my PR doesn't actually change any code other than gitlab's (and some error messages), the more "controversial" part is more in the doc changes to declare the intention of ^^
I'm not sure if this actually addresses the issue here (might be worth making a separate issue in https://github.com/runatlantis/atlantis to track that) but I think clarifying these settings should make it clearer what should be done
p
if you disable the ruleset does it work?
o
@PePe Amengual yes
p
sorry , slack did not showed previous messages until just now. Ruleset are new so it is possible there is a different response from the api when ruleset are enabled and that will have to be added to the Atlantis code base.
o
@PePe Amengual, totally understandable! This is somewhat similar to the issue previously reported here. Also, I tried increasing the log level for Atlantis to
debug
but this is the only thing printed:
p
we might not.be returning the error
mmmm
s
Unfortunately,
mergable-bypass-apply
feature heavily relies on branch protection and there is no API (yet) on GitHub that will return whether PR is mergeable with regards to bypass actors in rulesets. See https://github.com/orgs/community/discussions/61107#discussioncomment-7000915 and github's answer is that they are aware...
p
some people have said that Atlantis could be replaced by rulesets and github actions , I wonder how much of that is true
s
Proper Ruleset in this case would be
atlantis/apply
as Required Check and atlantis app as bypass actor
o
Proper Ruleset in this case would be
atlantis/apply
as Required Check and atlantis app as bypass actor
I've tried that, @Stas Ostrovskyi and it didn't work as well.
s
not Atlantis 🙂 but
mergeable-bypass-apply
definitely
yes-yes, it doesn't work because GitHub API doesn't work correctly
👍 1
but when it does, ruleset users would be able to drop
mergeable-bypass-apply
flag and put this logic on github itself
👍 1