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

gp open/preview should await till UI is available #4036

Closed
akosyakov opened this issue Apr 22, 2021 · 4 comments · Fixed by #4633
Closed

gp open/preview should await till UI is available #4036

akosyakov opened this issue Apr 22, 2021 · 4 comments · Fixed by #4633
Assignees

Comments

@akosyakov
Copy link
Member

Bug description

Otherwise they can break in tasks currently: https://community.gitpod.io/t/using-code-or-gp-open-in-start-tasks-fail-hard/3376

Steps to reproduce

See above.

Expected behavior

No response

Example repository

No response

Anything else?

No response

@akosyakov akosyakov added this to the May 2021 (backlog) milestone Apr 22, 2021
@svenefftinge
Copy link
Member

Do we want to have an explicit command that awaits a connection of a code editor and then also internally use it from the two mentioned commands?

@csweichel csweichel removed this from the May 2021 (backlog) milestone May 6, 2021
@JanKoehnlein JanKoehnlein added this to the [backlog] June 2021 milestone May 31, 2021
@JanKoehnlein JanKoehnlein self-assigned this Jun 1, 2021
@JanKoehnlein
Copy link
Contributor

Do we want to block on opening editors until the IDE is ready? This could be problematic when misused in non-interactive scenarios (like init in prebuilds). I'm not sure if we'd rather want an async-open command that retries than force blocking. Can we detect whether we run in a prebuild?

The code CLI connects to the Gitpod code server via REST. The CLI would have to retry until the server is up and an IDE client has connected. But we could also add that retry logic for all CLI commands that delegate to the server. Should we?

@akosyakov
Copy link
Member Author

Maybe we can detect that we are in prebuild context and fail then.

@apolopena
Copy link

apolopena commented Jun 15, 2021

Just a note that the error message has changed (as a result of resolving issue #3195) from:
error while issuing request: Post "http://localhost:23000/gitpod/cli": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
to:
Bad status code: 404: Not found.

This is a pesky bug because it can make the user experience intermittently poor when the preview browser cannot be opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants