Skip to content

Formatting issues with policy check results #4623

@tom-mckay

Description

@tom-mckay

Community Note

  • 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

I have noticed intermittent issues rendering the markdown Atlantis outputs to GitHub when a policy check failure occurs ever since upgrading from v0.27.3 to v0.28.1. I suspect this could be related to #4254 and the formatting changes it made.

I don't fully understand why yet, but it seems like adding an extra blank line between </details> and the "Policy Approval Status:" header here corrects the issue.

Screenshot of issue with details blurred for privacy:
Screenshot 2024-05-31 at 10 40 28 AM

Manually editing the post and adding the blank line as described above fixes the issue:
Screenshot 2024-05-31 at 10 43 17 AM

Screenshot 2024-05-31 at 10 43 44 AM

Reproduction Steps

Unknown at this point. The problem does not appear on every PR with failing policies.

Environment details

  • Atlantis version: v0.28.1
  • Deployment method: Helm on EKS

Atlantis server-side config file:

    repos:
    - id: /.*/
      workflow: workflow
      apply_requirements: [approved, mergeable]
      policy_check: true

    policies:
      owners:
        teams: ["...snip company specific team name..."]
      policy_sets:
        - name: policies
          path: /policies
          source: local

    metrics:
      prometheus:
        endpoint: "/metrics"

    workflows:
      workflow:
        plan:
          steps:
          - run: '...snip company specific terraform init wrapper...'
          - run: '...snip company specific terraform plan wrapper...'
        apply:
          steps:
          - run: '...snip company specific terraform apply wrapper...'
          - run: '...snip company specific logging command...'

Repo atlantis.yaml file:

version: 3
automerge: true
projects:
- dir: path/to/terraform/project
...snip more like above...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBug introduced in a new version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions