-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow resolver API to resolve other files than [.]devfile.yaml #19540
Comments
Added as a subtask of #18668 |
After internal team discussion, we agreed that custom file resolver has nothing common to factory, so it's more logical to have it in separated service, as example:
|
hello @mshaposhnik will that be efficient ? What about these two usecases:
if so then I don't see why it's not part of the existing resolver service because having to pass a link to a devfile.yaml to grab other resources is counter-intuitive to me (Having like query parameters for file like that won't reach URL limit ? ) |
My thought based on fact that factory resolver service returns |
if the problem is on the returned object then maybe yes a new method can handle that if instead of calling |
@benoitf I would like to give some context that may clarify @mshaposhnik 's proposal. We want to build a service that can return any file from git/scm repository. It is unlinked from the che factory. In case if we think that performance is critical here we always can go with JSON RPC and Websocket. |
@skabashnyuk yes but for usecase2 I don't see how it will work easily The current need is for che acceptance of a devfile so it's where the initial work is expected. If you want to provide a separate API as well, that's nice but exposing a separate API does not mean that |
We want to deprecate |
who will handle #19371 ? (add repository projects entry in the devfile) if not the devfile resolver then ? |
Good question. I don't know. |
@skabashnyuk you discussed that with @sleshchenko 1 month ago. As I remember you agreed to do that at the che devworkspace client level but you should know that better than I do. |
Could be. I do not clearly get the whole picture. I am more or less confident that |
We had a call this morning and considered that milestone 2 due date is the 19th of June and that retrieving the editor and theia plugins from the git repository is a fundamental feature of that milestone we should:
So next step is for @mshaposhnik to propose a change of the current API that could be consumed by the dashboard to retrive these new files. The proposal should be discussed next monday during the DevWorkspace cabal call. |
Is your task related to a problem? Please describe.
Today, dashboard is using the resolver REST API to get devfile.yaml. It supports github, gitlab, bitbucket, etc and avoids to clone repository to get files in a pretty fast way.
But we do need to parse extra files like
.che/che-editor.yaml
,.che/che-theia-plugins.yaml
or.vscode/extensions.json
Describe the solution you'd like
Today dashboard is calling resolver API with url parameter of the 'devfile location'
https://github.com/eclipse/che-dashboard/blob/d611b71241fbba4f625cf33abd1ba42002ff889c/src/store/FactoryResolver.ts#L74
https://github.com/eclipse/che-workspace-client/blob/9a0680107d86524c31aa63548a05713c4f47a574/src/rest/resources.ts#L194
https://github.com/eclipse/che/blob/889187e4e1218ee769e0327e8fb27d1aa45109be/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java#L80
and then it gets data.devfile with the content of the devfile
So here, we could add extra argument like the other files that we may want to extract with relative path from the git repository of the devfile
In addition of
url
, provideextraFiles
,files
being an optional array of string (or any other format/parameter name)and then we can have content of files in returned data
like
data.files.<name-of-file>.content
providing the content of the file and data.files..status saying if the file was there or not (or having content being undefined)Describe alternatives you've considered
Feel free to update resolver method, as long as we can provide extra files to get and get the content (if file exist) in the result, it's 👍
Additional context
Part of DevWorkspace
The text was updated successfully, but these errors were encountered: