Skip to content

fix: avoid performance degradation with Github and --hide-prev-plan-comments enabled#5241

Open
oleg-glushak wants to merge 17 commits intorunatlantis:mainfrom
oleg-glushak:speed-up-github-comments-hide3
Open

fix: avoid performance degradation with Github and --hide-prev-plan-comments enabled#5241
oleg-glushak wants to merge 17 commits intorunatlantis:mainfrom
oleg-glushak:speed-up-github-comments-hide3

Conversation

@oleg-glushak
Copy link
Copy Markdown

@oleg-glushak oleg-glushak commented Jan 17, 2025

what

Switch from GitHub REST API to GitHub GraphQL for listing comments to expose the isMinimized attribute to avoid minimizing already minimized comments on each Atlantis command execution.

why

This helps to avoid performance degradation by minimizing only non-minimized Atlantis comments, as opposed to processing all comments sequentially on each Atlantis command execution.

tests

  • I have tested my changes by running unit tests.
  • I have tested my changes by running this version of Atlantis and checking if the --hide-prev-plan-comments performance still works in general and the performance degradation disappears.

references

@oleg-glushak oleg-glushak requested review from a team as code owners January 17, 2025 06:19
@oleg-glushak oleg-glushak requested review from X-Guardian, chenrui333 and lukemassa and removed request for a team January 17, 2025 06:19
@github-actions github-actions Bot added go Pull requests that update Go code provider/github labels Jan 17, 2025
@oleg-glushak oleg-glushak changed the title Improve Github --hide-prev-plan-comments performance fix: Improve Github --hide-prev-plan-comments performance Jan 17, 2025
@oleg-glushak oleg-glushak changed the title fix: Improve Github --hide-prev-plan-comments performance fix: avoid performance degradation with Github and --hide-prev-plan-comments enabled Jan 17, 2025
@oleg-glushak oleg-glushak force-pushed the speed-up-github-comments-hide3 branch from 30b722f to 4f5b17f Compare January 17, 2025 06:21
@dosubot dosubot Bot added the feature New functionality/enhancement label Jan 17, 2025
@X-Guardian
Copy link
Copy Markdown
Contributor

Thanks for this @oleg-glushak. Can you check the linting error: https://github.com/runatlantis/atlantis/pull/5241/files#annotation_30986616047

@X-Guardian X-Guardian added the waiting-on-response Waiting for a response from the user label Jan 17, 2025
Signed-off-by: oleg-glushak <oleg1628@gmail.com>
Signed-off-by: oleg-glushak <oleg1628@gmail.com>
…omments enabled

Signed-off-by: oleg-glushak <oleg1628@gmail.com>
Signed-off-by: oleg-glushak <oleg1628@gmail.com>
Signed-off-by: oleg-glushak <oleg1628@gmail.com>
Signed-off-by: oleg-glushak <oleg1628@gmail.com>
Signed-off-by: oleg-glushak <oleg1628@gmail.com>
@oleg-glushak oleg-glushak force-pushed the speed-up-github-comments-hide3 branch from 485dde2 to 6b0868f Compare January 17, 2025 14:02
@oleg-glushak
Copy link
Copy Markdown
Author

Thanks @X-Guardian

The pull requests is ready for review again.

@X-Guardian
Copy link
Copy Markdown
Contributor

I'm not keen on just ignoring the linter with a generic message. Can you investigate further? Also, can you try and avoid force pushing changes to the branch if you can, as this loses the links to previous check runs.

@oleg-glushak
Copy link
Copy Markdown
Author

I'm not keen on just ignoring the linter with a generic message. Can you investigate further? Also, can you try and avoid force pushing changes to the branch if you can, as this loses the links to previous check runs.

Thanks for your feedback @X-Guardian . The same approach was used in a pull request merged last month: here. As far as I understand we either have to ignore this warning or switch from int to int32 in many places including the interface here which would make the scope of these changes much bigger.

Please let me know, if you have a strong opinion which way I should follow or if I understand something wrong.

@oleg-glushak
Copy link
Copy Markdown
Author

@X-Guardian @jamengual I'd be happy to invest more time to push the pull request forward. Just let me know, if you have a strong opinion, if we need to do further work here.

@github-actions github-actions Bot added the Stale label May 12, 2025
@github-actions github-actions Bot closed this Jun 13, 2025
@jamengual jamengual reopened this Jun 13, 2025
@jamengual jamengual removed the Stale label Jun 13, 2025
@github-actions
Copy link
Copy Markdown

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 Jul 15, 2025
@jamengual jamengual removed the Stale label Jul 15, 2025
@github-actions
Copy link
Copy Markdown

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 Aug 16, 2025
@github-actions github-actions Bot closed this Sep 17, 2025
@jamengual jamengual reopened this Sep 17, 2025
@jamengual jamengual removed the Stale label Sep 17, 2025
@github-actions
Copy link
Copy Markdown

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 Oct 19, 2025
@github-actions github-actions Bot closed this Nov 20, 2025
@jamengual jamengual removed the Stale label Nov 20, 2025
@jamengual jamengual reopened this Nov 20, 2025
@github-actions
Copy link
Copy Markdown

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 Dec 22, 2025
@jamengual jamengual removed the Stale label Dec 26, 2025
@github-actions
Copy link
Copy Markdown

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 Jan 27, 2026
@jamengual jamengual removed the Stale label Jan 28, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 1, 2026

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 1, 2026
@github-actions github-actions Bot closed this Apr 1, 2026
@jamengual jamengual reopened this Apr 1, 2026
@jamengual jamengual removed the Stale label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality/enhancement go Pull requests that update Go code provider/github waiting-on-response Waiting for a response from the user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Github: Gradual performance degradation with --hide-prev-plan-comments enabled

3 participants