Open
Description
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
Since the GitHub REST API ListComments
endpoint doesn't expose the isMinimized
attribute, on each Atlantis command, we sequentially minimize Atlantis comments, even if they are already minimized. This process can take significant time, proportional to the number of existing Atlantis comments within a pull request.
We might consider switching to the GitHub GraphQL API for listing comments, as it exposes the isMinimized
attribute. This would help avoid performance degradation by minimizing only the last Atlantis comment, as opposed to processing all comments sequentially.
Relevant code is here
I'd like to work on the fix for this.
Reproduction Steps
- Use Github
- Enable --hide-prev-plan-comments
- Run many Atlantis commands in the same pull request and notice that the full cycle takes increasingly more time on each iteration
Logs
Logs
{"level":"debug","ts":"2025-01-10T16:06:41.250Z","caller":"events/pull_updater.go:26","msg":"Hiding previous plan comments for command: 'Plan', directory: ''","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:41.250Z","caller":"vcs/github_client.go:218","msg":"Hiding previous command comments on GitHub pull request 313","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:42.082Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Zwjan","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:42.588Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Zwj-B","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:43.173Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Zwyzl","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:44.497Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Zwy1v","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:45.018Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z89Vp","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:45.630Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z89oc","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:46.044Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z8-MI","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:46.553Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z8-ci","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:46.994Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z8_hs","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:47.954Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9BCD","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:48.469Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9CJQ","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:49.439Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9CJl","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:50.396Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9DxK","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:51.144Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9Dxd","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:52.078Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9EQA","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:52.545Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9FDm","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:53.041Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9Gyv","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:53.724Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9Hl9","json":{"repo":"my/repo","pull":"313"}}
{"level":"debug","ts":"2025-01-10T16:06:54.239Z","caller":"vcs/github_client.go:278","msg":"Hiding comment IC_kwDOJVVN3M6Z9Mdf","json":{"repo":"my/repo","pull":"313"}}