You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
With custom policy checks, approvals are required even if there is no failures.
Logs
{"level":"info","ts":"2024-04-22T14:36:31.966Z","caller":"models/shell_command_runner.go:161","msg":"successfully ran \"conftest test plan.json variables.json --combine --all-namespaces -p /atlantis-data/opa-rules/policy\" in \"/atlantis-data/repos/common/terraform/formation/15/live_dev_infrastructure_compute/live/dev/infrastructure/compute\"","json":{"repo":"common/terraform/formation","pull":"15","duration":0.892278925}}
{"level":"error","ts":"2024-04-22T14:36:31.966Z","caller":"events/project_command_runner.go:529","msg":"\n80 tests, 80 passed, 0 warnings, 0 failures, 0 exceptions\n","json":{"repo":"common/terraform/formation","pull":"15"},"stacktrace":"github.com/runatlantis/atlantis/server/events.(*DefaultProjectCommandRunner).doPolicyCheck\n\tgithub.com/runatlantis/atlantis/server/events/project_command_runner.go:529\ngithub.com/runatlantis/atlantis/server/events.(*DefaultProjectCommandRunner).PolicyCheck\n\tgithub.com/runatlantis/atlantis/server/events/project_command_runner.go:240\ngithub.com/runatlantis/atlantis/server/events.RunAndEmitStats\n\tgithub.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:74\ngithub.com/runatlantis/atlantis/server/events.(*InstrumentedProjectCommandRunner).PolicyCheck\n\tgithub.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:42\ngithub.com/runatlantis/atlantis/server/events.runProjectCmdsParallel.func1\n\tgithub.com/runatlantis/atlantis/server/events/project_command_pool_executor.go:29"}
{"level":"error","ts":"2024-04-22T14:36:31.966Z","caller":"events/instrumented_project_command_runner.go:84","msg":"Failure running policy_check operation: Some policy sets did not pass.","json":{"repo":"common/terraform/formation","pull":"15"},"stacktrace":"github.com/runatlantis/atlantis/server/events.RunAndEmitStats\n\tgithub.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:84\ngithub.com/runatlantis/atlantis/server/events.(*InstrumentedProjectCommandRunner).PolicyCheck\n\tgithub.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:42\ngithub.com/runatlantis/atlantis/server/events.runProjectCmdsParallel.func1\n\tgithub.com/runatlantis/atlantis/server/events/project_command_pool_executor.go:29"}
@tweiss-mdm
custom policy check does not ALWAYS require approvals. The fail condition for custom policy check is keyword fail inside the policy check output. Since your output contains the word 0 failures, it fails the policy check even when there are 0 failures.
On another note, have you tried using atlantis apply after the failed policy check comment? What is the output that you get in this case?
Community Note
Overview of the Issue
With custom policy checks, approvals are required even if there is no failures.
Logs
Environment details
Atlantis server-side config file:
The text was updated successfully, but these errors were encountered: