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

GitLab group lookup fails when group name is different than path #2036

Open
1 task done
mathamoz opened this issue Jan 11, 2024 · 1 comment
Open
1 task done

GitLab group lookup fails when group name is different than path #2036

mathamoz opened this issue Jan 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mathamoz
Copy link

Which version of kubefirst are you using?

v2.3.7

Which cloud provider?

k3d (local)

Which DNS?

None specific

Which installation type?

CLI

Which distributed Git provider?

GitLab

Did you use a fork of gitops-template?

No

Which Operating System?

Linux

What is the issue?

I created a new group in GitLab called kubefirst-test I didn't notice that the URL path of my created group was kubefirst-test2 even though the name of the group was kubefirst-test.

When running the cluster create command kubefirst k3d create --git-provider gitlab --gitlab-group kubefirst-test --cluster-name kubefirst I received the following error:

image

The issue appears to be that group names are global in GitLab and if you create a group that collides with an existing group GitLab changes it behind the scenes to be unique. The displayed name will still be what you entered though.

The code in https://github.com/kubefirst/runtime/blob/main/pkg/gitlab/gitlab.go#L46 is pulling the FullPath key for the group which could differ from FullName, which is what the user would have entered for the group name in the create command.

Executing kubefirst k3d create --git-provider gitlab --gitlab-group kubefirst-test2 --cluster-name kubefirst will result in the cluster being created successfully.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mathamoz mathamoz added the bug Something isn't working label Jan 11, 2024
@fharper
Copy link
Member

fharper commented Jan 11, 2024

Thanks for bringing this issue to our attention @mathamoz . I'll have the engineering team give a closer look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants