billions-piano-69192
09/08/2023, 11:55 AMpulumi_google_native
questions are suited for this channel. Let me know if there is a better channel for this question. I have created a `pulumi_google_native.cloudbuild.v1.Build`` resource with success. From what I can see in the Cloud Build
-> Histroy
-> <Build-ID>
logs, everything appears to be going smoothly on the gcp side. However, as soon as the cloudbuild job completes, Pulumi raises an AssertionError
File "./project_config/venv/lib/python3.11/site-packages/pulumi/runtime/rpc.py", line 893, in translate_output_properties
raise AssertionError(
AssertionError: Unexpected type; expected a value of type `<class 'str'>` but got a value of type `<class 'dict'>` at resource `django-operations`, property `timing.BUILD`: {'startTime': '2023-09-08T01:04:43.521767567Z', 'endTime': '2023-09-08T01:06:50.547510872Z'}
From what I can tell from debugging, it appears as if Pulumi is performing a translation of the output properties. During this operation, a type assertion is made for the timing
property in the Output
. It appears as though pulumi_google_native/cloudbuild/v1/build.py
has the timing
property getter defined as a pulumi.Output[str]
. After digging through the gcp api docs (https://cloud.google.com/build/docs/api/reference/rest/v1/projects.builds) I believe the timing
getter should be a pulumi.Output[Mapping[str, Mapping[str, str]]]
. As a test, I made the change to the getter source and the AssertionError
is no longer raised.
Is this the correct fix? Is there another way this can be fixed without a code change? Perhaps an option to ignore the Output
in the Build
constructor or ResourceOptions
.