-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Static deserialization issues #3972
Comments
Specifically deprecate
If we want the replacement to be available without completely building a client, then we'll need to add some method on the KubernetesClientBuilder. Otherwise with the logic in #3966 it would be easier to obtain the deserializer from the client: var serdes = client.serialization(); // type and method name tbd Under the covers we can use a HandlerInstantiator to associate an appropriate KubernetesDeserializer. |
At a minimum we would introduce here an api for accessing what are now static concerns of serialization:
Assuming that we want users to obtain this without creating a client, there would likely need to be another factory: KubernetesSerialization.Factory or similar. It would also be obtainable off of the client: client.getKubernetesSerialization() On the public interface it doesn't seem advisable to directly expose the mapper instances. Those would be available for internal use on the implementation class. @manusa @rohanKanojia does this seem reasonable? |
After talking with @manusa the usage of registerCustomKind is more limited for the client than I thought. We probably want to avoid using that internally or promoting that for usage by users. This may require users to deal more with generic resources, which we'd like to offer a KubernetesResource.adapt(class) call. This would also affect the Serialization.clone method. |
The next steps here is to remove all internal usage of KubernetesDeserializer.registerCustomKind - even if we have a non-static KubernetesDeserializer, that kind of side implicit side-effect is undesirable. The expectation moving forward will be that the class is jandex discoverable. In some situations if it is not, rather than seeing the typed result it would instead be a generickubenetesresource. The places affected by this change will be:
All other kubernetesclient calls will function as expected because they are typed. The only issue with KubernetesResource.adapt is the handling of mutability since the real type is not a view, but a converted instance. It would be on the user to after making modifications, set the modified item back:
|
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
@manusa some next steps:
|
…ialization The methods accepting parameters have been deprecated Support for Parameterizable has been removed - it should have been rarely used.
…ialization The methods accepting parameters have been deprecated Support for Parameterizable has been removed - it should have been rarely used.
also moving more of the openshift impl to be client based
also moving more of the openshift impl to be client based
also moving more of the openshift impl to be client based
all parameter operations are now localized to template logic (overloaded get and load) also fixes kubernetesclientbuilder.withconfig
all parameter operations are now localized to template logic (overloaded get and load) also fixes kubernetesclientbuilder.withconfig
all parameter operations are now localized to template logic (overloaded get and load) also fixes kubernetesclientbuilder.withconfig
Marking as resolved by #4662 - we'll make further adjustments to the KubernetesSerialization from there. |
Is your task related to a problem? Please describe
To eventually remove the static type registration from the KubernetesDeserializer we can't have static entry points that rely on this implicit class resolution.
Describe the solution you'd like
Deprecate and provide alternatives to any static Serialization.unmarshall routines that don't supply the type.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: