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

Make Tycho work behind https proxy #3303

Merged
merged 1 commit into from
Dec 24, 2023

Conversation

Bananeweizen
Copy link
Contributor

@Bananeweizen Bananeweizen commented Dec 24, 2023

If a proxy is specified with the https procotol in the settings.xml, Tycho fails downloading artifacts from any URL that uses that proxy, because it wrongly configures a SOCKS transport in such cases.

Fixes #1935, #2709, #2533.

This affects all 4.x versions and should probably be backported.

Fame belongs to @glatuske who had pointed me to that line some time earlier already...

If a proxy is specified with the https procotol in the settings.xml,
Tycho fails downloading artifacts from any URL that uses that proxy,
because it wrongly configures a SOCKS transport in such cases.

Fixes eclipse-tycho#1935, eclipse-tycho#2709, eclipse-tycho#2533.
@Bananeweizen
Copy link
Contributor Author

The documentation probably also needs to be updated. In Tycho < 4.x it was sufficient to have a single https proxy entry in the settings.xml. It worked for both http and https URLs. With Tycho 4 it is mandatory to have one entry for http and one for https, even though that is typically the same proxy.

Copy link

Test Results

  576 files  ±0    576 suites  ±0   3h 44m 27s ⏱️ - 3m 23s
  380 tests ±0    371 ✅  - 2   6 💤 ±0  3 ❌ +2 
1 140 runs  ±0  1 118 ✅  - 2  19 💤 ±0  3 ❌ +2 

For more details on these failures, see this check.

Results for commit 9995887. ± Comparison against base commit 134f372.

@laeubi laeubi added the backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change label Dec 24, 2023
@laeubi
Copy link
Member

laeubi commented Dec 24, 2023

@Bananeweizen many thanks for this fix, regarding http/https I think if its not mandatory for plain maven we maybe should try to emulate it but in general I often see different proxy configs for http/https/socks so it does not seems to be much of an issue given that https should be preferred these days over http anyways.

Maybe it would be good to have a new "configuring proxys and mirrors" section here that explains some details regarding Tycho https://tycho.eclipseprojects.io/doc/latest/index.html

this can be done by adding a new item here: https://github.com/eclipse-tycho/tycho/tree/main/src/site

Beside that, I wish you a merry christmas 🎄

@laeubi laeubi merged commit d64b98f into eclipse-tycho:main Dec 24, 2023
8 of 11 checks passed
Copy link

💚 All backports created successfully

Status Branch Result
tycho-4.0.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@Bananeweizen
Copy link
Contributor Author

It might work with a single entry, if the protocol is http (without s), because Maven will fall back to that entry for https: https://github.com/apache/maven-resolver/blob/bcb81f4286448e60fbc6ceb109adffafb21bd359/maven-resolver-util/src/main/java/org/eclipse/aether/util/repository/DefaultProxySelector.java#L82C1-L82C1.
Unfortunately, at least in our company basically everyone is using the https entry only, because that worked better with Tycho in the past.

I'll have a look at the documentation part, when there is some more spare time. Starting towards Christmas celebration now. Wish you a good time, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing proxy config in BaselineMojo?
2 participants