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] Removes unused RepositoryService.canInstall #19112

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

AlexTugarev
Copy link
Member

@AlexTugarev AlexTugarev commented Nov 22, 2023

Description

PR to remove unused code.

Summary generated by Copilot

🤖[deprecated] Generated by Copilot at ac7fe43

This pull request simplifies and cleans up the code of various classes and files related to prebuilds and repository services. It removes unused dependencies, methods, imports, and tests, and refactors some constructors and helper methods. The overall purpose is to improve code quality, consistency, and performance.

Related Issue(s)

Fixes #

How to test

  • See you can create a workspace in preview environment w/o issues.

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
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • 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

@@ -1122,30 +1120,6 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
context = WithDefaultConfig.mark(context);
}

// if this is an explicit prebuild, check if the user wants to install an app.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is no longer supported for quite a while, i.e. context may never get parsed to StartPrebuildContext and reach createWorkspace here.

StartPrebuildContext is used to encapsulate a rich context in prebuild manager, which then uses this as input for workspace starter.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm missing the context atm to verify this

That can be taken quite literally ;-)

https://gitpod.io/new/#prebuild/https://github.com/gitpod-io/gitpod

☝🏻 this results in that 👇🏻

We're sorry, there seems to have been an error.
Error: Couldn't parse context 'prebuild/https://github.com/gitpod-io/gitpod'

But in createWorkspace the cold path was never removed. 🤷🏻‍♂️

Copy link
Member Author

Choose a reason for hiding this comment

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

Quick test on the preview env:
https://at-remove-f7bcae44fe.preview.gitpod-dev.com/new/#https://github.com/AlexTugarev/bel ✔️ (workspace is starting fine)

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

Code changes LGTM, ✔️ to unblock.

I'm missing the context atm to verify this, but it has been on the short list for removal for quiiiiite some time now 🧡

@AlexTugarev
Copy link
Member Author

/unhold

@roboquat roboquat merged commit 0fba169 into main Nov 22, 2023
41 checks passed
@roboquat roboquat deleted the at/remove-unused-caninstall branch November 22, 2023 11:14
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.

3 participants