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

Clarification on the .yml extension #744

Closed
Tracked by #1080
rli opened this issue Jan 24, 2022 · 4 comments
Closed
Tracked by #1080

Clarification on the .yml extension #744

rli opened this issue Jan 24, 2022 · 4 comments
Labels
area/documentation Improvements or additions to documentation area/library Common devfile library for interacting with devfiles

Comments

@rli
Copy link

rli commented Jan 24, 2022

/area documentation

Which area this documentation change is related to?

/area library

Issue details

What mistake did you find / what is missing in the documentation?

The devfile library only supports devfile.yaml and .devfile.yaml.

Though the YAML FAQ states that .yaml extension is preferred, .yml is frequently accepted as a valid alternative.

Is there a reason why .yml isn't valid, or was this simply an oversight?

@openshift-ci openshift-ci bot added area/documentation Improvements or additions to documentation area/library Common devfile library for interacting with devfiles labels Jan 24, 2022
@elsony
Copy link
Contributor

elsony commented Feb 8, 2022

It should also allow devfiles with:

  1. .json formatted devfiles
  2. .yml extension
  3. Not restricting the devfile filename other than devfile.yaml, e.g. mydevfile.yaml

@elsony
Copy link
Contributor

elsony commented Mar 28, 2023

This item involves more than the documentation changes. It will require:

  1. Update the library logic to accept devfile.yml and .devfile.yml
  2. Add test cases for looking for devfile.yml and .devfile.yml
  3. Work with the tools to look for files with .yml extension when discovering the devfile within an application

@rm3l
Copy link
Member

rm3l commented Nov 2, 2023

This has been fixed recently with #1265. The devfile library now supports parsing any file it is provided (regardless of its name and extension, as long as it is parsable).
Additionally, in places where a devfile is discovered (e.g., when clients provide a directory as path to the parser), the library will try to pick a devfile based on the following priority order: devfile.yaml > .devfile.yaml > devfile.yml > .devfile.yml
The documentation has also been updated accordingly: https://devfile.io/docs/2.2.1/library#procedure

/close

Copy link

openshift-ci bot commented Nov 2, 2023

@rm3l: Closing this issue.

In response to this:

This has been fixed recently with #1265. The devfile library now supports parsing any file it is provided (regardless of its name and extension, as long as it is parsable).
Additionally, in places where a devfile is discovered (e.g., when clients provide a directory as path to the parser), the library will try to pick a devfile based on the following priority order: devfile.yaml > .devfile.yaml > devfile.yml > .devfile.yml
The documentation has also been updated accordingly: https://devfile.io/docs/2.2.1/library#procedure

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation area/library Common devfile library for interacting with devfiles
Projects
Status: Done ✅
Development

No branches or pull requests

4 participants