devfile / api

Kube-native API for cloud development workspaces specification
Apache License 2.0
261 stars 63 forks source link

Clarify devfile placement and filename #1035

Closed kadel closed 17 hours ago

kadel commented 1 year ago

Which area this feature is related to?

/area documentation

vishaltak commented 1 year ago

@kadel - Thank you for opening this issue.

Is it required for devfile to always be in the root of the project directory / git repository?

Is this assuming that there will only be 1 devfile for a project? Do we not see the a scenario where there can be 2 devfiles in a project?

Artifact 1 GitHub Codespaces supports .devcontainer.json format and this is what they say in their documentation

You can define a single dev container configuration for a repository, different configurations for different branches, or multiple configurations. When multiple configurations are available, users can choose their preferred configuration when they create a codespace. This is particularly useful for large repositories that contain source code in different programming languages or for different projects. You can create a choice of configurations that allow different teams to work in a codespace that's set up appropriately for the work they are doing.

Artifact 2

https://gitlab.com/gitlab-org/remote-development/gitlab-remote-development-docs/-/merge_requests/11#note_1279032366


What are acceptable filenames for devfile? Does it always have to be devfile.yaml or devfile.yml?

devfile is essentially a configuration file. Thus, I would assume it would follow the dotfile convention i.e. .devfile.yaml / .devfile.yml ?

Also, if both .yaml and .yml are acceptable, what to do when both these files are present?

l0rd commented 1 year ago

We should specify a default (e.g. .devfile.yaml) but allow configurability too (for the large repository use case for example). Eclipse Che looks for .devfile.yaml and devfile.yaml but, with the devfilePath URL parameter, supports Devfiles with a different name and path.

For the default name I am in favor of the proposal to follow the dotfile convention: .devfile.yaml (all lowercase).

For the default extension I would support .yaml only based on the YAML spec FAQ.

This has the merit to avoid 2 conflicting devfiles in the same repo.

elsony commented 1 year ago

Also refer to https://github.com/devfile/api/issues/1071 since some of the items may be addressed as part of the item (or need enhancements)

maysunfaisal commented 1 year ago

We may have documented this usage, I will find out and confirm

rm3l commented 1 year ago

We may have documented this usage, I will find out and confirm

@maysunfaisal Were you able to determine if/where this was documented? A user reported a related issue in https://github.com/redhat-developer/odo/issues/7060 (about the default filename extension), and I think we need to clarify this.

elsony commented 1 year ago

Discussed on community call on 9/18:

  1. We'll support both .yaml and .yml
  2. If variants of them are present in the same directory, the .yaml one has priority
  3. Need to update the documentation to reflect the change
  4. After this item is done, we'll need other tools, e.g. odo, ODC, and RHTAP, to start supporting .yml extensions.
rm3l commented 1 year ago

Added to the upcoming refinement call.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.