Open caffeinate opened 3 months ago
Hi @caffeinate. I'm sorry you're hitting that. It's definitely confusing. The correct type for service_registries
is ecs.ServiceServiceRegistriesArgs
(docs):
Could you provide the line number for the assertion error? If that's coming from Pulumi code, we would like to fix the error.
Hey, sorry about that - it looks like in this case we need to improve our retrieval augmented generation for Pulumi AI. I'll move this to the AI repo, though I think we won't have an immediate fix for this.
@iwahbe is correct, the right code should be service_registries=aws.ecs.ServiceServiceRegistriesArgs
.
Just to confirm- If I use a list as per the example I get the assertion error which originates from-
File "/Users/si/.local/share/virtualenvs/aws_fargate-vnPX2j61/lib/python3.10/site-packages/pulumi/runtime/rpc.py", line 168, in _get_list_element_type
raise AssertionError(f"Unexpected type. Expected 'list' got '{typ}'")
If I use a single ServiceServiceRegistriesArgs
I get-
**error: 1 error occurred:
The ARN is from this-
http_namespace = servicediscovery.HttpNamespace(
"fossa_http_namespace",
name="fossa_workloads",
description="HTTP Namespace for Fossa",
)
Which is pretty close to the example.
Thanks for looking into this.
@caffeinate We've just shipped some improvements here to the prompting for list types. Due to the search issues mentioned before, though, I'm not confident it would result in better code generation here. We're tracking an issue for improving resource retrieval and grounding results.
Thanks @AaronFriel , I can confirm that this hasn't yet solved it for me.
using
ecs.Service(..)
This arg-
service_registries=[ecs.ServiceServiceRegistriesArgs(registry_arn=http_namespace.arn)],
causes- AssertionError: Unexpected type. Expected 'list' got '<class 'pulumi_aws.ecs._inputs.ServiceServiceRegistriesArgs'>'
The service_registries are being supplied as a list.
Expected behavior
This code was used as a starting point- https://www.pulumi.com/ai/answers/1eTQsUEuD7z6y4iEJWxa3d/implementing-service-discovery-for-ai-workloads-on-aws-ecs
I've reduced the original plan to used exactly the same servicediscovery.HttpNamespace as in the example code.
Current behavior
Throws an exception.
Steps to reproduce
I'm using Pulumi 3.109.0 and pulumi_aws 6.25.0
pulumi up
Context (Environment)
Make the IP addresses (ideally using
PrivateDnsNamespace
available to another ECS service).Affected feature