Skip to content

Add message: Prebuilds have been paused #14081

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
Oct 28, 2022

Conversation

AlexTugarev
Copy link
Member

@AlexTugarev AlexTugarev commented Oct 21, 2022

Description

With this PR we introduce a warning message on the Project overview when it is considered inactive. A Resume prebuilds action allows to trigger a new prebuild on the default branch.

Screen Shot 2022-10-26 at 15 17 34

Related Issue(s)

Fixes #9232

How to test

  1. Create a project and start a workspace for it.
  2. Use this statement to set the project inactive
    update d_b_project_usage set lastWorkspaceStart = '2021-10-21T13:02:40.674Z';
  3. Check the project page for the warning.
  4. Select the resume action.

Release Notes

Show warning for inactive projects and allow to resume prebuilds again. 

Documentation

Werft options:

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

@AlexTugarev
Copy link
Member Author

AlexTugarev commented Oct 21, 2022

/werft run

👍 started the job as gitpod-build-alex-warn-users-that-prebuilds-9232.1
(with .werft/ from main)

@AlexTugarev AlexTugarev force-pushed the alex/warn-users-that-prebuilds-9232 branch from be2436f to 2f2f5f0 Compare October 21, 2022 11:28
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-alex-warn-users-that-prebuilds-9232.3 because the annotations in the pull request description changed
(with .werft/ from main)

@AlexTugarev AlexTugarev marked this pull request as ready for review October 21, 2022 13:50
@AlexTugarev AlexTugarev requested a review from a team October 21, 2022 13:50
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Oct 21, 2022
@jankeromnes
Copy link
Contributor

jankeromnes commented Oct 24, 2022

Wow, many thanks @AlexTugarev for implementing this! This will be a huge improvement in the UX of "inactive projects".

I'll take a look at this now. 👀

@@ -2649,6 +2649,11 @@ export class GitpodServerEEImpl extends GitpodServerImpl {

const context = (await this.contextParser.handle(ctx, user, contextURL)) as CommitContext;

// HACK: treat manual triggered prebuild as a reset for the inactivity state
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem like a hack to me 👍 (especially if we rename lastWorkspaceStart to something more accurate like lastUserActivity)

Suggested change
// HACK: treat manual triggered prebuild as a reset for the inactivity state
// Treat manual triggered prebuild as a reset for the inactivity state

@jankeromnes
Copy link
Contributor

jankeromnes commented Oct 24, 2022

Preview env died over the weekend, let's make a new one:

/werft run

👍 started the job as gitpod-build-alex-warn-users-that-prebuilds-9232.5
(with .werft/ from main)

@gtsiolis
Copy link
Contributor

gtsiolis commented Oct 24, 2022

Just came here to express some excitement for this seeing 🅰️ this feature happening and 🅱️ the alert component being used once more! ✨

homer-simpson

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 providing test instructions! The UX works as advertised. ✨ I agree with @gtsiolis that this is super nice to see. 😁

Also, for the future, I wonder if maybe we'll want to show the same warning on other pages as well?

Project Overview List of Prebuilds Specific Cancelled Prebuild
Screenshot 2022-10-24 at 14 50 36 Screenshot 2022-10-24 at 14 50 47 Screenshot 2022-10-24 at 14 51 03
Aha, here I see why all my prebuilds get cancelled! 💡 Here, I have no idea why some prebuilds are cancelled 😕 Here, we used to show the exact reason the prebuild got cancelled (e.g. "project is inactive please start a workspace"), but now we only show a very generic "catch all" 😢 why?

if (project) {
getGitpodService()
.server.triggerPrebuild(project.id, null)
.then(() => setIsConsideredInactive(false))
Copy link
Contributor

@jankeromnes jankeromnes Oct 24, 2022

Choose a reason for hiding this comment

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

Two possible UX improvements:

  • When the user clicks, disable the link & show a spinner, so that users know that something is actually happening (i.e. clicking worked) and to prevent them from triggering multiple duplicate prebuilds?

  • Once the action is successful, auto-redirect to the new prebuild that is in progress? (As opposed to just hiding the warning and otherwise nothing seems to have changed)

Copy link
Contributor

@gtsiolis gtsiolis Oct 24, 2022

Choose a reason for hiding this comment

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

@jankeromnes I'm adding below some comments regarding the other pages and future iterations:

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

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 for opening this, @AlexTugarev!

Left one minor comment around copy. 🏓

@AlexTugarev AlexTugarev force-pushed the alex/warn-users-that-prebuilds-9232 branch from ec4e003 to 2dbcc67 Compare October 26, 2022 11:38
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 @AlexTugarev!

Code looks good, and works (almost) perfectly fine! ✨

/hold due to the nit about setting isResuming to true somewhere

@AlexTugarev AlexTugarev force-pushed the alex/warn-users-that-prebuilds-9232 branch from 2dbcc67 to 7d45fa0 Compare October 28, 2022 10:29
@AlexTugarev
Copy link
Member Author

/hold cancel

@roboquat roboquat merged commit f9717b1 into main Oct 28, 2022
@roboquat roboquat deleted the alex/warn-users-that-prebuilds-9232 branch October 28, 2022 10:38
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Oct 28, 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.

Warn users that prebuilds have been paused for inactive projects
5 participants