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] Also re-trigger Prebuilds if the Project config has changed #6107

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Oct 7, 2021

Description

Related Issue(s)

Fixes #6014

How to test

  1. Add a new Project that does not have a .gitpod.yml in the repo
  2. In the Configurator, add echo "First" to the init task
  3. Run a Prebuild -- the Prebuild should run until it's successful
  4. Without changing the configuration, try to run another Prebuild -- it should quickly stop, because the previous Prebuild is still valid
  5. Now, change the init task to echo "Second" in the editor
  6. Run another Prebuild -- this time, it should actually re-run a new Prebuild, and show the logs with the new config

Release Notes

Fix re-running a Prebuild with a different out-of-repo configuration

/uncc

@jankeromnes jankeromnes force-pushed the jx/retrigger-prebuild-config-changed branch from 5f0e711 to ef4dc29 Compare October 8, 2021 07:06
@jankeromnes jankeromnes force-pushed the jx/retrigger-prebuild-config-changed branch from ef4dc29 to aea9efc Compare October 12, 2021 14:26
@roboquat roboquat added the team: webapp Issue belongs to the WebApp team label Oct 12, 2021
@jankeromnes jankeromnes marked this pull request as ready for review October 12, 2021 15:09
@AlexTugarev
Copy link
Member

AlexTugarev commented Oct 13, 2021

/werft run

👍 started the job as gitpod-build-jx-retrigger-prebuild-config-changed.3

// If the prebuild is failed, we want to retrigger it.
if (existingPB.state !== 'aborted' && existingPB.state !== 'timeout' && !existingPB.error) {
// If the existing prebuild is failed, we want to retrigger it.
if (!!existingPB && existingPB.state !== 'aborted' && existingPB.state !== 'timeout' && !existingPB.error) {
Copy link
Member

Choose a reason for hiding this comment

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

just fyi, and not related to the problem solved here, it appears to happen that a prebuilt workspace might get registered in the db but no snapshot url is set, which is basically a not available prebuild. it's clearly tricky compute that state 🙈

@AlexTugarev
Copy link
Member

/lgtm

it works as advertised! thanks @jankeromnes

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 109ffc305d652670d5e0238b2586a9b1b2860de2

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlexTugarev

Associated issue: #6014

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit 483de9a into main Oct 13, 2021
@roboquat roboquat deleted the jx/retrigger-prebuild-config-changed branch October 13, 2021 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants