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

JSON parsing exception in BatchV1Api.deleteNamespacedJob() #253

Closed
opottone opened this issue Apr 26, 2018 · 1 comment
Closed

JSON parsing exception in BatchV1Api.deleteNamespacedJob() #253

opottone opened this issue Apr 26, 2018 · 1 comment

Comments

@opottone
Copy link

When I call BatchV1Api.deleteNamespacedJob(), it throws an java.lang.IllegalStateException. It succesfully makes a REST call to the Kubernetes server, gets a response, and tries to parse the response json to a V1Status object. This fails. When I modified the client to use V1Job instead of V1Status, then it works.

The exception gets thrown because status field in V1Status is a String, but in response json it's an object:

"status": {
        "conditions": [
            {
                "type": "Complete",
                "status": "True",
                "lastProbeTime": "2018-04-26T22:16:28Z",
                "lastTransitionTime": "2018-04-26T22:16:28Z"
            }
        ],
        "startTime": "2018-04-26T22:16:18Z",
        "completionTime": "2018-04-26T22:16:28Z",
        "succeeded": 1
    }

It's quite possible there are also other differences between V1Status and V1Job but I didn't bother to investigate further.

@brendandburns
Copy link
Contributor

Duplicate of #86

@brendandburns brendandburns marked this as a duplicate of #86 Apr 27, 2018
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

No branches or pull requests

2 participants