Closed toby-butchart-starfish closed 1 month ago
let me take a look
Based on the error message, one possible solution is to provide both forms of implementations of IYamlTypeConverter
, so host project can freely choose YamlDotNet 16.x or older version
I recently upgraded one of my projects to YamlDotNet 16, its quite easy, https://github.com/IvanJosipovic/YamlDotNet.System.Text.Json/commit/fa5963fd7a900d6977f40a0af08afcc088db3dd9
I can do a PR for this if needed. Additionally, I don't see much value in making these converters backward compatible.
thanks @IvanJosipovic, please. i was too busy recently
Thanks to everyone. @tg123 Is it possible to trigger a release. Also https://github.com/buehler/dotnet-operator-sdk is broken if v16 of YamlDotNet is used.
See also https://github.com/buehler/dotnet-operator-sdk/issues/797
Any news regarding the release? I'm facing the issue, too.
will kick a release for 1.31 soon
Thank you!
This was fixed in https://www.nuget.org/packages/KubernetesClient/14.0.9
@IvanJosipovic apparently not, it's the version I'm using and it throws NotImplementedExceptions at startup
@IvanJosipovic apparently not, it's the version I'm using and it throws NotImplementedExceptions at startup
Check the references in nuget.org, you may have another dependency forcing the downgrade.
you may have another dependency forcing the downgrade
@IvanJosipovic AFAIK I do not. All packages are up to latest version.
If you want, you can easily repro the issue by starting Synapse's API server on the following branch: https://github.com/serverlessworkflow/synapse/tree/feat-k8s-container-platform/src/api/Synapse.Api.Server
Removing the KubernetesClient package (and all related classes) from the solution "fixes" the issue.
you may have another dependency forcing the downgrade
@IvanJosipovic AFAIK I do not. All packages are up to latest version.
If you want, you can easily repro the issue by starting Synapse's API server on the following branch: https://github.com/serverlessworkflow/synapse/tree/feat-k8s-container-platform/src/api/Synapse.Api.Server
Removing the KubernetesClient package (and all related classes) from the solution "fixes" the issue.
Just launched your branch, the error is:
Unhandled exception. System.TypeInitializationException: The type initializer for 'Neuroglia.Serialization.Yaml.YamlSerializer' threw an exception.
---> System.TypeLoadException: Method 'ReadYaml' in type 'Neuroglia.Serialization.Yaml.JsonNodeTypeConverter' from assembly 'Neuroglia.Serialization.YamlDotNet, Version=4.15.3.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at Neuroglia.Serialization.Yaml.YamlSerializer.<>c.<.cctor>b__8_0(SerializerBuilder serializer)
at Neuroglia.Serialization.Yaml.YamlSerializer..cctor() in /home/runner/work/framework/framework/src/Neuroglia.Serialization.YamlDotNet/Services/YamlSerializer.cs:line 90
--- End of inner exception stack trace ---
at Neuroglia.Serialization.IServiceCollectionExtensions.<>c.<AddYamlDotNetSerializer>b__0_0(IYamlSerializerBuilder builder) in /home/runner/work/framework/framework/src/Neuroglia.Serialization.YamlDotNet/Extensions/IServiceCollectionExtensions.cs:line 39
at Neuroglia.Serialization.IServiceCollectionExtensions.AddYamlDotNetSerializer(IServiceCollection services, Action`1 setup, ServiceLifetime lifetime) in /home/runner/work/framework/framework/src/Neuroglia.Serialization.YamlDotNet/Extensions/IServiceCollectionExtensions.cs:line 42
at Synapse.IServiceCollectionExtensions.AddSynapse(IServiceCollection services, IConfiguration configuration) in C:\Users\ivanj\Downloads\synapse-feat-k8s-container-platform\synapse-feat-k8s-container-platform\src\core\Synapse.Core.Infrastructure\Extensions\IServiceCollectionExtensions.cs:line 49
at Program.<Main>$(String[] args) in C:\Users\ivanj\Downloads\synapse-feat-k8s-container-platform\synapse-feat-k8s-container-platform\src\api\Synapse.Api.Server\Program.cs:line 25
at Program.<Main>(String[] args)
Looks like you have your own converter Neuroglia.Serialization.Yaml.JsonNodeTypeConverter
which needs to be updated.
@IvanJosipovic Sorry about that, in my dev setup I had manually updated the dependencies of the incriminated package. I'll properly update it, publish it and test it. I'll keep you posted!
In the meanwhile, thanks for both your patience and attention 🙏
@IvanJosipovic I updated all packages and everything is working as expected!!! Many thanks ❤️
Describe the bug Hi guys, I was wondering if there were plans to support YamlDotNet v 16.0.0? It looks like they have made some breaking changes in the latest release: https://github.com/aaubry/YamlDotNet/releases/tag/v16.0.0 specifically to ReadYaml and WriteYaml in IYamlTypeConverter.cs leaving any descendant in the KubernetesClient library broken (i.e., IntOrStringYamlConverter).
Let me know if you need any more information.
Dotnet Runtime Version net8
To Reproduce
Expected behavior Connection to succeed
Where do you run your app with Kubernetes SDK (please complete the following information):