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

Adding logic to clear terminal screen when running new plan #105

Merged
merged 6 commits into from
Sep 16, 2021

Conversation

Aayyush
Copy link

@Aayyush Aayyush commented Sep 13, 2021

No description provided.

@Aayyush
Copy link
Author

Aayyush commented Sep 13, 2021

When re-initializing a plan, we want to clear the terminal UI. There are two ways to do it:

  • Clear the terminal UI when "Initializing the backend..." msg is received (chosen approach)
  • When atlantis plan is run, find the exact ws connection that needs to clear the terminal UI and send a CLEAR msg. Since we are a stateless service, I don't think it is possible to retrieve a particular ws connection.

This approach relies on the fact that every time a plan is run, the first log msg is Initializing the backend... It is very unlikely that this will be changed in the future imo.

@msarvar
Copy link

msarvar commented Sep 15, 2021

@Aayyush as discussed in our daily meeting you can use Clear function to send a custom message to the UI that will clear the logs.

@Aayyush
Copy link
Author

Aayyush commented Sep 16, 2021

/ptal @msarvar @nishkrishnan

Copy link

@msarvar msarvar left a comment

Choose a reason for hiding this comment

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

looks great! Let's get it merged

@Aayyush Aayyush merged commit e56ccb4 into release-v0.17.1-lyft.1 Sep 16, 2021
@Aayyush Aayyush deleted the aayush/clear-terminal branch September 16, 2021 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants