gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.72k stars 1.21k forks source link

Epic: Deprecate definitely-gp #8473

Open jldec opened 2 years ago

jldec commented 2 years ago

Early Gitpod users were given the option of storing their config in https://github.com/gitpod-io/definitely-gp/ instead of in their own repo. This feature is not documented anymore.

Workspaces start by looking for a directory in definitely-gp which matches the repo name, and then use the configuration from that directory. The configuration can include both gitpod.yml and a Dockerfile.

There are several issues with this approach

See discord discussion

Proposal
Gitpod should deprecate the built-in runtime use of files from definitely-gp for workspace configuration.

A community-driven repo like https://github.com/shaal/awesome-gitpod would be a better way to share best practices of how to configure Gitpod for different frameworks or languages.

If there are significant numbers of repos in use which regulary depend on this capability, we should do this in 2 stages (if the number is small say < 100, we can simply remove the capability immediately):

The length of the deprecation period depends on how heavily used this feature is.

Background

I noticed when opening a repo called kit that the workspace was being initiazlized with pnpm, even though it was configured for npm with a package-lock.json.

Screenshot 2022-02-27 at 22 21 16

Screenshot 2022-02-27 at 22 20 51

A GitHub search revealed that the init and command tasks were probably coming from here: https://github.com/gitpod-io/definitely-gp/blob/master/kit/.gitpod.yml.

From the inference code here and implementation here it appears that opening a workspace on any repo whose name matches a directory in https://github.com/gitpod-io/definitely-gp will attempt to use the configuration from there.

To reproduce

For another example see https://gitpod.io/#https://github.com/gitpod-io/book

jldec commented 2 years ago

@jankeromnes, assigned to you, since you helped review https://github.com/gitpod-io/gitpod/pull/7383 šŸ˜ƒ

Unless we can do smarter detection, we should probably remove definitely-gp as a source of inferred configurations. Not copying those configurations into the repo, also makes it really hard for users to understand what's happening.

cc: @svenefftinge

jankeromnes commented 2 years ago

@jldec A quick fix for this could be to place the "kit" directory in definitely-gp under a "sveltejs" directory, to make the matching more precise.

From past experience, anything with 4 letters or less is prone to false-positive matches, and should be configured as "org/repo", not just "repo".

jldec commented 2 years ago

@jankeromnes

I would prefer to stop auto-matching on directories in definitely-gp and just document it's existence in our docs so that users can copy and maintain themselves.

jeanp413 commented 2 years ago

:100: to deprecate definetely-gp, I created an issue a while ago to at least make it configurable to opt-out https://github.com/gitpod-io/gitpod/issues/7336 as it was causing me trouble when opening upstream vscode repo @jldec feel free to close #7336 as a duplicate of this issue

loujaybee commented 2 years ago

Related: https://github.com/gitpod-io/gitpod/issues/3746

andreafalzetti commented 2 years ago

+1 on deprecating the current behavior, too magical and causes undesired side-effects.

However, also in light of #3746, it would be interesting to discuss how to keep this feature reimplementing it slightly differently.

If I could have a user setting in which I can maintain my own list of repos that are checked fist, I could decide to opt-in for using the community-driven repo or even have my own private repo in which I configure Gitpod for private repos to which I cannot commit the .gitpod.yml.

axonasif commented 2 years ago

Maybe ask the user whether to load a gitpod provided config or not during workspace start?

Pothulapati commented 2 years ago

Hey šŸ‘‹šŸ¼ ,

With https://github.com/gitpod-io/gitpod/pull/9094/files, We are setting the definitelyGpDisabled option to be true, and thus disabling it by default. Should we update the SAAS and preview environments deployment configs to enable it (i.e setting it to false) as a part of that PR? šŸ¤”

laushinka commented 2 years ago

Should we update the SAAS and preview environments deployment configs to enable it (i.e setting it to false) as a part of that PR? šŸ¤”

@Pothulapati Isn't the SAAS deployment set to false by default already?

Pothulapati commented 2 years ago

Should we update the SAAS and preview environments deployment configs to enable it (i.e setting it to false) as a part of that PR? šŸ¤”

@Pothulapati Isn't the SAAS deployment set to false by default already?

Hmm, Where is it being set? I couldn't find the configuration anywhere and hence the question! If it is already being set explicitly , then the change would go smooth! If not then it will be set to true after it's merged as the installer's default is being changed. šŸ¤”

stale[bot] commented 2 years ago

This issue 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.

AlexTugarev commented 1 year ago

Reverted in https://github.com/gitpod-io/gitpod/pull/18306. It should be possible to re-apply the PR with some changes.