Skip to content

[Dashboard] Suggest using gp rebuild when image build fails #15774

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

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

andreafalzetti
Copy link
Contributor

@andreafalzetti andreafalzetti commented Jan 16, 2023

Description

We've recently introduced gp rebuild to help users debug their custom workspace image. In the future it will do more. We hope to reduce the number of image build failures caused by config changes that could have been caught in a workspace, before pushing.

Screenshot 2023-01-17 at 12 02 42

Related Issue(s)

Relates #7671

How to test

  1. Start a workspace for https://ide-gp-rebbd1841bbcb.preview.gitpod-dev.com/?workspaceClass=default&editor=code#https://github.com/andreafalzetti/gitpod-experiments/tree/imagebuild-broken
  2. Observe the message educating about the use of gp rebuild underneath the logs

Release Notes

NONE

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

@werft-gitpod-dev-com

This comment was marked as outdated.

@andreafalzetti andreafalzetti force-pushed the ide/gp-rebuild-failed-imagebuild branch from b9a394d to e0ded0d Compare January 16, 2023 20:07
@andreafalzetti andreafalzetti changed the title dashboard: suggest using gp rebuild when image build fails [Dashboard] Suggest using gp rebuild when image build fails Jan 16, 2023
@andreafalzetti
Copy link
Contributor Author

@gtsiolis I would appreciate your touch here!

Other approaches I've considered:

  • using the (TIP) pill (currently used for (BETA)
  • wrap eveything in a box like we do for the "unstable IDE" alert

@andreafalzetti andreafalzetti force-pushed the ide/gp-rebuild-failed-imagebuild branch from e0ded0d to a72474d Compare January 16, 2023 20:46
@akosyakov
Copy link
Member

I think custom can be dropped, a user can also use it to validate any other base image, just workspace image?

@gtsiolis
Copy link
Contributor

gtsiolis commented Jan 17, 2023

Looking at this now! 👀

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Checked with similar approaches (see relevant discussion (internal)), our existing alert component flexibility, and similar components in the wild that could support what we want here.

UX LGTM and seems like a good skateboard! 🛹

Thanks for the ping[1], @andreafalzetti! 🏓

FWIW, I couldn't test this because I was getting the following error:

Request createWorkspace failed with message: 13 INTERNAL: cannot resolve workspace image: pulling from host eu.gcr.io failed with status code [manifests 81971a6456bed2bd0c75aa21ad46ba7932353c4f0227d22d09025deac0b573cb]: 429

Too Many Requests

Unknown Error: { "code": -32603 }

Comment on lines 805 to 806
<span className="font-bold">Did you know?</span> You can use <code>gp rebuild</code> to
validate and debug your custom workspace image before pushing &nbsp;&middot;&nbsp;
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: We could trim some text here to make it easier to parse and read. Haven't checked if linting fails with the following code suggestions. 😅

Suggested change
<span className="font-bold">Did you know?</span> You can use <code>gp rebuild</code> to
validate and debug your custom workspace image before pushing &nbsp;&middot;&nbsp;
💡 You can use the <code>gp rebuild</code> command to
validate the configuration and rebuild the workspace.

We could also skip the validation part as this could be self-explanatory, making the message even easier to read and more specific where you can use the rebuild command.

Suggested change
<span className="font-bold">Did you know?</span> You can use <code>gp rebuild</code> to
validate and debug your custom workspace image before pushing &nbsp;&middot;&nbsp;
💡 You can use the <code>gp rebuild</code> command to
rebuild the workspace from the editor terminal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the inspiration! I've updated the message, check if you like it or have more suggestions 🙏

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks shippable, @andreafalzetti! Here are background thoughts on the copy suggestion above, but the current state looks good for this iteration, and we can update the copy later.

  1. The rebuild term was referring to the image build of the container image.
  2. The workspace term was trying to communicate this is about your workspace and nothing scary like images, containers, etc which may be strange to some users.
  3. The command term reference was trying to make it clear this is an actual command you have to type in a terminal or somewhere to run it.
  4. The debug term was removed to make it less scary to users.
  5. The editor term was used to clarify this action can happen inside an editor. Could be removed as this can happen in a terminal locally if you connect with SSH.
  6. The terminal term was used to make it clear you need to type this command in a terminal and it's not something you find on the editor UI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gtsiolis for context, we'll also enable users calling gp rebuild from the UI (vscode only for now), see context, but it feels very hard compress all these info in a line. For now we can go with the "terminal" option and later once we create more generic docs on gitpod.io/docs, we can rephrase this and link there to be a generic "rebuild" feature

@andreafalzetti andreafalzetti force-pushed the ide/gp-rebuild-failed-imagebuild branch from 74107f1 to 35ff9e1 Compare January 17, 2023 16:55
@andreafalzetti andreafalzetti marked this pull request as ready for review January 17, 2023 16:56
@andreafalzetti andreafalzetti requested a review from a team January 17, 2023 16:56
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jan 17, 2023
Comment on lines 805 to 806
<span className="font-bold">Did you know?</span> You can use <code>gp rebuild</code> to
validate and debug your custom workspace image before pushing &nbsp;&middot;&nbsp;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks shippable, @andreafalzetti! Here are background thoughts on the copy suggestion above, but the current state looks good for this iteration, and we can update the copy later.

  1. The rebuild term was referring to the image build of the container image.
  2. The workspace term was trying to communicate this is about your workspace and nothing scary like images, containers, etc which may be strange to some users.
  3. The command term reference was trying to make it clear this is an actual command you have to type in a terminal or somewhere to run it.
  4. The debug term was removed to make it less scary to users.
  5. The editor term was used to clarify this action can happen inside an editor. Could be removed as this can happen in a terminal locally if you connect with SSH.
  6. The terminal term was used to make it clear you need to type this command in a terminal and it's not something you find on the editor UI.

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Thanks, @andreafalzetti! 🍕

Left one minor suggestion around the help link.

Copy link
Member

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

I agree that the message should include something telling me where I can use gp rebuild. George's proposal sounds much better to me:

💡 You can use the gp rebuild command to rebuild the workspace from the editor terminal.

/hold

@roboquat roboquat merged commit 5a5af38 into main Jan 17, 2023
@roboquat roboquat deleted the ide/gp-rebuild-failed-imagebuild branch January 17, 2023 17:19
@svenefftinge
Copy link
Member

svenefftinge commented Jan 17, 2023

Ups, it got merged even though I added the hold label 😬

@roboquat roboquat added the deployed: webapp Meta team change is running in production label Jan 18, 2023
@roboquat roboquat added the deployed Change is completely running in production label Jan 18, 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 Change is completely running in production do-not-merge/hold release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants