-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Required time.sleep(...)
to get expected result when calling get_namespaced_custom_object
after create
#1772
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
Comments
/assign |
Could you clarify what difference you're looking for between the expected and what you got? You can run a watch in parallel to see who updated the object in that 1s period. |
Of course, my apologies for not being clear at first. What you can see from both responses (the current response and expected response) is that the current response does not include some information such as the top-level When first coding this I was confused because the returned object did not include any status information, especially since the go-client did not seem to "suffer" from this (and includes the
I would indeed like to watch the object instead, but that doesn't seem to be supported according to: #1679 The reason for opening this issue was the question whether the |
It's working as intended for the server to return the object with no status. What you want is to wait for the status to get populated (likely by some other controller running in the cluster). The go client didn't have this problem probably due to a race condition. What you can do is to:
Thanks for bringing the watch issue to my attention. I will take a look. |
@roycaihw: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened (please include outputs or screenshots):
Would output:
What you expected to happen:
Output of:
which can be achieved by commenting the
time.sleep(1)
in the code sample.How to reproduce it (as minimally and precisely as possible):
See above.
Anything else we need to know?:
Ran similar code using the Go SDK which did output the expected result.
Happy to hear your thoughts on the required
time.sleep(1)
.Environment:
kubectl version
):v1.22.2
(client) andv1.22.3
(server)Ubuntu 21.04
python --version
):3.9
pip list | grep kubernetes
):v23.3.0
The text was updated successfully, but these errors were encountered: