Open SGStino opened 4 months ago
seems so, would you like to send a pr to fix it? or i will pick it this weekend
We could pick it up, but, at first glance I don't really see where that would be done in YamlDotNet. There doesn't seem to be a serialization context like in System.Text.Json? Any suggestion as to where to look? Haven't done any AOT with Yaml so far yet.
It seems that all the YamlSerializeableAttribute
s aren't required on the StaticContext and that it still works for most of the types.
But adding [YamlSerializeableAttribute(typeof(IList<string>))]
makes the Source generator generate invalid code and it won't compile anymore.
only [YamlSerializeableAttribute(typeof(string[])]
generates code that compiles, but that would require updating the kubernetes client models, which wouldn't be desirable...
It might be related to https://github.com/aaubry/YamlDotNet/issues/740#issuecomment-1360163696
And if i'm reading this: https://github.com/aaubry/YamlDotNet/issues/884 it might fix itself in a few days.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
Describe the bug If a kubernetes client config contains string lists (for example, at users[*].user.exec.args), the yaml serializer throws that it can't deserialize the node into IList.
Kubernetes C# SDK Client Version
14.0.2
Server Kubernetes Version
N\A
Dotnet Runtime Version
net8
To Reproduce Create a config that contains a user that needs to "exec" with arguments, for example kube oidc login (see KubeConfig)
Expected behavior Being able to deserialize the config, including the args list.
KubeConfig
Where do you run your app with Kubernetes SDK (please complete the following information): Reproducable in RoslynPad or dotnet console application:
Additional context in the JsonSerializationContext for AOT source generation you'd have to include
[JsonSerializable(typeof(IList<string>))]
, my guess would be that there is something similar for YamlDotNet?