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

[dashboard] Remove prebuild status errors from prebuild logs #9045

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Mar 31, 2022

Description

Removes injection of prebuild/workspace instance status errors into the logs. The error/status is already shown below the logs view.

Screenshot 2022-03-31 at 11 22 17

Screenshot 2022-03-31 at 11 19 27

Doing this addresses the following problems:

  • Simplifies state checking logic
  • Removes a race-condition where sometimes (fairly frequently) the error is injected at the top of the logs but with enough log output, the error is not in the view.

Related Issue(s)

Fixes #

How to test

  1. Clone https://gitlab.com/gitpod-milan/gitpod-large-image
  2. Setup the repo in step 1. as a project
  3. Trigger pre-builds for the following example branches:
    • main
    • timeout
    • fail
  4. Observe the error is not injected into the logs
  5. Image build & logs continue to be streamed
  6. Once built, logs should continue to be accessible

Release Notes

[dashboard] Remove prebuild error message from prebuild log view

Documentation

/uncc
/hold

@easyCZ easyCZ force-pushed the mp/remove-prebuild-logs-task-error branch from 3966633 to 5f156a8 Compare March 31, 2022 20:52
@easyCZ easyCZ marked this pull request as ready for review March 31, 2022 20:52
@easyCZ easyCZ requested a review from a team March 31, 2022 20:52
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Mar 31, 2022
Copy link
Member

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

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

Works as advertised!

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Many thanks for this Pull Request! Had a pass through the code changes, and left a few thoughts/questions. Will now try to test this.

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Many thanks for responding to my comments/questions! They're now all addressed.

The code changes look good to me now. 👍

I also tried testing this, but for some reason, when I try my go-to image build error repo (https://gitlab.com/jankeromnes/gitpod-build-error), I never get any image build logs.

It always goes straight from "Queued" to "System Error", without showing any image build logs:

BEFORE AFTER
Screenshot 2022-04-01 at 10 33 12 Screenshot 2022-04-01 at 10 30 43

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Approving, because the observed logs problem seems unrelated to this change, and you did get logs for my test repo.

Thanks also for the call! I can't wait for us to have much more robust Prebuild status and logs. 😊

@easyCZ
Copy link
Member Author

easyCZ commented Apr 1, 2022

It always goes straight from "Queued" to "System Error", without showing any image build logs:

@jankeromnes using your repo, I've managed to get the image build logs.

The case you're observing is a race condition that happens due to the following:

  1. We only subscribe for image build logs if the WorksapceInstance is in "preparing" or "stopping" states. Of course, we're running a distributed system so we can easily not receive the update as fast, or skip it entirely. This means that we wouldn't always detect the "preparing" state so we wouldn't start the image build stream :/
  2. If you refresh the browser, you may have already moved to the "prebuild failed" status in which case you don't get the image build logs.

I'm looking to tackle both by making the prebuild logs deterministic, but that's outside of the scope of this PR.

@easyCZ
Copy link
Member Author

easyCZ commented Apr 1, 2022

/unhold

@jankeromnes
Copy link
Contributor

jankeromnes commented Apr 1, 2022

I'm looking to tackle both by making the prebuild logs deterministic

😍

@roboquat roboquat merged commit 412c340 into main Apr 1, 2022
@roboquat roboquat deleted the mp/remove-prebuild-logs-task-error branch April 1, 2022 09:01
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants