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

UI Jobs streams are not cleaned up after PR is closed #5348

Open
quynhnhatnguyen opened this issue Feb 19, 2025 · 3 comments
Open

UI Jobs streams are not cleaned up after PR is closed #5348

quynhnhatnguyen opened this issue Feb 19, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@quynhnhatnguyen
Copy link

quynhnhatnguyen commented Feb 19, 2025

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

Atlantis UI Jobs Stream are not cleaned up after a PR is closed, resulted in system resource are not freed up.

Reproduction Steps

  1. Open a PR in Github, plan or apply the PR to generate jobs stream. Visit the job's stream to confirm seeing the stream.
  2. Close the PR in Github. Visit the UI to see that jobs are still listed whereas locks are cleaned. Confirm that data in repos dir is also cleaned up fine. Visit the previous job stream URL to confirm that you still can see the streams.

Environment details

  • Atlantis version: 0.33.0
  • Deployment method: GKE

Additional Context

Screenshots of before closing the PR:
Image
Image

Screenshots of after closing the PR:

  • Locks are gone but streams remains in the table and you can also click to view the stream content)
Image
  • System resource is not freed up after closing a PR due to streams are left behind
Image
@quynhnhatnguyen quynhnhatnguyen added the bug Something isn't working label Feb 19, 2025
Copy link

dosubot bot commented Feb 19, 2025

Hey @quynhnhatnguyen 👋, I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!

The issue you're experiencing, where UI job streams are not cleaned up after a PR is closed, seems to be related to the cleanup process managed by the PullClosedExecutor in Atlantis. This component is responsible for cleaning up resources, including log streaming resources, when a PR is closed [1].

The expected behavior is that log streaming resources should be cleaned up, workspaces deleted, and locks removed when a PR is closed [2]. If this is not happening, it might indicate a bug or misconfiguration in the cleanup process.

To address this issue, you might want to:

  1. Verify that the PullClosedExecutor is correctly configured and that all its dependencies (like LogStreamResourceCleaner, Locker, and WorkingDir) are functioning as expected.
  2. Check for any recent changes or updates in the codebase that might have affected the cleanup process.
  3. Ensure that your Atlantis version (0.33.0) is up-to-date with any patches or fixes related to this issue.

If the problem persists, it might be helpful to look into the specific implementation details or logs to identify any errors during the cleanup process.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@joe1981al
Copy link

@quynhnhatnguyen, can you check if those logs are complete? We are seeing logs being persistent as well but when clicked the displayed log is truncated. If the log page is refreshed it is truncated at a different spot during each refresh. The full log was posted in the comment correctly.

Running atlantis:v0.33.0 container deployed via terraform-gce-atlantis?ref=v4.2.0

@quynhnhatnguyen
Copy link
Author

@joe1981al ours is not truncated. The full log is persistent in the streams of closed PRs in my test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants