-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix Knative/OpenShift client environment check #28172
Fix Knative/OpenShift client environment check #28172
Conversation
89fe0db
to
75d15be
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.
Many many thanks for your pull request!
Spites I understand this is broken and that there might not have a better solution, I think these changes are a bit fragile (I mean checking the coordinates of the fabric8:openshift-client artifact).
About the problem itself, I don't fully follow what exactly changed in regards to the isAdaptable
method. @manusa can you help here?
Also, I'm not sure if this is possible, but adding some tests would help.
Anyway, let's wait for @manusa's feedback.
@Sgitario I'll try to write a test then (I've already tried, but sure, there must be a way...). As for |
My understanding is that
If we could judge from ex. thrown |
75d15be
to
04ca353
Compare
This comment has been minimized.
This comment has been minimized.
9db9481
to
985a52d
Compare
Couldn't read the code changes yet, but a quick note on the
You can read more about them at our Migration Guide. This means that the behavior for this method has changed completely for version 6. The If you need to check if the cluster supports the operations that the derived client supports (in this case I guess In addition, you can use the |
...netes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KnativeDeployer.java
Show resolved
Hide resolved
@Sgitario I want to urge you in no way, just give me a hint what's next (or ETA) as if you need a time, I'm going to disable QE tests, thanks a lot |
Just a quick note that today is a bank holiday in Barcelona |
Ah, thank you @manusa |
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.
Apart from the comments, the changes look good to me.
Many thanks @michalvavrik !
...netes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/KnativeDeployer.java
Show resolved
Hide resolved
...tes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftDeployer.java
Outdated
Show resolved
Hide resolved
985a52d
to
621fc75
Compare
Thank you for the review. |
Many thanks @michalvavrik . lgtm now |
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.
Seems like you folks have figured it out.
Feel free to merge when CI is green
Failures are unrelated to this PR. Merging. |
@Sgitario @geoand @michalvavrik I think this should be backported, right? |
This behavior comes from switch to Kubernetes client 6.1.1, thus 2.13 should not be affected. |
OK, perfect, thanks! |
Note that these methods will need refactoring when bumping the client to 6.5 or at most 6.6 |
Thanks for the heads up! |
fixes: #28171
According to https://github.com/fabric8io/kubernetes-client/blob/master/doc/MIGRATION-v6.md#adapt-changes,
isAdaptable
method semantic has changed (and the method is deprecated) and it's causing failures in Quarkus QE Test Suite. AFAIK originallyisAdaptable
check wasn't strict (contains
,endsWith
), so you could have ApiGroups like (see below) and check would succeed fabric8io/kubernetes-client@bb6115a#diff-a23a9372cb2d1a1c4121272460b2c8e2f8dd79bf5722b8b2a36ba5d4578cef75 . Now, check fails if there is no group that strictly matchesAPIGroup
knative.dev
. That's however not necessary for our app to work, f.e. our APIGroups are:When Quarkus is not performing strict tests for
knative.dev
, our app is working and check performed is same as before.