-
Notifications
You must be signed in to change notification settings - Fork 98
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
[issue 1269] (2.0.x) Bumping Fabric8 version to 6.9.2 #1296
Conversation
a67d741
to
fef9ab1
Compare
…ich BTW is required to not pull in http repos, which would be blocked with Maven >= 3.8.1
…lid for SnakeYaml to load it without single argument constructors
bc5c1a3
to
f2a551d
Compare
f2a551d
to
9e88770
Compare
…with the one used by Fabric8 Kubernetes client
…e for Kubernetes and OpenShift modules
4d1bcb0
to
290d0d3
Compare
9dbd2c7
to
90dc2f6
Compare
90dc2f6
to
44f76f1
Compare
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.
@fabiobrz Awesome work ! This looks good to me. Only some ideas/minor things about OKHttpClient:
- Is it possible that we use jdk http client or url connection in
IstioAssistant
, then we don't need this okhttpclient dependency anymore? - For the okhttpclient in the test , can we simply replace it with `restassured' to easily check the json response ?
Thanks for your review @jimma! Sure. It makes sense to me, will have a look. |
Hi @jimma - some considerations/questions after a quick look:
Are there any reasons for your question to address just
Here too, is this just about some tests or all the tests? |
I think less dependency is better. I only looked at
I mean all the tests which relies on okttpclient to check the response. Is it doable ? |
Ok, so I'll figure out what it means to replace it with another implementation (e.g.: the JDK HttpClient).
Sure thing, that's actually one straightforward use case. Hopefully I'll be able to get back soon about this, thanks. |
…tional code and with rest-assured in test code
Hi @jimma - I made an attempt to address your latest remarks:
|
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.
@fabiobrz Thanks for this improvement. This looks good to merge.
I think JDK http client can support this too. Is there test or function requires this cookie thing ?
Could you please point me the test code for this exception ? Thanks. |
Hi @jimma
Yes, there should be a CookieHandler/Manager or something similar.
Yep, it seems to be used by the OpenShift client adapter via F8Proxy in the end... I'll have to look closer though.
Yup, see here, and here. As you can see the await would have to be modified to work with rest assured API, and it doesn't seem the case to me, since IstioAssistant is not a test component. |
@fabiobrz sorry for the late reply. These are all very minor issues. We can create some todo task for these things and merge your change. WDYT ? |
+1, thanks @jimma - I have filed #1297 for the cookie configuration TBD, while I actually think we should not do anything regarding Feel free to merge, in case you don't have any objections. |
* [issues-1270] project made JDK- compileable. (#1293) * [issue 1269] (2.0.x) Bumping Fabric8 version to 6.9.2 (#1296) * [issues-1269] Bumping Fabric8 version to 6.9.2 * [issues-1269] Bump CI JDK version to 11 * [issues-1269] Bump Maven wrapper version to 3.9.6 * [issues-1269] Bump Wildfly Arquillian remote container dependency, which BTW is required to not pull in http repos, which would be blocked with Maven >= 3.8.1 * [issues-1269] Fixing the Timespan class in order to properly set TIME_UNIT_ORDER * [issues-1269] Fixing the CubeCOnfiguration model that is no longer valid for SnakeYaml to load it without single argument constructors * [issues-1269] Fixing the tests in core module * [issues-1269] Fixing the tests in docker module * [issues-1269] Fixing the tests in docker moduleù * [issues-1269] Fixing the tests in kubernetes moduleù * [issues-1269] Downgrade okhttp3 version to 3.12.12, to be compatible with the one used by Fabric8 Kubernetes client * [issues-1269] - TEMP - Fixing hamcrest dependency artifactId and scope for Kubernetes and OpenShift modules * [issues-1269] Fix Java custom DNS SPI removal * [issues-1269] Fix Istio integration and tests * [issues-1269] Fix KubernetesAssistant delete method return logic * [issues-1269] Fixing sundr.io dependencies * [issues-1269] - Adding the kubernetest-client depenency to kubernetes assistant functional tests * [issues-1269] Removing TODOs * [issue 1269] - Fixing MockTest.java * [issue 1269] - Resume DockerHealthAwaitStrategyTest * [issue 1269] - Remove okhttp, replacing it with JdkHtppClient in functional code and with rest-assured in test code --------- Co-authored-by: Fabio Burzigotti <[email protected]> --------- Co-authored-by: rsearls <[email protected]> Co-authored-by: Fabio Burzigotti <[email protected]>
Short description of what this resolves:
Upgrading the Fabric8 Kubernetes client to 6.9.2, non-disruptive approach.
Can be improved after further analysis and experiments.
CC @rsearls, @jimma, @gaol
Changes proposed in this pull request:
Fixes #1269
@rsearls this also required the fixes for many issues that you have logged separately. How do we deal with such changes?
Draft: still having some issues with the Istio extension (currently commented) and there areTODO - check
occurrences, that need to be resolved.Some remarks and trackers:
Internal changes regarding Istio integration: the Istio client implementation moved within the Fabric8 K8s Client project and evolved. So we had to adjust the integration in order to be aligned with the new semantics:
IstioClientAdapter
has been created to adapt the original K8s client. This adapter implementsIstioClient
and a concrete instance of it is injected byIstioAssistantCreator
into theIstioAssistant
instance. This last one represents the main entry point to the integration, and the APIs that exposes have been kept unchanged, apart for one caveat: resources can no longer be created with generic lists, but just with single definitions. A unit test has been added for the new IstioClientAdapter class.How we deal with HttpClient: now that the
OkHttpClient
impl is no longer exposed by the Fabric8 K8s Client, we made some changes, e.g.: here, which need to be double checkedINameService
has been added forArqCubeNameService
to implement it. It was used to be provided byArqCubeNameServiceDescriptor
with JDK 8, which was self registering via SPI by implementingsun.net.spi.nameservice.NameServiceDescriptor
. This last one is internal and no longer available in JDK 11, soArqCubeNameServiceDescriptor
has been removed andArqCubeNameService
can be registered programmatically viaINameService.install(new ArqCubeNameService())
- must be double checked and verified, seeINameService
Javadoc and the related test.GitHub CI worlflow: only JDK 11 enabled, JDK 8 to be verified. Category left as is (i.e. "docker", we should experiment with others)
mvnw
version: bumped to 3.9.6Mockito unnecessary stubs: now (with newer Mockito dependencies) those are traced as error that break the build, so we had to mark all of them via
Mockito.lenient()
, and we might want to log a follow up issue for detailed evaluation and removalarquillian.cube.docker.impl.client.config
POJOs: (e.g.: ExposedPort.java, Link.java, etc.) have been modified to add a single argument ctor, otherwise YAML deserialization via newer jackson dependencies would fail.The podman unix socket is now used by
DockerHealthAwaitStrategyTest
:, raher than the docker one.MockTest.java: Changes have been made to the Kubernetes mock server in order to mock additional expectations required by the new client behavior