runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.52k stars 1.02k forks source link

Gitlab Formatting and reaction issues in v0.28 #4636

Open ryan-cpi opened 4 weeks ago

ryan-cpi commented 4 weeks ago

Community Note

Overview of the Issue

When we upgraded from v27 to v28 all the formatting seems to have gone wonky in Gitlab and we are now missing the reaction emojis.

v0.27.3

image

v0.28.1

image

ryan-cpi commented 4 weeks ago

This might relate to https://github.com/runatlantis/atlantis/pull/3889 for the formatting issue. But v28 is still missing the reactions is this now disabled by default?

jamengual commented 3 weeks ago

it was an original oversight that the reaction was enabled by default, so we rolled that back.

ryan-cpi commented 3 weeks ago

Do you know where in the docs it says how to enable this again?

pippitt commented 3 weeks ago

Do you know where in the docs it says how to enable this again?

https://www.runatlantis.io/docs/server-configuration.html#emoji-reaction if you liked the previous reaction set it to eyes looking over this commit https://github.com/runatlantis/atlantis/commit/388bbfdd9072d4aa4e9cce881cad9275f36d1018

jamengual commented 3 weeks ago

The emoji reaction to use for marking processed comments. Currently supported on Azure DevOps, GitHub and GitLab. If not specified, Atlantis will not use an emoji reaction. Defaults to "" (empty string).

you need to pass a value to the parameter to enable it.

ryan-cpi commented 3 weeks ago

Thanks both! That solves the reaction issue it never seemed to show up in the search bar in the docs when I looked for "reaction".

But the main issue we found with v28 is the formatting of the attached comments not being as nice in the latest version vs all the older versions. Is that something that can be looked into for any future releases as personally the more compact older comment seems better?

jamengual commented 3 weeks ago

is there an issue with the formatting?

YevhenLodovyi commented 3 weeks ago

Is that something that can be looked into for any future releases as personally the more compact older comment seems better?

+ 1. The previous compact version was much better.

IMHO but such changes should be added as a separate template and user will chose(detailed or compact version)

YevhenLodovyi commented 3 weeks ago

I would like to propose to move commands to collapsible section(like Show Commands or Show Actions)

ryan-cpi commented 3 weeks ago

I think the commands work better in code blocks like this that are sub-bullet points for the plans and applies how they used to be in the version before. With the new format it has a button to copy the text but it copies it with the two backticks so it's not really too useful.

I don't mind much if the commands have their own drop-down or are appended to the bottom of the output I'd lean towards the old way of having them at the end of the output. But it's nice that the GitLab comments finally reference MRs not PRs in this change.

The differences in formatting between the old and new versions look like this taking up double the space.

v27

Screenshot 2024-06-12 at 8 54 32 AM

v28

Screenshot 2024-06-12 at 8 54 52 AM

jamengual commented 3 weeks ago

@X-Guardian is this possible to customize the template?

X-Guardian commented 3 weeks ago

The formatting is as designed. Commands are now in code blocks that can be copied with a single click on both GitLab and GitHub and only command output is in a collapsed section.

The additional back ticks when copying in GitLab is a GitLab issue which I'm sure they will fix at some point.

YevhenLodovyi commented 3 weeks ago

The formatting is as designed. Commands are now in code blocks that can be copied with a single click on both GitLab and GitHub and only command output is in a collapsed section.

I do understand that it designed this way. It is just designed not the best way.

Commands are now in code blocks that can be copied with a single click on both GitLab and GitHub and only command output is in a collapsed section.

I have PRs with XX stacks and I use atlantis apply in 99% cases and I do not need commands how to apply single stack.

The previous style was compact and it was easy to check the changes across all stacks. The new template uses 3x more space for single stack.

why it was decided it is better for all users?