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

Exception found when use inherit in crd #1981

Closed
xiaoma20082008 opened this issue Jul 26, 2023 · 2 comments · Fixed by #1984
Closed

Exception found when use inherit in crd #1981

xiaoma20082008 opened this issue Jul 26, 2023 · 2 comments · Fixed by #1984

Comments

@xiaoma20082008
Copy link
Contributor

Bug Report

What did you do?

update java-operator-sdk from 4.3.5 to 4.4.1

What did you expect to see?

CustomResourceUtils.java#L21C9-L21C9 throws Exception

What did you see instead? Under which circumstances?

CRD definition like this:

public abstract class Rb<SPEC, STATUS> extends CustomResource<SPEC, STATUS> implements Namespaced {
}

public class Crd extends Rb<CrdSpec,CrdStatus> {

}

class Crd doesn't implements Namespaced but it's parent Rb does. However CustomResourceUtils.java throws Exception

Environment

Kubernetes cluster type:

$ Mention java-operator-sdk version from pom.xml file

4.4.1

$ java -version

openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.2", GitCommit:"7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647", GitTreeState:"clean", BuildDate:"2023-05-17T14:20:07Z", GoVersion:"go1.20.4", Compiler:"gc", Platform:"darwin/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.11-aliyun.1", GitCommit:"a83426a0f9ecf12f97a32b2bd3bc3f9ee2b433e5", GitTreeState:"clean", BuildDate:"2023-04-04T02:31:51Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.27) and server (1.20) exceeds the supported minor version skew of +/-1

Possible Solution

CustomResourceUtils.java should check it's parents.

@xiaoma20082008 xiaoma20082008 changed the title Exception found when use inherit Exception found when use inherit in crd Jul 26, 2023
@csviri
Copy link
Collaborator

csviri commented Jul 26, 2023

thx @xiaoma20082008 , do you plan to issue a PR for this?

or should I take a look

@xiaoma20082008
Copy link
Contributor Author

thx @xiaoma20082008 , do you plan to issue a PR for this?

or should I take a look

ok, I'll fix this

csviri pushed a commit that referenced this issue Jul 31, 2023
* <fix>: fix #1981

* <fix>: drop unused import

---------

Co-authored-by: machunxiao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants