-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Integrate Feign Vertx into the main project #2631
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
Conversation
Rebased and updated: OSCR-849 Enabling the option to use HTTPS/2 for REST calls
Release after integration of HttpClientOptions
…e conditions for the connection.
Thanks to fix such big flaw! I will make it available in release 0.1.1
Release 0.1.1 after fix of leaking connections
This fixes a security vulnerability in this project where the `pom.xml` files were configuring Maven to resolve dependencies over HTTP instead of HTTPS. Signed-off-by: Jonathan Leitschuh <[email protected]>
junit-jupiter should be test scoped
Bumps [com.github.tomakehurst:wiremock-jre8](https://github.com/wiremock/wiremock) from 2.27.2 to 2.35.1. - [Release notes](https://github.com/wiremock/wiremock/releases) - [Commits](wiremock/wiremock@2.27.2...2.35.1) --- updated-dependencies: - dependency-name: com.github.tomakehurst:wiremock-jre8 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]>
…ithub.tomakehurst-wiremock-jre8-2.35.1 Bump com.github.tomakehurst:wiremock-jre8 from 2.27.2 to 2.35.1
Fix nondeterminism issue in IceCreamOrder test fixture
…hronousMethodHandler
| } | ||
| } | ||
|
|
||
| private static class BuildTemplateByResolvingArgs implements RequestTemplate.Factory { |
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.
Make those classes package private, so I don't need to copy them in feign-vertx project.
velo
left a comment
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
| v42x=( "4.2.7" ) | ||
| v43x=( "4.3.2" ) | ||
| v44x=( "4.4.9" ) | ||
| v45x=( "4.5.10" ) |
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.
so you test it with a matrix of versions?!
we need to mimic that into circle ci build
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 think, I even need to create separate submodule in feign-vertx to ensure a runtime compatibility with different versions of Vertx.
Do you have something similar in the project already ? Any suggestions how to integrate into CI ?
| } | ||
|
|
||
| /** VertxFeign builder. */ | ||
| public static final class Builder extends Feign.Builder { |
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.
You might want to take a look on this one:
https://github.com/OpenFeign/feign/blob/master/core/src/main/java/feign/AsyncFeign.java#L69
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.
Checked it already. AsyncFeign is unfit because it's based on CompletableFutures from JDK. As I told before, Verx uses its own Future implementation, which should be supported both internally and used in contracts. My project is more similar to feign-rective in that sense.
|
Don't you want to preserve history? it's a great way to highlight all your works and other contributors too. |
Thats would be cool. How can I do that? List them as contributors in |
2966c1f to
02764c6
Compare
I merged vertx repo into this one, that way all history is preserved |
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.
Some suggestions could not be made:
- annotation-error-decoder/pom.xml
- lines 49-48
- apt-test-generator/pom.xml
- lines 62-61
- benchmark/pom.xml
- lines 70-69
- core/pom.xml
- lines 37-36
- core/src/test/java/feign/stream/StreamDecoderTest.java
- lines 60-70
- feign-form-spring/src/test/java/feign/form/feign/spring/Dto.java
- lines 20-19
- lines 33-32
- feign-form/src/test/java/feign/form/BasicClientTest.java
- lines 30-30
- lines 64-64
- lines 73-73
- lines 97-98
- lines 113-114
- lines 131-131
- lines 143-143
- feign-form/src/test/java/feign/form/Dto.java
- lines 20-19
- lines 32-31
- googlehttpclient/pom.xml
- lines 54-53
- gson/src/test/java/feign/gson/GsonCodecTest.java
- lines 53-56
- lines 90-97
- lines 168-177
- lines 236-245
- hc5/pom.xml
- lines 67-66
- httpclient/pom.xml
- lines 75-74
- hystrix/pom.xml
- lines 78-77
- jackson-jaxb/pom.xml
- lines 82-83
- java11/pom.xml
- lines 50-49
- jaxb-jakarta/pom.xml
- lines 34-35
- lines 55-57
- jaxb/pom.xml
- lines 45-49
- jaxrs2/pom.xml
- lines 103-102
- jaxrs3/pom.xml
- lines 89-88
- jaxrs4/pom.xml
- lines 83-82
- kotlin/pom.xml
- lines 71-70
- moshi/src/test/java/feign/moshi/MoshiDecoderTest.java
- lines 72-81
- moshi/src/test/java/feign/moshi/MoshiEncoderTest.java
- lines 43-45
- lines 61-67
- lines 85-94
- moshi/src/test/java/feign/moshi/Zone.java
- lines 18-17
- lines 37-36
- okhttp/pom.xml
- lines 59-58
- pom.xml
- lines 578-579
- reactive/pom.xml
- lines 98-97
- ribbon/pom.xml
- lines 83-82
- soap-jakarta/pom.xml
- lines 34-35
- lines 63-62
- lines 79-81
- soap/pom.xml
- lines 55-60
- lines 70-71
| <vertx.version>4.5.10</vertx.version> | ||
| <jackson.version>2.12.0</jackson.version> | ||
| <slf4j-log4j12.version>1.8.0-beta0</slf4j-log4j12.version> | ||
| <wiremock.version>2.35.1</wiremock.version> |
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.
| <wiremock.version>2.35.1</wiremock.version> | |
| <wiremock.version>2.35.2</wiremock.version> |
|
|
||
| @Test | ||
| @DisplayName("All requests should be answered") | ||
| void testAllRequestsShouldBeAnswered(VertxTestContext testContext) { |
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.
| void testAllRequestsShouldBeAnswered(VertxTestContext testContext) { | |
| void allRequestsShouldBeAnswered(VertxTestContext testContext) { |
|
|
||
| @Test | ||
| @DisplayName("All requests should fail") | ||
| void testAllRequestsShouldFail(VertxTestContext testContext) { |
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.
| void testAllRequestsShouldFail(VertxTestContext testContext) { | |
| void allRequestsShouldFail(VertxTestContext testContext) { |
|
|
||
| @Test | ||
| @DisplayName("All requests should be answered") | ||
| void testAllRequestsShouldBeAnswered(VertxTestContext testContext) { |
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.
| void testAllRequestsShouldBeAnswered(VertxTestContext testContext) { | |
| void allRequestsShouldBeAnswered(VertxTestContext testContext) { |
|
|
||
| @ExtendWith(VertxExtension.class) | ||
| @DisplayName("Test that connections does not leak") | ||
| public class ConnectionsLeakTests { |
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.
| public class ConnectionsLeakTests { | |
| class ConnectionsLeakTests { |
| package feign.vertx; | ||
|
|
||
| import static com.github.tomakehurst.wiremock.client.WireMock.*; | ||
| import static feign.vertx.testcase.domain.Flavor.FLAVORS_JSON; |
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.
| import static feign.vertx.testcase.domain.Flavor.FLAVORS_JSON; | |
| import static feign.vertx.testcase.domain.Flavor.FLAVORS_JSON; | |
| import static org.assertj.core.api.Assertions.assertThat; |
| import org.assertj.core.api.Assertions; | ||
| import org.junit.jupiter.api.BeforeAll; |
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.
| import org.assertj.core.api.Assertions; | |
| import org.junit.jupiter.api.BeforeAll; | |
| class VertxHttpOptionsTest extends AbstractFeignVertxTest { |
|
|
||
| @Test | ||
| @DisplayName("HttpClientOptions from Vertx") | ||
| public void testHttpClientOptions(Vertx vertx, VertxTestContext testContext) { |
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.
| public void testHttpClientOptions(Vertx vertx, VertxTestContext testContext) { | |
| void httpClientOptions(Vertx vertx, VertxTestContext testContext) { |
|
|
||
| @Test | ||
| @DisplayName("Request Options from Feign") | ||
| public void testRequestOptions(Vertx vertx, VertxTestContext testContext) { |
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.
| public void testRequestOptions(Vertx vertx, VertxTestContext testContext) { | |
| void requestOptions(Vertx vertx, VertxTestContext testContext) { |
| if (res.succeeded()) { | ||
| Collection<Flavor> flavors = res.result(); | ||
|
|
||
| Assertions.assertThat(flavors) |
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.
| Assertions.assertThat(flavors) | |
| assertThat(flavors) |
This PR is mostly merge of a separate stable project
feign-vertxinto the main repository. Please, feel free to take your time to review it.