Skip to content

Hide the latest editor warning on stopping/stopped phases of a workspace #16940

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 3 commits into from
Jul 24, 2023

Conversation

Devansu-Yadav
Copy link
Contributor

@Devansu-Yadav Devansu-Yadav commented Mar 21, 2023

Description

  • Removes the latest ide alert warning on the workspace stopping and stopped pages and only shows it during workspace (re)start.

Related Issue(s)

Fixes #11035

How to test

Release Notes

Removes the latest ide alert warning on the workspace stopping and stopped pages

Documentation

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /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
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@Devansu-Yadav Devansu-Yadav requested a review from a team March 21, 2023 12:04
@Devansu-Yadav Devansu-Yadav requested a review from gtsiolis as a code owner March 21, 2023 12:04
@werft-gitpod-dev-com
Copy link

annotations in the pull request changed, but user is not allowed to start a job

@Devansu-Yadav
Copy link
Contributor Author

Devansu-Yadav commented Mar 21, 2023

Some context 💡 - This PR is created as per @mustard-mh's comment in #16551 to hide this warning for the workspace Stopping and Stopped phases.

@mustard-mh
Copy link
Contributor

mustard-mh commented Mar 21, 2023

Hey, @Devansu-Yadav Thank you for your follow-up contribution 🙏 I'd like to suggest the following conditions to show/hide this alert to close the issue #11035

  • Show if the workspace stopped or failed to start because of some unexpected errors (in case it failed due to the latest IDEs)
  • Hide if its phase is after running

The issue description #11035 has some code refers. Please let me know if you have any questions or suggestions.

@Devansu-Yadav
Copy link
Contributor Author

Devansu-Yadav commented Mar 23, 2023

I'd like to suggest the following conditions to show/hide this alert to close the issue #11035

  • Show if the workspace stopped or failed to start because of some unexpected errors (in case it failed due to the latest IDEs)

@mustard-mh I have pushed a change to address this. Could you please have a look and let me know if it's the correct way to do it?

  • Hide if its phase is after running

I think the very first change in this PR should address this. We now hide the alert on Stopping, Stopped, and TimeOut, which are the phases after Running.

@Devansu-Yadav Devansu-Yadav changed the title [workspace] hide ide alert on stop phase (#11035) Hide the latest editor warning on stopping or stopped phases of a workspace Mar 23, 2023
@Devansu-Yadav Devansu-Yadav changed the title Hide the latest editor warning on stopping or stopped phases of a workspace Hide the latest editor warning on stopping/stopped phases of a workspace Mar 23, 2023
phase={phase}
error={error}
title={title}
showLatestIdeWarning={isError || (!isTimedOut && !isStoppingOrStopped && useLatest)}
Copy link
Contributor

@mustard-mh mustard-mh Mar 24, 2023

Choose a reason for hiding this comment

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

Suggested change
showLatestIdeWarning={isError || (!isTimedOut && !isStoppingOrStopped && useLatest)}
showLatestIdeWarning={useLatest && (isError || (!isTimeout && !isStoppingOrStopped))}

But it would be good to name isTimeout and isStoppingOrStopped together (I can't find a proper name for it XD).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mustard-mh Do you mean we should combine both the variables isTimeout and isStoppingOrStopped?

Copy link
Contributor Author

@Devansu-Yadav Devansu-Yadav Mar 28, 2023

Choose a reason for hiding this comment

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

@mustard-mh Actually, we can just remove the isTimeout variable entirely since it's just a special case under the Stopping phase, and we anyways want to hide this alert for any phases after Running. We could keep the isStoppingorStopped variable as is.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mustard-mh Could you help or confirm if what @Devansu-Yadav is suggesting above is ok? 🏓

Copy link
Contributor

Choose a reason for hiding this comment

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

mustard-mh Could you help or confirm if what Devansu-Yadav is suggesting above is ok? 🏓

From the code, yes 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, @mustard-mh! Let me loop in @gitpod-io/engineering-webapp to bring this up to the team attention in case this could be ready to merge.

@mustard-mh
Copy link
Contributor

mustard-mh commented Mar 24, 2023

/werft run

👍 started the job as gitpod-build-hide-editor-warning-fork.0
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-hide-editor-warning.0 because the annotations in the pull request description changed
(with .werft/ from main)

@gtsiolis
Copy link
Contributor

gtsiolis commented Mar 31, 2023

Deployed a preview environment in https://hide-editor-warning.preview.gitpod-dev.com/workspaces.

@Devansu-Yadav
Copy link
Contributor Author

@gtsiolis Any updates on this PR?

@gtsiolis
Copy link
Contributor

@Devansu-Yadav Let me loop in @gitpod-io/engineering-webapp to take a closer look at the recent[1] code changes.

@stale
Copy link

stale bot commented May 1, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label May 1, 2023
@stale stale bot closed this May 8, 2023
@Devansu-Yadav
Copy link
Contributor Author

@gtsiolis Could you pls re-open this PR?

@Devansu-Yadav Let me loop in @gitpod-io/engineering-webapp to take a closer look at the recent[1] code changes.

Seems like there hasn't been any update since this 😅

@gtsiolis
Copy link
Contributor

Sure, @Devansu-Yadav.

Thanks for hanging here! 🙏

Let me re-loop in @gitpod-io/engineering-webapp.

@gtsiolis gtsiolis reopened this May 22, 2023
@stale stale bot removed meta: stale This issue/PR is stale and will be closed soon labels May 22, 2023
@Devansu-Yadav Devansu-Yadav force-pushed the hide-editor-warning branch from 522dfd0 to 7a0e999 Compare June 5, 2023 11:30
@stale
Copy link

stale bot commented Jun 17, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Jun 17, 2023
@gtsiolis gtsiolis requested review from a team and removed request for a team July 21, 2023 16:26
@stale stale bot removed meta: stale This issue/PR is stale and will be closed soon labels Jul 21, 2023
@akosyakov
Copy link
Member

@gtsiolis Do you know what is blocking it?

@gtsiolis
Copy link
Contributor

@akosyakov Unless code changes are no longer applicable, changes should be good to merge since @mustard-mh reviewed this a while ago, see #16940 (comment). 🏓

The problem with merging this is that we no longer can merge community contributions directly from PRs, see relevant section (internal) from our handbook:

Until we completely switch to GitHub Actions, merging community contributions from forks is not possible. A workaround for now is to adjust the PR from the fork to merge into a branch we create instead of main first and open a separate PR to merge the changes into main. See SID-104 for more context.

Let me merge this in a branch and reopen. ➰

@gtsiolis gtsiolis changed the base branch from main to gt/merge-16940 July 24, 2023 09:14
@gtsiolis gtsiolis merged commit b3851d8 into gitpod-io:gt/merge-16940 Jul 24, 2023
roboquat pushed a commit that referenced this pull request Aug 28, 2023
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.

Remove the latest editor release warning alert on workspace time out
5 participants