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

Support workspace creating from repository if it contains .devfile.yaml/devfile.yaml file #12675

Closed
sleshchenko opened this issue Feb 15, 2019 · 8 comments
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.

Comments

@sleshchenko
Copy link
Member

sleshchenko commented Feb 15, 2019

Description

Now, Factory API supports only repositories with Devfile if file name is .devfile
https://github.com/eclipse/che/blob/7a9feef2b553fd20ffc85f2a53b8f38b2e75847f/plugins/plugin-github/che-plugin-github-factory-resolver/src/main/java/org/eclipse/che/plugin/github/factory/resolver/GithubURLParser.java#L93
But many editors do not enable YAML syntax highlighting if file name does not have format specified.
I think it is better to add support workspace creating from repository if it contains .devfile.yaml file.

See how it affects displaying by Github Without format specified:

screenshot_20190215_163708

With format specified:

screenshot_20190215_163725

See how it affects displaying by Atom editor

Without format specified:

screenshot_20190215_164032

With format specified:

screenshot_20190215_164042

Actually, a user may want not to hide Devfile file from file managers, and it would be good to give a user choice and name Devfile as he wants - with dot or without at the begigging of name.

@sleshchenko
Copy link
Member Author

@l0rd @skabashnyuk WDYT?

@sleshchenko sleshchenko added kind/enhancement A feature request - must adhere to the feature request template. team/platform labels Feb 15, 2019
@garagatyi
Copy link

👍 YAML indentation can also be validated to avoid some basic mistakes

@l0rd
Copy link
Contributor

l0rd commented Feb 18, 2019

@sleshchenko I amo 👍 for your proposal. But honestly the biggest issue for me is that no error is shown if a file .devfile is not found. At this stage it's ok to support only .devfile but if there is no such file is found (because the user has named it devfile.yaml for instance) an error should be shown:

No valid devfile hasn't been found in the github repository. There is no <URL>/.devfile.

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Feb 18, 2019

@lord That is because we still support this kind of factories which pointing to any GH repo, even without .devfile/factory.json/e.t.c. In this case project will be cloned, and defaut plugins applied to the WS conf.

@l0rd
Copy link
Contributor

l0rd commented Feb 18, 2019

Thank you for your explanation @mshaposhnik but I don't think we should support that. It's really misleading.

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Feb 18, 2019

No problem, if it's decomissioning will be approved by @slemeur

@slemeur
Copy link
Contributor

slemeur commented Feb 18, 2019

I'm -1 to remove that.

In fact, that allows to import a project in Che with just a URL even if there is no devfile and factory.

That allows flow like:
{host}/f?{my_repo}

We can't expect that the devfile will be define before the project gets imported in Che.

It should be easy / simple to import in Che and requires the minimum of pre-requisities. Once the developer is in Che, we make the configuration of the workspace easy and allow the developer to version that with a devfile.

Also, Che should be able to analyze the project, detect the technologies used and propose to the user a workspace that fits with his needs.

@skabashnyuk skabashnyuk added the severity/P1 Has a major impact to usage or development of the system. label Mar 6, 2019
@sleshchenko
Copy link
Member Author

Is not actual after merge of #12965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

6 participants