-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feature: Gitlab module will not always work with internal service names #9537
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Can you please add a changelog fragment? Thanks.
Also, did you check which versions of the Python gitlab library support keep_base_url
?
@felixfontein keep_base_url was added in https://github.com/python-gitlab/python-gitlab/releases/tag/v3.8.0 which is 2 years ago. Do I need to add a contraint somewhere? Else feel free to merge. |
The modules likely also support older versions of python-gitlab, and this PR would break these older versions. (gitlab_branch for example explicitly supports |
@felixfontein Hi, I am a bit confused. The change affects all the modules, since it is a change in the client used globally. To me it looks more like we shall lift the requirements to >= 3.8.0 for all gitlab modules accept gitlab-runner. |
That's a breaking change and will not get merged. |
Ok that is fine with me... though can you plan it for next major? |
A breaking change first requires a deprecation, which doesn't exist in this case. Also I don't see why the minimum version should be bumped if this can be easily solved by checking the version of python-gitlab. The file you changed has multiple examples of how that works. |
@felixfontein Good point. I see now what you want. |
@felixfontein You can review again. Thanks for your tip. |
This comment was marked as outdated.
This comment was marked as outdated.
@felixfontein "FATAL: Environment |
Will get fixed by #9552. |
Restarting CI. |
Hmm, looks like it didn't help. I guess you have to add another commit, or rebase with latest |
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
@felixfontein Ok thanks for the help. Your turn again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @xrow thanks for your contribution.
Your changelog frag needs a small adjustment, other than that it LGTM.
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Sorry @felixfontein on vacation now so slipped my emails :) I would personally make this configurable but disabled by default because it's almost like abusing the default external URL on the gitlab instance (gitlab doesn't support multiple external URLs yet). For the most part it works but some list endpoints and redirects might be broken this way IMO but it's been a while so not sure if that's improved. Here are my thoughts on this from the initial PR for the library: python-gitlab/python-gitlab#2149 (comment) |
It looks like there is no impact on the external url, because of |
SUMMARY
Enabling this switch allows the the gitlab module to communicate over internal host names with the api.
gitlab.example.com <- Public Host / Ingress
gitlab.gitlab.svc:8080 <- Internal Service name in Kubernetes
ISSUE TYPE
COMPONENT NAME
gitlab