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

Deprecate HttpClientHTTPConduitFactory value of *.http-conduit-factory options #1637

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,10 @@ use `io.vertx.core.http.HttpClient` as the underlying HTTP client. Since {quarku
- `HttpClientHTTPConduitFactory`: the `HTTPConduitFactory` will be set to an implementation always returning
`org.apache.cxf.transport.http.HttpClientHTTPConduit`. This will use `java.net.http.HttpClient` as the underlying HTTP
client.
+
*Deprecated since
xref:release-notes/3.18.0.adoc#_1633_httpclienthttpconduitfactory_value_of_http_conduit_factory_deprecated[3.18.0]*
+++-+++ use other `HTTPConduitFactory` implementations, preferably `QuarkusCXFDefault`.
- `URLConnectionHTTPConduitFactory`: the `HTTPConduitFactory` will be set to an implementation always returning
`org.apache.cxf.transport.http.URLConnectionHTTPConduit`. This will use `java.net.HttpURLConnection` as the underlying
HTTP client.
Expand Down Expand Up @@ -1911,6 +1915,10 @@ use `io.vertx.core.http.HttpClient` as the underlying HTTP client. Since {quarku
- `HttpClientHTTPConduitFactory`: the `HTTPConduitFactory` for this client will be set to an implementation always
returning `org.apache.cxf.transport.http.HttpClientHTTPConduit`. This will use `java.net.http.HttpClient` as the
underlying HTTP client.
+
*Deprecated since
xref:release-notes/3.18.0.adoc#_1633_httpclienthttpconduitfactory_value_of_http_conduit_factory_deprecated[3.18.0]*
+++-+++ use other `HTTPConduitFactory` implementations, preferably `QuarkusCXFDefault`.
- `URLConnectionHTTPConduitFactory`: the `HTTPConduitFactory` for this client will be set to an implementation always
returning `org.apache.cxf.transport.http.URLConnectionHTTPConduit`. This will use `java.net.HttpURLConnection` as the
underlying HTTP client.
Expand Down
42 changes: 42 additions & 0 deletions docs/modules/ROOT/pages/release-notes/3.18.0.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
= {quarkus-cxf-project-name} 3.18.0 release notes

== Important dependency upgrades

* Quarkus 3.17.x -> 3.18.0 - https://quarkus.io/blog/quarkus-3-18-0-released/[release notes]

== New features

== Bugfixes

== Deprecations

=== https://github.com/quarkiverse/quarkus-cxf/issues/1633[#1633] `HttpClientHTTPConduitFactory` value of `*.http-conduit-factory` deprecated

The `HttpClientHTTPConduitFactory` value of
`xref:reference/extensions/quarkus-cxf.adoc#quarkus-cxf_quarkus-cxf-http-conduit-factory[quarkus.cxf.http-conduit-factory]`
and `xref:reference/extensions/quarkus-cxf.adoc#quarkus-cxf_quarkus-cxf-client-client-name-http-conduit-factory[quarkus.cxf.client."client-name".http-conduit-factory]`
existed since the inception of those options in {quarkus-cxf-project-name} 2.3.0.

`HttpClientHTTPConduit` never gained any real traction within {quarkus-cxf-project-name}.
When CXF started using it as a default, we were forced to introduce our own default (`URLConnectionHTTPConduitFactory`)
to avoid bugs like https://github.com/quarkiverse/quarkus-cxf/issues/992[#992],
https://issues.apache.org/jira/browse/CXF-8885[CXF-8885],
https://issues.apache.org/jira/browse/CXF-8951[CXF-8951],
https://issues.apache.org/jira/browse/CXF-8946[CXF-8946],
https://issues.apache.org/jira/browse/CXF-8903[CXF-8903] and possibly others.
Now that we have `VertxHttpClientHTTPConduit`,
which we can support very well on Quarkus,
there are no more reasons for us to spend our resources on `HttpClientHTTPConduit`.

We should mark it as deprecated in our documentation, add some warnings on startup for the case that somebody is still using it and then at some point remove the item from the `io.quarkiverse.cxf.HTTPConduitImpl` enum and also remove the tests covering it.


== Documentation improvements

* Removed dangling experimental status from `VertxHttpClientHTTPConduitFactory` in the ducumentation of
`xref:reference/extensions/quarkus-cxf.adoc#quarkus-cxf_quarkus-cxf-http-conduit-factory[quarkus.cxf.http-conduit-factory]`
and `xref:reference/extensions/quarkus-cxf.adoc#quarkus-cxf_quarkus-cxf-client-client-name-http-conduit-factory[quarkus.cxf.client."client-name".http-conduit-factory]`

== Full changelog

https://github.com/quarkiverse/quarkus-cxf/compare/3.17.2+++...+++3.18.0
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ public void externalLinks() {
"http://www.w3.org/2009/xmlenc11#aes256-gcm");
final Set<String> ignorables = new LinkedHashSet<>(ignorables1);

final ZonedDateTime deadline = ZonedDateTime.parse("2024-11-28T23:59:59+01:00[Europe/Paris]");
final ZonedDateTime deadline = ZonedDateTime.parse("2025-01-28T23:59:59+01:00[Europe/Paris]");
if (ZonedDateTime.now(ZoneId.of("Europe/Paris")).isBefore(deadline)) {
ignorables.add("https://quarkus.io/blog/quarkus-3-17-0-released/");
ignorables.add("https://quarkus.io/blog/quarkus-3-18-0-released/");
ignorables.add("https://github.com/quarkiverse/quarkus-cxf/compare/3.17.2...3.18.0");
}

AntoraTestUtils.assertExternalLinksValid(err -> ignorables.contains(err.uri()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,10 @@ public interface CxfClientConfig {
* - `HttpClientHTTPConduitFactory`: the `HTTPConduitFactory` for this client will be set to an implementation always
* returning `org.apache.cxf.transport.http.HttpClientHTTPConduit`. This will use `java.net.http.HttpClient` as the
* underlying HTTP client.
* +
* *Deprecated since
* xref:release-notes/3.18.0.adoc#_1633_httpclienthttpconduitfactory_value_of_http_conduit_factory_deprecated[3.18.0]*
* +++-+++ use other `HTTPConduitFactory` implementations, preferably `QuarkusCXFDefault`.
* - `URLConnectionHTTPConduitFactory`: the `HTTPConduitFactory` for this client will be set to an implementation always
* returning `org.apache.cxf.transport.http.URLConnectionHTTPConduit`. This will use `java.net.HttpURLConnection` as the
* underlying HTTP client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public interface CxfFixedConfig {
* - `HttpClientHTTPConduitFactory`: the `HTTPConduitFactory` will be set to an implementation always returning
* `org.apache.cxf.transport.http.HttpClientHTTPConduit`. This will use `java.net.http.HttpClient` as the underlying HTTP
* client.
* +
* *Deprecated since
* xref:release-notes/3.18.0.adoc#_1633_httpclienthttpconduitfactory_value_of_http_conduit_factory_deprecated[3.18.0]*
* +++-+++ use other `HTTPConduitFactory` implementations, preferably `QuarkusCXFDefault`.
* - `URLConnectionHTTPConduitFactory`: the `HTTPConduitFactory` will be set to an implementation always returning
* `org.apache.cxf.transport.http.URLConnectionHTTPConduit`. This will use `java.net.HttpURLConnection` as the underlying
* HTTP client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transport.http.HTTPConduitFactory;
import org.apache.cxf.transport.http.HTTPTransportFactory;
import org.apache.cxf.transport.http.HttpClientHTTPConduit;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.jboss.logging.Logger;

import io.quarkiverse.cxf.vertx.http.client.HttpClientPool;
import io.quarkus.logging.Log;
import io.vertx.core.Vertx;

/**
Expand Down Expand Up @@ -76,6 +78,12 @@ private HTTPConduit configure(HTTPConduitSpec httpConduitImpl, CXFClientInfo cxf
EndpointInfo localInfo,
EndpointReferenceType target) throws IOException {
final HTTPConduit httpConduit = httpConduitImpl.createConduit(httpClientPool, b, localInfo, target);
if (httpConduit instanceof HttpClientHTTPConduit) {
Log.warnf("Usage of %s is deprecated since Quarkus CXF 3.18.0."
+ " You may want to review the options quarkus.cxf.http-conduit-factory and/or quarkus.cxf.client.\"%s\".http-conduit-factory",
HttpClientHTTPConduit.class.getName(),
cxfClientInfo.getConfigKey());
}
httpConduitImpl.tlsClientParameters(cxfClientInfo, vertx).ifPresent(httpConduit::setTlsClientParameters);
final HTTPClientPolicy policy = new HTTPClientPolicy();
httpConduit.setClient(policy);
Expand Down
Loading