Skip to content

Commit 5fbc8d2

Browse files
authored
fix(service): fix import of private datasets with gitlab cloud native deployments (#3193)
1 parent bb326d2 commit 5fbc8d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

renku/ui/service/jobs/datasets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ def _is_safe_to_pass_gitlab_token(project_git_url, dataset_uri):
9191
project_host = GitURL.parse(project_git_url).hostname
9292
dataset_host = urllib.parse.urlparse(dataset_uri).netloc
9393

94+
# NOTE: URLs changed from domain/gitlab to gitlab.domain when moving to cloud native gitlab
95+
if project_host.startswith("gitlab.") and not dataset_host.startswith("gitlab."):
96+
project_host = project_host.replace("gitlab.", "", 1)
97+
9498
return project_host == dataset_host
9599

96100

0 commit comments

Comments
 (0)