-
Bug
-
Resolution: Done
-
Critical
-
3.7.0.GA
-
False
-
-
False
-
Release Notes, User Experience
-
-
Bug Fix
-
Done
-
-
Description of problem:
DevSpaces cannot find devfile in the hosted GitLab server private repositories where OAuth integration is in place and works successfully.
When pointing to a GitLab private repository that has devfile.yaml at the root of the repository, it gets the following error:
{{2023-07-19 22:37:53,849[nio-8080-exec-3] [DEBUG] [.e.c.a.f.s.u.URLFactoryBuilder 128] - Unreachable devfile location met: https://gitlab.mycompany.com/api/v4/projects/openshift%2Fdevspace-platform/repository/files/devfile.yaml/raw. Error is: Server returned HTTP response code: 400 for URL: https:// gitlab.mycompany.com /api/v4/projects/openshift%2Fdevspace-platform/repository/files/devfile.yaml/raw
}}
When you try to access the above link, you get:
{{
{"error":"ref is missing, ref is empty"}}}
According to GitLab's API docs, ref is a required field to list repository: https://docs.gitlab.com/ee/api/repository_files.html
and if you add ?ref=main to the URL (like https://gitlab.mycompany.com/api/v4/projects/openshift%2Fdevspace-platform/repository/files/devfile.yaml/raw?ref=main), it returns the devfile.
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
Use a hosted GitLab private repository URL that has devfile at the root to create a workspace.
Actual results:
Devfile could not be found. Applying default configuration.
Expected results:
Workspace environment to be created based on the devfile.yaml in the repository.
Reproducibility (Always/Intermittent/Only Once):
Always
Acceptance criteria:
Able to create workspace from devfile inside the private GitLab repository (hosted) where OAuth config is in place
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):