-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Workaround for gson-syntax-exception upon deletion even if the deletion succeeds #1445
Workaround for gson-syntax-exception upon deletion even if the deletion succeeds #1445
Conversation
9faeb60
to
b7234c3
Compare
b7234c3
to
0302618
Compare
Do we really want to do this? Doesn't this make every delete look like it's not done yet? |
@brendandburns upon deletion calls, the kube-apiserver can return either a status object or the deleted state of the target object. however the method generated from openapi is only returning the status object. that's why we had this issue in the past. now it seems feasible to workaround by the extension provided by gson-fire library. the only change this pull will bring to the project is making gson suppressing the runtime exception when deserializing a non-status object (e.g. deployment, pod) into a |
Ok, I went and dug up the actual code in the apiserver: I had thought that it returned V1Status when the delete wasn't completed, and the object when the delete was completed, but it looks like it's actually dependent on the deleter. Given that, I think that this change is ok, even though it is a little lossy. Let's file an issue to fix this better via oneOf instead of this work-around, so that we don't forget about the problem. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, yue9944882 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes: #86
this pull will be suppressing the GsonSyntaxException on deletion by adapting non-status resources into status during deserialization.
@brendandburns i think we should get this into 11.0.x releases.