I am getting a protobuf assertion error from Pulum...
# general
I am getting a protobuf assertion error from Pulumi. I assume it means I'm passing bad data to a gRPC call but the data from
is not particularly helpful. Is there a way to get more information, like "what resource is wrong"?
(It appears threaded, so it's not like I can go "OK, so the most recent resource is the problem", and also the output from debug logs is broken up oddly and line-broken strangely at the best of times)
@boundless-monkey-50243 is this from a pulumi up command?
Copy code
debug: RegisterResource RPC prepared: t=aws:ec2/securityGroup:SecurityGroup, name=fargate-access-sg
    debug: RegisterResource RPC prepared: t=aws:cloudwatch/logGroup:LogGroup, name=data-api-v2-logs
    debug: RegisterResource RPC prepared: t=aws:iam/role:Role, name=task-role
    error: Running program '/home/ed/Development/hydrow/data-api-v2/deploy' failed with an unhandled exception:
    AssertionError: Assertion failed
        at new goog.asserts.AssertionError (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google-protobuf.js:79:876)
        at Object.goog.asserts.doAssertFailure_ (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google-protobuf.js:80:257)
        at Object.goog.asserts.assert [as assert] (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google-protobuf.js:81:83)
        at jspb.BinaryEncoder.writeDouble (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google-protobuf.js:329:67)
        at jspb.BinaryWriter.writeDouble (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google-protobuf.js:351:300)
        at proto.google.protobuf.Value.serializeBinaryToWriter (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google/protobuf/struct_pb.js:381:12)
        at jspb.BinaryWriter.writeMessage (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google-protobuf.js:353:336)
        at jspb.Map.serializeBinary (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google-protobuf.js:274:356)
        at proto.google.protobuf.Struct.serializeBinaryToWriter (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google/protobuf/struct_pb.js:187:7)
        at jspb.BinaryWriter.writeMessage (/home/ed/Development/hydrow/data-api-v2/deploy/node_modules/google-protobuf/google-protobuf.js:353:336)
It doesn't tell me what RPC failed though
And the one immediately prior hasn't changed in literally months.
In my case something was getting passed incorrectly to an ECS definition which caused it to fail to serialize (the serialization around ECS tasks/services seems very fragile, generally?), and I figured it out by shotgun-debugging a bit, but debuggability and logs are a real sore point when using Pulumi
Do you know what the ultimate issue was after debugging? We want to solve for that issue directly. Certainly if things are being allowed to fail on asserts in GRPC debugging is going to be rough - we need to catch these earlier where we can report useful diagnostics.
But would love to know the case you hit specifically.
So I think it was just an unexpected data type somewhere. My code didn't change, but the config feeding it did. gRPC assertions generally just seem to be type failures, so....