-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Enable hide-prev-plan-comments
Feature for BitBucket Cloud
#4495
base: main
Are you sure you want to change the base?
Conversation
@ragne could you please add tests and docs for this? |
I've been considering doing something similar for GitLab—configuring Atlantis to delete previous comments (or retain up to X of them). Is there an opportunity (and desire) to make this work across SCM providers? Some of our GitLab MRs exceed 4-5 MB of Atlantis output, putting my M1 laptop, Chrome, and Gitlab UI under so much pressure that I worry they will eventually become diamonds. |
it is always encourage to make features available to all VCSs.
github supports hiding comments which help with the long plans.
…On Fri, May 3, 2024, 10:20 a.m. Christian Winther ***@***.***> wrote:
I've been considering doing something similar for GitLab - configuring
Atlantis to delete previous comments (or retain up to X of them) - is there
an opportunity (and desire) to make this work cross SCM providers?
—
Reply to this email directly, view it on GitHub
<#4495 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3EREZGFL2WXOORLZJIYDZAPBOLAVCNFSM6AAAAABG72T67OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGQ2DSMBXGY>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
@jippi, Atlantis already support hiding previous comments in GitLab. https://www.runatlantis.io/docs/server-configuration.html#hide-prev-plan-comments |
hide-prev-plan-comments
Feature for BitBucket Cloud
I changed the PR title to make the intended change clearer. |
Can you add tests for this? |
@X-Guardian GitLab does indeed support hiding them, but they are still included in the initial page load, and thus add significant weight to the page size and performance - sadly its not as cleverly done as GitHub that doesn't load them at all, until you click on them and then JIT load them for you. In GitLab its just wrapped in a Some of our GitLab MR pages are 5-10 MB TF output sent to the browser within those |
I'm not sure if the implementation there conforms to the name of the cmdline flag. If you want to create a separate flag (instead of |
Hey @chenrui333 @lukemassa @jamengual @X-Guardian is there anything that blocks this still? |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month. |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month. |
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ragne, just a couple of small changes and we can get this merged.
"pagelen": 10, | ||
"size": 4, | ||
"page": 1 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
Needs EOF LF
@@ -841,7 +841,7 @@ based on the organization or user that triggered the webhook. | |||
``` | |||
|
|||
Hide previous plan comments to declutter PRs. This is only supported in | |||
GitHub and GitLab currently. This is not enabled by default. When using Github App, you need to set `--gh-app-slug` to enable this feature. | |||
GitHub, GitLab and Bitbucket currently. This is not enabled by default. When using Github App, you need to set `--gh-app-slug` to enable this feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you detail that for Bitbucket Cloud, the comments are deleted rather than hidden.
what
Atlantis produces a truly ungodly amount of comments during an extensive work on a PR in the bitbucket. For GH integration, there's an ability to collapse comments that are no longer relevant for a discussion (i.e. old plans that are now discarded, etc).
This PR tries to add that to bitbucket with all its limitations. Since BB doesn't have an ability to collapse comments, the only way there is to delete old comments all-together.
In my opinion, that is fine, since this feature is gated via a cmdline flag anyway.
Please let me know your thoughts. We used this code internally at $dayjob and it gets job done.
why
It's just annoying to scroll a kilometere-long comment just to find another one right after. The plans that we're working with are more than 2-3k lines. We used
tf-summarize
to reduce the amount of text in the comment, but the main problem of having too much comments from atlantis still stands.tests
We have used the code in our own installation. I'll be honest,
go
isn't my strongest language, so I have no idea if I have to add tests to the codebase and how to do that.references