question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow resolver API to resolve other files than [.]devfile.yaml

See original GitHub issue

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, provide extraFiles, 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.<name-of-file>.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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
mshaposhnikcommented, May 17, 2021

So the following scheme is proposed and not meet any objections:

  • Project information as a separate field;
  • Separate file resolver service, with ready-to-use links to it included in factory resolve response.

Screenshot_1

0reactions
l0rdcommented, May 11, 2021

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:

  • temporarily use current factory API to get those new files
  • refactor the che-server resolver API and analyse performances as part of devfile v2 milestone 3

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expand support of devfile v2 in Che to include definition of ...
A Che Theia plugin is specified using the file che-theia-plugins.yaml of the che-plugin-registry ... Allow resolver API to resolve other files than [.] ......
Read more >
Chapter 4. Known issues Red Hat OpenShift Dev Spaces 3.0
The workspace-starting page displays the following error message: Failed to resolve a devfile. Failed to request factory resolver: Internal Server Error ...
Read more >
Introduction to Devfile - GitHub Pages
Component type which allows to define docker image based configuration of container in workspace. Devfile can only contain one component with dockerimage type....
Read more >
ResolveFiles Method (Client.ResolveFileDelegate, Options ...
'p4 resolve' resolves changes to files in the client workspace. 'p4 resolve' works only on files that have ... different set of depot...
Read more >
OpenShift Container Platform 4.8 release notes
resourceGroupName field in the install-config.yaml file. ... resulting in upgrade duration scaling of less than one minute per additional node.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found