-
Notifications
You must be signed in to change notification settings - Fork 300
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
AoT version with AKS kubelogin
throws exception on creating configuration
#1602
Comments
I guess it could be related to this one as well: #1598 |
yup this is something dynamic, so not fully supported in aot |
This should be fixable with a PR by setting the jsonTypeInfo on
|
The code dynamically looks up the
#1616 should fix it, but I have not yet had a chance to test to verify that it fixes the exact problem that led me to this issue, nor have I had a chance to set up a test environment to run the unit tests. There is also the matter of how the project has multiple source generators operating on the same classes and while this is apparently working here, this is generally not supported, so I may be missing some nuances. More generally, the What are the benefits of a user-configurable By similar arguments, regular expressions should probably be source generated as well. Beyond build-time error detection and reduced startup costs, this would also benefit performance on the .Aot version since the native runtime cannot do dynamically compilation. In case anyone else is running into problems generating .sln files, it appears to be broken with version 12.0.3 of Microsoft.VisualStudio.SlnGen . Updating to 12.0.10 got it working for me. TL;DR: source generation should be used where practical for both the .Aot and non-.Aot versions of the library. |
Describe the bug
Using
KubernetesClient.Aot
throws an exception when trying to create a configuration viaKubernetesClientConfiguration.BuildConfigFromConfigFile()
that utilizes AKSkubelogin
.Exception is
Kubernetes C# SDK Client Version
15.0.1
Server Kubernetes Version
1.30.6
Dotnet Runtime Version
.NET 9
To Reproduce
KubernetesClient
version 15.0.1 works correct when callingKubernetesClientConfiguration.BuildConfigFromConfigFile()
KubernetesClient.Aot
version 15.0.1 and try again - get an exceptionExpected behavior
Configuration should be created successfully.
KubeConfig
Please refer to the linked sample but here's relevant
users
section from my config specifically:Where do you run your app with Kubernetes SDK:
Additional context
The text was updated successfully, but these errors were encountered: