Skip to content
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(gitlab): add previous command comment deletion #2996

Conversation

tyler-allen-tango
Copy link

@tyler-allen-tango tyler-allen-tango commented Jan 17, 2023

what

  • Offers the ability to delete past plan/apply comments. Its current use is only for gitlab as it doesn't support hiding (minimization) like github does.

why

  • Merge Requests can become noisy to the point where it can slow down the gitlab user interface
  • Confusion can occur with multiple plan/apply comments

tests

  • I have tested these changes on my local development gitlab and Atlantis server running.

references

@tyler-allen-tango tyler-allen-tango requested a review from a team as a code owner January 17, 2023 21:00
@jamengual jamengual added provider/gitlab feature New functionality/enhancement labels Jan 17, 2023
# or
ATLANTIS_DELETE_PREV_COMMAND_COMMENTS
```
Deletes previous command comments to declutter the merge request. This is only supported in Gitlab currently. Github users should use `--hide-prev-plan-comments`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add this functionality under hide-prev-plan-comments flag? since this is basically the same thing but for gitlab.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamengual I had had initially put it there, but over thought it and didn't want to hide a Delete command behind a Hide flag was my reasoning. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes i think we should keep consistency with how we have it with github. It would be better to hide than to delete in order to keep auditability.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wish Gitlab supported hiding, however, there is a Discussion feature on gitlab that supports user minimization.

I was toying around with the idea of for every command sent by the user turn that merge request comment to a discussion and then have atlantis reply to that discussion.

This idea was born when tons of big plans/applys would slow the UI down significantly.

I agree with the auditability of it. I was also considering keeping the last 3 or remove the last plans on successful apply.

I'd love to hear thoughts and feedback for sure! I appreciate the comments up to this point.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh i like this idea! Let me investigate it Id be happy to implement if its possible! I'll look into this thanks for the discussion @nitrocode

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or how about update old plan with detail tag to hide it and create new comment?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyler-allen-tango friendly ping

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slating some time today to look and experiment with this. I'll update when I know more. @nitrocode Would you want to close this MR until i can try to test with some of the recommendations above such as details tag on the html markup/attempting to move the outputs to a diff location in gitlab. Will probably take a little bit.

Copy link
Member

@nitrocode nitrocode Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely up to you. I do not mind (1) keeping this open, (2) re-using this one with the recommendations above, or (3) closing and having a separate PR to solve the same problem.

Thanks for looking deeper into this

@nitrocode nitrocode changed the title Implement previous command comment deletion for gitlab feat(gitlab): add previous command comment deletion Jan 18, 2023
@nitrocode nitrocode added the waiting-on-response Waiting for a response from the user label Jan 30, 2023
@nitrocode nitrocode marked this pull request as draft January 30, 2023 12:54
@tyler-allen-tango
Copy link
Author

tyler-allen-tango commented Feb 22, 2023 via email

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Mar 28, 2023
@github-actions github-actions bot closed this Apr 29, 2023
@DrFaust92
Copy link

This interesting fro my org, i would like to potentially take over this feature. wdyt @nitrocode ?

@jamengual
Copy link
Contributor

you can take it over, no problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation feature New functionality/enhancement go Pull requests that update Go code provider/azuredevops provider/bitbucket provider/github provider/gitlab waiting-on-response Waiting for a response from the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants