-
Notifications
You must be signed in to change notification settings - Fork 93
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
[JENKINS-62779] handle proxy hosts exclusions #133
Conversation
I agree with @thomasgl-orange |
This issue has impacted all of our pipelines too! |
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.
Hello, thanks @thomasgl-orange for proposing a fix, I’m sorry to see that my last PR broke your pipelines 🙇♂️ . I did not identified your use case.
I made a small feedback.
src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabHookCreator.java
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/gitlabbranchsource/GitLabHookCreator.java
Show resolved
Hide resolved
src/main/java/io/jenkins/plugins/gitlabbranchsource/helpers/GitLabHelper.java
Show resolved
Hide resolved
Build failed for infra issues, I will close and reopen the PR to force a rebuild. |
@efriandika, @stuartgrieve: |
Great @thomasgl-orange... Thanks for your works... |
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.
I was affected by this (GitLab on-premise, but proxy needed for internet connection) and this fixed it for me (tested with the incremental)
Can we expect a speedy release of the updated plugin? |
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.
LGTM
hi @thomasgl-orange, thanks for your excellent PR.
See JENKINS-62779.
This is a follow-up to #124, recently released in 1.5.5. This PR has introduced support for using an HTTP proxy server (the one configured in the Jenkins Update Center settings) when connecting to a GitLab server. But the proxy exclusions settings (the "No Proxy Host" list) is ignored with this implementation. Quoting @jbdelpech:
So, this was actually an improvement for some users, but also a regression for some others:
This PR adds support for taking the "no proxy" hosts list into account. We know the target GitLab server host, thus we can test whether it matches the proxy exclusions list or not, and if it does we can avoid passing proxy properties to the gitlab4j API.
A trick for testing the "no proxy" hosts list for a given target host is to use
ProxyConfiguration.getNoProxyHostPatterns()
(see usage examples).There are no new unit tests in this PR. I only did minimal manual testing via the "Test Connection" button with different proxy settings, and also checked that existing unit tests are still okay.
CC for review: @jbdelpech, @markyjackson-taulia and @eugenelesnov (from #124), and @LinuxSuRen (because this fixes a regression of the recently released version 1.5.5)