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

Remove unnecessary call to imageBuilder.needsImageBuild #18759

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

geropl
Copy link
Member

@geropl geropl commented Sep 20, 2023

Description

Before, we used it to decide between handling the startWorkspace request sync or async, based on whether the instances needed a docker image build or not. Now we are always async, so we can get rid of the old call to image-builder. Plus the check whether we actually need an image build is done in "build" anyway.

@WVerlaek for confirming ☝️ 🙏

Summary generated by Copilot

🤖 Generated by Copilot at 97a61b7

This pull request improves the error handling and logging for the workspace start operation and the entitlement service. It also adds a utility function to check for gRPC errors and a new metric value for image build failures. It affects the files entitlement-service.ts, workspace-service.ts, workspace-starter.ts, grpc.ts, and prometheus-metrics.ts.

Related Issue(s)

Fixes EXP-676

How to test

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@geropl geropl force-pushed the gpl/ws-starter-imagebuilds branch from 97a61b7 to 6b4e6f5 Compare September 22, 2023 08:50
@geropl geropl changed the title [WIP] Clarify image-builder behavior and how to call it properly [WIP] Remove unnecessary call to imageBuilder.needsImageBuild Sep 22, 2023
…t need it anymore

Before, we used it to decide between handling the startWorkspace request sync or async. Now we are always async. And the check whether we actually need an image build is done in "build" anyway.
@geropl geropl force-pushed the gpl/ws-starter-imagebuilds branch from 6b4e6f5 to e19427f Compare September 22, 2023 09:10
@geropl geropl marked this pull request as ready for review September 22, 2023 13:30
@geropl geropl requested a review from a team as a code owner September 22, 2023 13:30
@geropl geropl changed the title [WIP] Remove unnecessary call to imageBuilder.needsImageBuild Remove unnecessary call to imageBuilder.needsImageBuild Sep 22, 2023
@geropl geropl requested a review from WVerlaek September 22, 2023 14:10
Copy link
Member

@WVerlaek WVerlaek left a comment

Choose a reason for hiding this comment

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

lgtm, good cleanup 👍

from what I can tell this makes sense to do, both .build() and .resolveWorkspaceImage() on the image builder client result in the same internal check in image-builder-mk3 for whether the image exists. Also ran some tests in the preview env and looks good!

@geropl
Copy link
Member Author

geropl commented Sep 26, 2023

/unhold

@roboquat roboquat merged commit e06508b into main Sep 26, 2023
49 checks passed
@roboquat roboquat deleted the gpl/ws-starter-imagebuilds branch September 26, 2023 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants