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

The workspace should start even if che-server fails to resolve the devfile #21997

Closed
l0rd opened this issue Feb 12, 2023 · 5 comments
Closed
Assignees
Labels
area/dashboard area/factory/dashboard Issues related to factories frontend (che user dashboard side) kind/enhancement A feature request - must adhere to the feature request template. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system. sprint/current status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording
Milestone

Comments

@l0rd
Copy link
Contributor

l0rd commented Feb 12, 2023

Is your enhancement related to a problem? Please describe

If I try to start a workspace from a private repository but OAuth is not supported (e.g. the repo is AzureDevOps) and I get the following error:

Error occurred during creation a workspace from devfile located at `<repo-url>`. Cause: Neither of `apiVersion` or `schemaVersion` found. This is not a valid devfile.

The message is confusing because it looks like Che was able to retrieve a Devfile but it was invalid.
And it's not possible to start the workspace although

Describe the solution you'd like

The message should rather be something like:

::Warning::
Looking for a Devfile in the git repository failed. The git server API may not supported by Eclipse Che (or the git server hasn't been configured appropriately).

Note that the git cloning of the repository will succeed if it's public or it's private and the developer git credentials secret has been configured.

Click to continue

Additional context

image

@l0rd l0rd added the kind/enhancement A feature request - must adhere to the feature request template. label Feb 12, 2023
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 12, 2023
@l0rd l0rd added severity/P1 Has a major impact to usage or development of the system. area/factory/dashboard Issues related to factories frontend (che user dashboard side) area/dashboard and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 13, 2023
@vinokurig vinokurig self-assigned this Mar 2, 2023
@vinokurig
Copy link
Contributor

@l0rd
What should we do on the Click to continue link?

@vinokurig
Copy link
Contributor

vinokurig commented Mar 2, 2023

@l0rd

Note that the git cloning of the repository will succeed if it's public or it's private and the developer git credentials secret has been configured.

Do you mean that if the git provider of the provided git repo url is not supported by Che, and it is a public repo we should apply the default devfile? Like we do now, when we don't find the devfile in a SUPPORTED repository.

@amisevsk
Copy link
Contributor

amisevsk commented Mar 2, 2023

One option to consider is using a fallback option where we

  1. Start a special workspace with the configured project
  2. This workspace clones the repo (which should succeed as long as credentials are set up and the repo is a git repo)
  3. The workspace patches itself to use the content from the in-repo devfile and restarts

It's a slower way of starting workspaces, but would also work even when Che server fails to resolve a devfile (e.g. if SSH keys are used, IIRC). I toyed with this idea in the early days and came up with this: https://github.com/amisevsk/workspace-bootstrap, though it is likely out of date and would need to be updated for Che workspaces.

@ibuziuk
Copy link
Member

ibuziuk commented Mar 3, 2023

@vinokurig could you please sync with @olexii4 and @akurinnoy regarding this issue. I believe the flow should be similar to what we have for repositories when there is no devfile in the project.

What should we do on the Click to continue link?

We should start a workspace using the default devfile and ignore the one that we fail to resolve (btw I think on che-server side the default is still v1 and we should replace it with v2)

@ibuziuk ibuziuk mentioned this issue Mar 7, 2023
45 tasks
@l0rd l0rd added new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording labels Mar 30, 2023
@l0rd l0rd added this to the 7.63 milestone Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard area/factory/dashboard Issues related to factories frontend (che user dashboard side) kind/enhancement A feature request - must adhere to the feature request template. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system. sprint/current status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording
Projects
None yet
Development

No branches or pull requests

6 participants