pulumi: Grpc.Core.RpcException: "Failed to deserialize response message." when using "cert-manager.crds.yaml" for ConfigFile
When using the following code in my C# Pulumi project:
var customResourceDefinitions = new ConfigFile("cert-manager-crds", new ConfigFileArgs
{
File = "https://github.com/jetstack/cert-manager/releases/download/v0.14.0/cert-manager.crds.yaml"
});
and do pulumi up, the process fails with:
Diagnostics:
pulumi:pulumi:Stack (ya-infra-shared-dev):
error: Running program 'C:\Projects\Ya\Shared\infra\ya-infra-shared\bin\Debug\netcoreapp3.1\Ya.Infra.Shared.dll' failed with an unhandled exception:
Grpc.Core.RpcException: Status(StatusCode=Internal, Detail="Failed to deserialize response message.")
at Pulumi.GrpcMonitor.InvokeAsync(InvokeRequest request)
at Pulumi.Deployment.InvokeAsync[T](String token, InvokeArgs args, InvokeOptions options, Boolean convertResult)
at Pulumi.Output`1.ApplyHelperAsync[U](Task`1 dataTask, Func`2 func)
at Pulumi.Output`1.ApplyHelperAsync[U](Task`1 dataTask, Func`2 func)
at Pulumi.Output`1.ApplyHelperAsync[U](Task`1 dataTask, Func`2 func)
at Pulumi.Output`1.Pulumi.IOutput.GetDataAsync()
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop)
at Pulumi.Deployment.SerializeFilteredPropertiesAsync(String label, IDictionary`2 args, Predicate`1 acceptKey)
at Pulumi.Deployment.SerializeAllPropertiesAsync(String label, IDictionary`2 args)
at Pulumi.Deployment.RegisterResourceOutputsAsync(Resource resource, Output`1 outputs)
at Pulumi.Deployment.Runner.WhileRunningAsync()
I’m trying to automate the installation of cert-manager as described here. One of its first steps mentions I should install some custom resource definitions separately.
Perhaps I should be using a different class to get the cert-manager.crds.yaml applied?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 24 (18 by maintainers)
Here is the draft of the forking plan:
pulumi-forkbranch.DefaultRecursionLimitin two spots from100to1000.csprojfile to something likePulumiorganization in NuGet asPulumi.Protobuf.pulumi/pulumito the fork.PulumiNuGet.Pulumi.Kubernetesto use it.I ran this sequence locally, without any publishing, and it does fix the original problem. I am able to deploy the CRDs from
https://github.com/jetstack/cert-manager/releases/download/v0.14.0/cert-manager.crds.yaml.Any concerns about this proposal, technically or from the IP perspective?
https://github.com/pulumi/pulumi-kubernetes/releases/tag/v2.7.2 is out now with the fix
Thanks to everyone for waiting for so long: it took a while to investigate the issue, find an issue in the Protobuf .NET library, discuss it with maintainers, and finally come up with a workaround.
The issue is now fixed in the latest alpha release (
dotnet add package Pulumi.Kubernetes --version 2.8.0-alpha.1605734708) and will be shipped in the next release. cc @lblackstone - we may want to cut ~2.8.1~ 2.7.2 whenever that works for you.The issue in gRPC: https://github.com/grpc/grpc/issues/22682
I also want to thank @mikhailshilkov for implementing the work around for this unfortunate issue with dotnet grpc! ❤️
Thanks for sorting this @mikhailshilkov I can confirm it works as expected with the Alpha release, looking forward to getting it in once 2.8.1 is out!
@gitfool
So, for every layer of yaml,
ReadMessagemethod would be called three times: once withmessagebeing aStruct, once withmessagebeingMapField<string, Value>, and once withValue. I guess that’s just how untyped dictionaries are represented in protobuf.I’ve got the same problem using dotnet/c# with cert manager. This is a showstopper! 😬