Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Command-line build log overwrites previous CLI output #1506

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

Closed
mafredri opened this issue May 17, 2022 · 10 comments
Closed

Command-line build log overwrites previous CLI output #1506

mafredri opened this issue May 17, 2022 · 10 comments
Labels
api Area: HTTP API

Comments

@mafredri
Copy link
Member

In some cases, the CLI can overwrite previous output.

Steps to Reproduce

  1. Run coder create
  2. When prompted Confirm create? (yes/no), answer yes
  3. The Confirm create? line is overwritten by ✔ Queued [136ms]? (yes/no) yes

Expected

No previously output lines should be overwritten (with the exception of status updates).

Actual

The line is overwritten.

Screenshot

image

(Ignore the terraform error, it's probably EU West that is not set up.)

Notes

This is likely fixed by adding a newline somewhere, but we should check if we can update the cli packages to guard against this.

@kylecarbs
Copy link
Member

I've seen this... I'd like to have a better story for how this works, because it's a bit unfortunately janky right now.

@mafredri
Copy link
Member Author

mafredri commented May 19, 2022

Seeing this again in the demo provided in #1584, the selection list is being erased.

It looks like we need to restore terminal cursor position after selection. Store / restore may work here, or making sure were moving it down sufficiently post-selection. (I have yet to look at the code responsible for the behavior.)

@deansheather
Copy link
Member

I think the thing in that PR is intentional, the select list gets removed and replaced with the selection

@mafredri
Copy link
Member Author

Oh, right you are @deansheather, thanks for clearing that up!

@misskniss misskniss added the api Area: HTTP API label May 24, 2022
@mafredri
Copy link
Member Author

mafredri commented Jun 6, 2022

I've found one case where this is always reproducible:

  1. coder create newspace
  2. coder ssh newspace (during creation)

In 2 coder ssh will attach to the workspace creation log whilst moving up one line in the terminal and erasing the prompt (i.e. the command that was run).

@kylecarbs kylecarbs changed the title Bug: CLI overwrites terminal output CLI overwrites terminal output Jun 7, 2022
@github-actions
Copy link

github-actions bot commented Aug 7, 2022

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Aug 7, 2022
@mafredri
Copy link
Member Author

mafredri commented Aug 9, 2022

This still happens on occasion, but needs deeper investigation to narrow down cause and where it happens (for instance, it has also happened when prompting for terraform variable input which is confusing since part or all of the message is missing -- this may or may not have been fixed).

@github-actions github-actions bot removed the stale This issue is like stale bread. label Aug 10, 2022
@kylecarbs kylecarbs changed the title CLI overwrites terminal output Command-line build log overwrites previous CLI output Aug 24, 2022
@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 24, 2022
@kylecarbs kylecarbs removed the stale This issue is like stale bread. label Oct 24, 2022
@bpmct
Copy link
Member

bpmct commented Oct 25, 2022

@kylecarbs is this fixed by #4740?

@kylecarbs
Copy link
Member

yup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API
Projects
None yet
Development

No branches or pull requests

5 participants