-
We are creating K8s job using the fabric8io client (5.12.1). In some cases we are seeing that when we retrieve the job after creation, client returns If job is not existing, shouldn't client return exception ? In what cases this is possible ? Does K8s server, queue the request to create job and immediately return the response and there can be delay between actual creation of job and responding to create job request ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, get returns null if the resource does not exist. There's a require method that will throw an exception.
The create call should return the job that was created, and subsequent gets should return the resource (if it exists). If you are getting a null, then presumably the resource does not exist at that time. As for why that would be the case, you'll need to double check that nothing else is deleting it. |
Beta Was this translation helpful? Give feedback.
No, get returns null if the resource does not exist. There's a require method that will throw an exception.
The create call should return the job that was created, and subsequent gets should return the resource (if it exists). If you are getting a null, then presumably the resource does not exist at that time. As for why that would be the case, you'll need to double check that nothing else is deleting it.