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

Update MP REST Client to 4.0 #43959

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

radcortez
Copy link
Member

@radcortez radcortez commented Oct 18, 2024

MicroProfile REST Client Release notes:

4.0

  • New overloaded `baseUri(String uri)` method so users don’t have to call URI.create()
  • New `header(String name, Object value)` method for adding headers to Client instances
  • Clarify specification CDI support (`@RestClient` qualifier is not optional)
  • Add multi-part processing example to specification.
  • Clarify the specification that when a client injected as a CDI bean falls out of scope, the client is closed

MicroProfile Rest Client Spec PDF
MicroProfile Rest Client Spec HTML
MicroProfile Rest Client Spec Javadocs

@quarkusio quarkusio deleted a comment from quarkus-bot bot Oct 18, 2024
Copy link

github-actions bot commented Oct 18, 2024

🎊 PR Preview de27583 has been successfully built and deployed to https://quarkus-pr-main-43959-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

This comment has been minimized.

This comment has been minimized.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It looks mostly good to me except for some minor suggestions.

I would prefer for @geoand to have a look though.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Co-authored-by: Guillaume Smet <[email protected]>
Comment on lines +61 to +64
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I mind, but I would like to know why this is now necessary

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if it's necessary, we might have to depend on the quarkus-resteasy-multipart extension instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the dependency from RESTEasy that provides the EntityPart.Builder implementation. Note that for the REST Client Classic, I've tried to keep it as the original implementation: resteasy/resteasy-microprofile@bb8b433

Comment on lines +836 to +838
return Stream.of(type.getMethods())
.filter(method -> !IGNORED_METHODS.contains(method))
.toArray(Method[]::new);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm definitely no fan of this, but we can let it go in :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is a copy from the original RESTEasy Builder code:
resteasy/resteasy-microprofile@cb58ceb

Initially, we used the one provided by RESTEasy, but we made a copy to remove references to their CDI integration and also to remove the CDI dependency. They diverged a bit, so I've tried to reconcile them again for consistency.

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

Copy link

quarkus-bot bot commented Oct 21, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 6c4a5b6.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

quarkus-bot bot commented Oct 21, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 6c4a5b6.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/grpc/deployment

io.quarkus.grpc.server.devmode.GrpcDevModeTest.testProtoFileChangeAndImplementationReload - History

  • /home/runner/work/quarkus/quarkus/extensions/grpc/deployment/target/quarkus-dev-mode-test16620780450342298993/target/classes/io/grpc/testing/integration/Messages$SimpleResponse$1.class - java.nio.file.NoSuchFileException
java.nio.file.NoSuchFileException: /home/runner/work/quarkus/quarkus/extensions/grpc/deployment/target/quarkus-dev-mode-test16620780450342298993/target/classes/io/grpc/testing/integration/Messages$SimpleResponse$1.class
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
	at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
	at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1851)

📦 integration-tests/infinispan-cache

io.quarkus.it.cache.infinispan.InfinspanCacheClientTestCase.test - History

  • expected: <false> but was: <true> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1145)
	at io.quarkus.it.cache.infinispan.InfinspanCacheClientTestCase.invalidate(InfinspanCacheClientTestCase.java:77)

⚙️ JVM Tests - JDK 17 Windows

📦 extensions/opentelemetry/deployment

io.quarkus.opentelemetry.deployment.metrics.HttpServerMetricsTest.collectsHttpRouteFromEndAttributes - History

  • Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a Lambda expression in io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter expected: <true> but was: <false> within 5 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter.assertCountPointsAtLeast(InMemoryMetricExporter.java:131)
	at io.quarkus.opentelemetry.deployment.common.exporter.InMemoryMetricExporter_ClientProxy.assertCountPointsAtLeast(Unknown Source)

@gsmet gsmet merged commit 1a1a941 into quarkusio:main Oct 23, 2024
54 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.17 - main milestone Oct 23, 2024
@rsvoboda
Copy link
Member

No description, noteworthy label, or indication if there are implications on end-user applications ...
@radcortez would you please cover that?

@michalvavrik
Copy link
Member

michalvavrik commented Oct 24, 2024

I have opened issue here #44067 because it cost me time to find this. Please document this. There is no PR description, there is no migration guide change, there is no documentation change. Thank you

@radcortez
Copy link
Member Author

No description, noteworthy label, or indication if there are implications on end-user applications ... @radcortez would you please cover that?

The reported issue in #44067 is not caused by this change, which is a very simple one with zero impact on the end user.

It is caused by #43345, which completely describes the changes, including the breaking changes.

@michalvavrik
Copy link
Member

It is caused by #43345, which completely describes the changes, including the breaking changes.

I apologize for my mistake. I don't think any of comments requesting documentation and PR description were wrong and it is true that there were no migration guide note, but again, my bad. I didn't find #43345 with my GH query, I will have to adjust my filter or rebuild Quarkus next time.

@radcortez
Copy link
Member Author

No worries, all good. I usually include a Breaking Changes description in the PR, but only in the Migration Guide after the PR is merged because we can't be sure which version the PR will merge. #43345 was merged recently, so it was still on my TODO list to copy the breaking changes to the Migration Guide.

@rsvoboda
Copy link
Member

About stuff mentioned in #43959 (comment), noteworthy label should be applied, wdyt?
And some description / link would be handy too, this is major version change.

@radcortez
Copy link
Member Author

Updated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants