-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
type assertion failed on clientset #24656
Comments
I am debugging on codec to make sure if there is problem, so far the Codec UT with embedded body works. Meanwhile appreciate anyone can give me some suggest. |
@nikhiljindal Can you provide any advice to @mfanjie here? |
@mfanjie can you provide more of your sample code that has |
I am still investigating on the issue, from my current findings, I highly suspect the issue happens here.
So when I watch federation apiserver, and try to decode the response, it threw assertion failure. This is current investigation updates, I did not get time to verify yet. @jianhuiz can you check this further? @ncdc can you check my comment to see if I am on direction? |
You're importing |
@caesarxuchao please kindly advise |
@ncdc as subreplicaset is defined with v1beta1 properties, and subreplicaset is created based on replica set properties. So I want to get replica set with the version of v1beta1. |
Understood, however, I was reacting to this error: |
@mfanjie, I submitted a PR a couple of days ago to change the codec used by release_1_3: Are you using this latest code? Does it work? If not, I think there's something wrong in the codec code, I can take a look later. |
maybe my code need rebase then, I will figure out later. Thanks. 发自我的 iPhone 在 2016年4月23日,上午1:54,Chao Xu <notifications@github.commailto:notifications@github.com> 写道: @mfanjiehttps://github.com/mfanjie, I submitted a PR a couple of days ago to change the codec used by release_1_3: Are you using this latest code? Does it work? If not, I think there's something wrong in the codec code, I can take a look later. ― |
@caesarxuchao I met the same issue this morning when I rebased to the latest master and regenerated the clientset. I then reverted to the previous generated code, it works fine. |
@caesarxuchao by rebasing the code, the object can not be decoded anymore, here is the logs:
|
@mfanjie the problem seems to be caused by recent changes related to protobuf, but I thought protobuf is not k8s default serialization format yet, did you have any configuration that might trigger it? Also, we have an e2e test that exercises release_1_3 clientset's watch and list function: https://github.com/kubernetes/kubernetes/blob/master/test/e2e/generated_clientset.go#L183-L192. The test is passing. Could you compare your code with it? Perhaps that can help you debug your issue. |
@caesarxuchao I manually merge all code of #24395 to my branch, things got better, I am still debugging on it, I did not update this issue as I did not confirm if it worked or not yet. Will update again soon. |
@caesarxuchao I confirm after I merge all code change of #24395, it works properly, not a blocker of my work anymore, thank you for your prompt help. Closing this issue now. |
The problem was gone when I use the old codebase and merge #24395 manually, but when I rebase the latest code from master branch, the error is till there. Reopen this issue for tracking, I am using the workaround to test now.
|
Have you run hack/update-all.sh after you add your subresource? Could you try to run it again after you rebase? I suspect the problem you encountered is not directly related to clientset. |
It's not a blocker anymore. The only left problem now is when I try to fmt.Println(rs), it will go panic. As long as I avoid printing the entire object, my code was working properly.
|
Here is some test code, clusters can be dumped correctly, while replicasets can not be.
Here is the stack trace:
|
@mfanjie may I ask how did you solve the proto problem? |
@caesarxuchao the previous version does not have protobuf properties, so i think the update-all.sh was not invoked, I get the latest from from @jianhuiz and the type assertion problem was gone. |
The panic appears to be due to a private field, which shouldn't exist. It looks like the hard problems are taken care of? I'm lowering priority. |
@mfanjie the type assertion problem is fixed. Is there any remaining problem? |
@caesarxuchao no any problem now, thanks, close the issue. |
…herry-pick-24650-to-release-4.4 [release-4.4] Bug 1811198: /readyz should start returning failure on shutdown initiation Origin-commit: cd62f4529c30cb648bfcc5aea024620a0d72122e
I am working on federation scheduler, my code need list & watch clusters, replciasets federation apiserver, while my code can not work properly, the followings are detail description:
Code sample:
Result:
Sample Code
which when it get updated data from apiserver, the following error is thrown.
And if I dump the object being watched, I see the example info like List function.
The text was updated successfully, but these errors were encountered: