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

Move config to .gitpod folder #729

Open
svenefftinge opened this issue Aug 14, 2019 · 27 comments
Open

Move config to .gitpod folder #729

svenefftinge opened this issue Aug 14, 2019 · 27 comments
Labels
meta: never-stale This issue can never become stale type: feature request New feature or request

Comments

@svenefftinge
Copy link
Member

As suggested here we should put the gitpod config below .gitpod. It will reduce the noise on the top level, as most setups use two config files (.gitpod.yml, .gitpod.Dockerfile).

@asomervell
Copy link

Yeah so i'd just see at least

/.gitpod/config.yml (or anything / *.yml)
/.gitpod/Dockerfile

And it gives rise in the future to being able to have scripts and things in subfolders

/.gitpod/startup/run_some_test.sh

@JesterOrNot
Copy link
Contributor

Any updates on this?

@RDIL
Copy link

RDIL commented Dec 12, 2019

Can we please add this and also support .theia?
This is something I really really really want.

@JesterOrNot
Copy link
Contributor

@RDIL can you elaborate? .theia is already a folder!

@RDIL
Copy link

RDIL commented Dec 12, 2019

No I mean putting .theia in .gitpod for ultra organization

@Kreyren
Copy link

Kreyren commented Dec 13, 2019

or ideally allowing to specify the location of those files by the user and standardize one directory that is used by default if end-user doesn't override it.

@stale
Copy link

stale bot commented Oct 4, 2020

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.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Oct 4, 2020
@svenefftinge svenefftinge added type: feature request New feature or request and removed meta: stale This issue/PR is stale and will be closed soon labels Jan 12, 2021
@svenefftinge svenefftinge added this to the February 2021 milestone Jan 12, 2021
@csweichel
Copy link
Contributor

csweichel commented Feb 1, 2021

