Che: Default devfile name

Created on 6 Mar 2019  路  15Comments  路  Source: eclipse/che

Description

The devfile is the new format that we use to define Che workspaces (c.f. http://redhat-developer.github.io/devfile).

We want users to include a devfile at the root of their github repository: they can then open a corresponding Che workspace just by opening the following URL:

https://<your-che-host>/f?url=<your-github-repo>

To support this use case we currently look for a specific file named .devfile at the root of the repository (<your-github-repo>/.devfile).

But .devfile may not be a good name because we don't get yaml syntax highlighting in most of the IDEs (Che included) (c.f. #12675). We could use .devfile.yml but what about devfile.yml or Devfile?

What name do you prefer? Please add a :thumbsup: to one of the comments below that correspond to your preferred naming.

kinquestion severitP1 teaplatform

Most helpful comment

devfile.yml

Without a dot because do we really need to "hide" the file?

All 15 comments

.devfile

The current "minimal" default name

.devfile.yml

That's similar to .travis.yml and allow to have yaml syntax highlighting.

devfile.yml

Without a dot because do we really need to "hide" the file?

Devfile

Dockerfile style

I like the idea of making the file visible in the repo, and I quite like the analogy to Makefile. If we don't end up with a proliferation of similar files in the root, I would go with Devfile. or devfile.yml

If it's a yaml file, I'd go with devfile.yml in order to benefit from syntax highlighting/colours/suggestions.

If it's a Dockerfile-style file, then Devfile.

Looks like devfile.yml - won

This change will introduce breaking changes with existed ".devfile" factory flow. That means that if someone has a ".devfile" in the repository and use it with factory then default "empty" devfile would be used.
We are improving UX to make sure that the user can see what devfile was used with factory https://github.com/eclipse/che/issues/12741/
also takin into account amount of other work "devfile" related work and the fact that we are in 7.x-beta it doesn't make sense to spend a lot of time on backward support before GA. So the plan:

  • to do a change
  • send a note to the mail list.

@skabashnyuk that looks like a good plan

I noticed that YAML files in Che Plugin Registry have .yaml extension but not .yml. I think it would be better to have a convention about YAML files extension in Che.
@l0rd WDYT? Should we use devfile.yaml instead of devfile.yml?

.yml the shorter the better

@l0rd Then it would be nice to use .yml everywhere in Che repositories, otherwise it's confusing.
Note that official YAML site reccomends to use .yaml. See https://yaml.org/faq.html

  1. Is there an official extension for YAML files?

    Please use ".yaml" when possible.

Although .yaml is the one suggested on yaml.org .yml is more widespread. For instance travis uses .yml and since it's common to find it in github repositories I thought it would be nicer to have the same 3 letter extension.

But it doesn't really make a big difference to me. Should we start a new poll? I don't think so. Do what you think it's better but 1) be consistent 2) don't spend to much time discussing it ;-)

I suggest we do it like OSBS does: support both .yaml and .yml, but provide examples and docs that use .yml. Because shorter is better. :)

Support both isn't a trivial task. That will require a huge refactoring of existing approach, which doesn't fit into this particular issue. You're welcome to create a new one where you can describe the motivation part.
@lord since i cannot commit into chectl, someone need to upgrade the devile there too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sleshchenko picture sleshchenko  路  3Comments

JamesDrummond picture JamesDrummond  路  3Comments

sudheerherle picture sudheerherle  路  3Comments

amisevsk picture amisevsk  路  3Comments

apupier picture apupier  路  3Comments