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

[server] Wait for image build logs in preparing state #15586

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

WVerlaek
Copy link
Member

@WVerlaek WVerlaek commented Jan 5, 2023

Description

Fixes image build logs from showing up in the dashboard if the build is delayed.

When a workspace's image build is delayed (due to e.g. waiting for a node to scale up), the workspace instance stays in a preparing state, it only moves to building once the build is actually running. Previously, the logic would stop retrying for build logs if it's not in a building state, this PR changes it to also wait for build logs while in a preparing state

Related Issue(s)

Fixes #14862

How to test

In a preview environment:

  • Cordon the preview environment's node
  • Create a new image build (e.g. https://<your-preview-env>.preview.gitpod-dev.com/#imagebuild/github.com/gitpod-io/gitpod
  • Wait a few minutes (an image build workspace gets created, but gets stuck in a pending state)
  • Uncordon the node
  • Observe that the image build runs, and logs are shown on the dashboard

Release Notes

Fix image build logs not showing in the dashboard if the build is delayed.

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@WVerlaek WVerlaek requested review from a team January 5, 2023 16:15
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-wv-image-build-retry-preparing.1 because the annotations in the pull request description changed
(with .werft/ from main)

@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team labels Jan 5, 2023
Comment on lines +1 to +7
#!/bin/bash
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
# Licensed under the GNU Affero General Public License (AGPL).
# See License.AGPL.txt in the project root for license information.

set -Eeuo pipefail
source /workspace/gitpod/scripts/ws-deploy.sh deployment dashboard
Copy link
Member Author

Choose a reason for hiding this comment

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

added this script as well which was useful in iterating on the dashboard component in a preview environment, the script is also present in components/server already

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.

Thanks!
That change makes sense.

@mads-hartmann
Copy link
Contributor

mads-hartmann commented Jan 6, 2023

/hold
CI is not passing so the merge queue is blocked. Adding hold ☺️

@WVerlaek WVerlaek force-pushed the wv/image-build-retry-preparing branch from dba32e3 to 4dee440 Compare January 6, 2023 10:13
@roboquat roboquat merged commit 907cc87 into main Jan 6, 2023
@roboquat roboquat deleted the wv/image-build-retry-preparing branch January 6, 2023 10:34
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Jan 6, 2023
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: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/XS team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[image-builder-mk3] Unable to fetch build logs for build that waited on node scale-up
4 participants