To make this happen we'd have to at least:

  • update ConfigProvider.fetchExternalGitpodFileContent whereby we would remove support for /.gitpod as config file and replace it with support for /.gitpod/config.yaml.
  • update supervisor to look for /.gitpod/config.yaml when creating the config service (determine filename first, then create service. Don't drag variance into the service).
  • update the setup-manager to produce the new file
  • search and replace every occurrence of .gitpod.yml in the repo with .gitpod/config.yaml

We'd also have to agree on some conventions:

  • the new config file is in /.gitpod/config.yaml - notice it's config.yaml not config.yml which is more in line with the cloud native world (e.g. Kubernetes) and the YAML creator's FAQ.
  • if the old and the new file are present (/.gitpod.yml and /.gitpod/config.yaml) the new one takes precedence

Lastly, we should think about a way to migrate old configurations, or do we want to support both modes indefinitely?

@svenefftinge
Copy link
Member Author

We should keep the gitpod.yml filename to make it easier talking about it, no matter it sits top-level or below .gitpod/.
We also should support both .yml and .yaml it would be very confusing if you got the extension wrong and gitpod just ignores it.
The checking order (priority) should be

  • .gitpod/gitpod.yaml
  • .gitpod.yml # legacy
  • .gitpod.yaml # confused legacy
  • .gitpod/gitpod.yml # confused legacy

We can get everyone towards .gitpod/gitpod.yaml by deprecating all other variants and providing a quick fix.

The gp init CLI should create a scaffolding for .gitpod/gitpod.yaml.

@csweichel csweichel added the priority: 💪 stretch goal This issue is a stretch goal within an iteration. label Feb 9, 2021
@akosyakov
Copy link
Member

Just fyi: Theia and Code expects .gitpod.yml to be in checkout location. Maybe it would be better to enhance the supervisor info endpoint to provide a URL to the config.

@csweichel csweichel modified the milestones: February 2021, [do-not-add-issues] March 2021 Mar 1, 2021
@shaal
Copy link
Contributor

shaal commented Apr 5, 2021

Would it be possible to get this feature in, before the next Gitpod release?

@svenefftinge svenefftinge modified the milestones: March 2021, April 2021 Apr 12, 2021
@csweichel csweichel removed this from the April 2021 milestone May 6, 2021
@stale
Copy link

stale bot commented Aug 4, 2021

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.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Aug 4, 2021
@shaal
Copy link
Contributor

shaal commented Aug 4, 2021

Requesting to add meta: never-stale label to this issue.
I think this feature is important, is it going to be implemented?

@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Aug 4, 2021
@stale
Copy link

stale bot commented Nov 3, 2021

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.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Nov 3, 2021
@shaal
Copy link
Contributor

shaal commented Nov 3, 2021

Requesting to add meta: never-stale label to this issue.
I think this feature is important, is it going to be implemented?

@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Nov 3, 2021
@jldec jldec added the meta: never-stale This issue can never become stale label Nov 3, 2021
@shaal
Copy link
Contributor

shaal commented Jan 20, 2022

I still wish we can get this feature.
Everything related to Gitpod, under .gitpod/ directory.

@jldec
Copy link
Contributor

jldec commented Jan 20, 2022

Tracking under developer experience in https://github.com/orgs/gitpod-io/projects/20/views/10

@shaal
Copy link
Contributor

shaal commented May 12, 2022

Checking on the status of this feature request, can it be scheduled?

@ericsampson
Copy link

Shouldn’t files go into a .gitpod folder?
.github is for GitHub config files etc, not a dumping ground for everyone AFAIK?

@shaal
Copy link
Contributor

shaal commented May 26, 2022

@ericsampson AFAIK this whole issue is all about moving Gitpod config files to .gitpod folder.

@cart
Copy link

cart commented May 30, 2022

I'd personally love it if we could put .gitpod.yml into our .github folder. We've been discussing adopting gitpod for Bevy Engine (bevyengine/bevy#4700), but we like to keep our root directory as clean as possible. A .gitpod folder doesn't solve this problem for us as it still increases the noise at the root.

@ericsampson
Copy link

ericsampson commented Jun 3, 2022

@cart why not both :)

Seems like it would be relatively easy and desirable for the feature to be:
"check for X files in root folder, then check in .gitpod, then check in .github"

@pattacini
Copy link
Contributor

"check for X files in root folder, then check in .gitpod (if present), then check in .github (if present)"

This would be definitely great as it will guarantee back-compatibility.

@ericsampson
Copy link

Based on @svenefftinge design above I would propose this update:

The checking order (priority) should be

.gitpod/gitpod.yaml
.gitpod.yml # legacy
.gitpod.yaml # confused legacy
.gitpod/gitpod.yml
.github/gitpod.yaml
.github/gitpod.yml

@cart
Copy link

cart commented Jun 9, 2022

Yup that sounds great to me!

@szab100
Copy link
Contributor

szab100 commented Jun 21, 2022

Personally, I think it is nice and clean as it is today and adding such a checking order would increase the noise.

I have always been using the following structure:

  • a single .gitpod.yml (or .yaml) file in the repo root, with references to files under .gitpod/
  • a single .gitpod/ folder, containing all the helper files (dockerfile, scripts, helpers, docs, etc)

I feel this is the cleanest for both humans & reading programmatically (think of enterprise self-hosted users with custom infra elements aimed at detecting or dealing with "gitpodized" git repositories), since there is always a single, fixed starting point, no need to replicate the checking order logic. Where all the helper files are stored should really be a user preference, while official Gitpod docs and examples should consistently promote a clean structure.

Either way, just my 2-cents.

@jacobparis
Copy link

I'd like to see tools adopt a /config convention as a place to put their configuration files. I think it would only take a few big players to start before other tools follow suit

config:
  .gitpod.yml
  .gitpod.Dockerfile
  .eslintrc
  .prettierrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta: never-stale This issue can never become stale type: feature request New feature or request
Projects
Status: No status
Development

No branches or pull requests