This message was deleted.
# atlantis-community
s
This message was deleted.
c
So, here's the message where we can tell the container is picking it up:
Copy code
{"caller":"vcs/github_client.go:497", "<http://cos.googleapis.com/container_id|cos.googleapis.com/container_id>":"8b5286e31da4561f8692ae423419d7e3d8d9b430c092a1cc47422fe712a95bf1", "<http://cos.googleapis.com/container_name|cos.googleapis.com/container_name>":"klt--ejnq", "<http://cos.googleapis.com/stream|cos.googleapis.com/stream>":"stdout", "json":{…}, "level":"debug", "msg":"AllowMergeableBypassApply feature flag is enabled - attempting to bypass apply from mergeable requirements", "ts":"2023-07-26T16:28:58.318Z"}
p
maybe there is a permission missing for the atlantis user or github action?
c
I don't think so. I mean, atlantis works if we turn off the thing in Github requiring that status check.
p
it is possible that an error like that was not handled and does not show for some reason
c
And then here is where the command failed:
Copy code
{"caller":"events/instrumented_project_command_runner.go:83", "<http://cos.googleapis.com/container_id|cos.googleapis.com/container_id>":"8b5286e31da4561f8692ae423419d7e3d8d9b430c092a1cc47422fe712a95bf1", "<http://cos.googleapis.com/container_name|cos.googleapis.com/container_name>":"klt--ejnq", "<http://cos.googleapis.com/stream|cos.googleapis.com/stream>":"stdout", "json":{…}, "level":"error", "msg":"Failure running apply operation: Pull request must be mergeable before running apply.", "stacktrace":"<http://github.com/runatlantis/atlantis/server/events.RunAndEmitStats|github.com/runatlantis/atlantis/server/events.RunAndEmitStats>
	<http://github.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:83|github.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:83>
<http://github.com/runatlantis/atlantis/server/events.(*InstrumentedProjectCommandRunner).Apply|github.com/runatlantis/atlantis/server/events.(*InstrumentedProjectCommandRunner).Apply>
	<http://github.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:46|github.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:46>
<http://github.com/runatlantis/atlantis/server/events.runProjectCmds|github.com/runatlantis/atlantis/server/events.runProjectCmds>
	<http://github.com/runatlantis/atlantis/server/events/project_command_pool_executor.go:48|github.com/runatlantis/atlantis/server/events/project_command_pool_executor.go:48>
<http://github.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run|github.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run>
	<http://github.com/runatlantis/atlantis/server/events/apply_command_runner.go:166|github.com/runatlantis/atlantis/server/events/apply_command_runner.go:166>
<http://github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand|github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand>
	<http://github.com/runatlantis/atlantis/server/events/command_runner.go:296|github.com/runatlantis/atlantis/server/events/command_runner.go:296>", "ts":"2023-07-26T16:30:36.979Z"}
p
well if plan status worked this should
c
Yeah.
Hrm. It feels like there's a lot of debug messages missing from this log
Like I'm not seeing any of the messages from the preworkflow hooks runner
p
yes
c
I'm not seeing that in the logs. 😕
But I do see that other one, which is also a debug log. 😕
I don't understand why I'd get one and not the others.
Is the logger not getting passed properly via context?
Yeah, I'm not sure why, but there seems to be a lot of missing debug messages. 😕
p
that is why I mentioned, maybe we need more debugging there
c
I'm not sure why the ones that should be there aren't there though. That's what's confusing to me 😕
I see a lot of stuff from metrics and middleware, but the rest seem pretty scant.
p
if you have the time please do not hesitate to contribute
c
Yeah, I would, I'm just not sure why it's not working. My Go is mid at best. I'm going to keep poking at it this afternoon though to see if I can figure out what's going on.
👍🏽 1
d
pre_workflow_hooks is a separate stack call
this 1
c
Shouldn't it be using the same logger though?
It's inheriting it from the Atlantis configuration, right?
d
I think the instrumentated runner is eating it
the logger should be passed through the context, but something might be misconfigured
p
ohhh yes, you were looking at the pre-workflow-hook code which is not the same
c
Ah...okay. I'm just not sure how to get some more insight there into what's going on. 😕
Everything I can see seems to indicate it should be working, but it obviously is not.
We are using a different status check name, but it looks like that's being injected correctly in the method
d
honestly, I'm not familiar with the instrumentation/metrics code just yet as we don't have it setup at Autodesk
but it just seems to me that the call stack is getting covered up by this implementation
c
I'm mostly wondering if anyone else who's tried to use
ATLANTIS_GH_ALLOW_MERGEABLE_BYPASS_APPLY
has gotten it working properly, and if they ran into any trouble.
I do wonder what the point of those debug logs are if they're just getting squashed. 😕
Oh...I think I may have uncovered what's going on, and it has to do with having two atlantis servers pointed at the same repo. 😕
And both using
atlantis
as the executable name.
p
when you said you have a different name on the check I wonder about that, so one atlantis is picking up the event and not able to update it
c
That is what I'm suspicious of. We have an
atlantis-nonprod/apply
and an
atlantis-prod/apply
status check, both are required green to merge. My assumption would be that if nonprod didn't see any changes though, it would automatically be green, but I wonder if it momentarily goes into a wait state because it picks up the atlantis command.
And then that marks the PR as unmergeable and it complains.
Changing the executable name on both might solve the problem. Or even just on one.