pulumi / pulumi-command

Apache License 2.0
57 stars 23 forks source link

local.Command missing stdout and stderr after upgrade to pulumi v6 #461

Closed stefangpeter closed 1 week ago

stefangpeter commented 3 weeks ago

What happened?

we have a local command in a lib, uploading local data into an s3 bucket. This worked with pulumi v5 without problems After upgrading all the pulumi packages to the latest v6 versions, it suddenly complains in the pulumi up preview phase:

  command:local:Command (vpc-shell-sandbox-maintenance_page-sync-static-assets):   
    error: Preview failed: 2 failures decoding:
        stdout: Missing required field 'stdout' on 'local.CommandOutputs'
        stderr: Missing required field 'stderr' on 'local.CommandOutputs'

I have no idea what that means. The type CommandOutputs can not be found anywhere. stdout from the resulting local Command object can be used to output the output. But does not help. Also settings logging to None does not help. Currently I'm stuck here. What am I doing wrong?

Edit: I could nail it down to the switch from @pulumi/command@0.8 to 0.9. From 0.9 on the error is showing up.

Example

new local.Command( uniqueChildName( uniqueName(name), `sync-static-assets`) , {
                create: pulumi.interpolate`aws s3 sync ${srcDirectory} s3://${templatesBucketName}` ,
                environment: { hash : pulumi.interpolate`${directoryHash(srcDirectory)}` },
            }, { parent: this, dependsOn : this.assetsBucket });

Output of pulumi about

CLI Version 3.118.0 Go Version go1.22.3 Go Compiler gc

Plugins KIND NAME VERSION resource archive 0.0.5 resource aws 6.38.0 resource aws 6.38.0 resource awsx 2.11.0 resource awsx 2.11.0 resource command 0.11.1 resource docker 4.5.4 resource docker 4.5.4 resource docker 3.6.1 resource docker 3.6.1 language nodejs unknown

Host OS Microsoft Windows 11 Enterprise Version 10.0.22631 Build 22631 Arch x86_64

This project is written in nodejs: executable='C:\Program Files\nodejs\node.exe' version='v18.19.0'

Current Stack: pcvisit/vpc_shell/Sandbox

TYPE URN pulumi:pulumi:Stack urn:pulumi:Sandbox::vpc_shell::pulumi:pulumi:Stack::vpc_shell-Sandbox pulumi:providers:aws urn:pulumi:Sandbox::vpc_shell::pulumi:providers:aws::default_5_43_0 pcvisit:LambdaLayer urn:pulumi:Sandbox::vpc_shell::pcvisit:LambdaLayer::vpc-shell-sandbox-lambda-layer pulumi:providers:archive urn:pulumi:Sandbox::vpc_shell::pulumi:providers:archive::default_0_0_4 aws:ec2/vpc:Vpc urn:pulumi:Sandbox::vpc_shell::aws:ec2/vpc:Vpc::vpc-shell-sandbox-vpc aws:ec2/internetGateway:InternetGateway urn:pulumi:Sandbox::vpc_shell::aws:ec2/internetGateway:InternetGateway::vpc-shell-sandbox-igw awsx:x:ec2:Vpc urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc::vpc-shell-sandbox-for-fargate-vpc aws:route53/zone:Zone urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone::vpc-shell-sandbox-shop-route53-zone aws:ec2/vpnGateway:VpnGateway urn:pulumi:Sandbox::vpc_shell::aws:ec2/vpnGateway:VpnGateway::vpc-shell-sandbox-gateway aws:route53/zone:Zone urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone::vpc-shell-sandbox-salesportal-route53-zone aws:ec2/routeTable:RouteTable urn:pulumi:Sandbox::vpc_shell::aws:ec2/routeTable:RouteTable::vpc-shell-sandbox-route-table aws:route53/zone:Zone urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone::vpc-shell-sandbox-route53-zone aws:route53/zone:Zone urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone::vpc-shell-sandbox-webapp-route53-zone aws:ec2/customerGateway:CustomerGateway urn:pulumi:Sandbox::vpc_shell::aws:ec2/customerGateway:CustomerGateway::vpc-shell-sandbox-fortigate-fw-at-plusserver awsx:x:ecs:Cluster urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster::vpc-shell-sandbox-ecs-cluster aws:ec2/securityGroup:SecurityGroup urn:pulumi:Sandbox::vpc_shell::aws:ec2/securityGroup:SecurityGroup::vpc-shell-sandbox-security-group aws:acm/certificate:Certificate urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:acm/certificate:Certificate::vpc-shell-sandbox-shop-certificate aws:ec2/vpc:Vpc urn:pulumi:Sandbox::vpc_shell::aws:ec2/vpc:Vpc::vpc-shell-sandbox-for-fargate-vpc aws:ec2/mainRouteTableAssociation:MainRouteTableAssociation urn:pulumi:Sandbox::vpc_shell::aws:ec2/mainRouteTableAssociation:MainRouteTableAssociation::vpc-shell-sandbox-main-route-table aws:ec2/eip:Eip urn:pulumi:Sandbox::vpc_shell::aws:ec2/eip:Eip::vpc-shell-sandbox-publicIp4NAT pcvisit:SelfRegisteringSubnet urn:pulumi:Sandbox::vpc_shell::pcvisit:SelfRegisteringSubnet::vpc-shell-sandbox-subnet aws:acm/certificate:Certificate urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:acm/certificate:Certificate::vpc-shell-sandbox-salesportal-certificate aws:acm/certificate:Certificate urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:acm/certificate:Certificate::vpc-shell-sandbox-certificate aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record::vpc-shell-sandbox-subdomain-salesportal aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record::vpc-shell-sandbox-website aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record::vpc-shell-sandbox-subdomain-shop awsx:x:ec2:SecurityGroup urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup::vpc-shell-sandbox-ecs-cluster aws:acm/certificate:Certificate urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:acm/certificate:Certificate::vpc-shell-sandbox-webapp-certificate aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record::vpc-shell-sandbox-subdomain-webapp aws:ecs/cluster:Cluster urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$aws:ecs/cluster:Cluster::vpc-shell-sandbox-ecs-cluster aws:ec2/vpnConnection:VpnConnection urn:pulumi:Sandbox::vpc_shell::aws:ec2/vpnConnection:VpnConnection::vpc-shell-sandbox-vpn-connection aws:s3/bucketObjectv2:BucketObjectv2 urn:pulumi:Sandbox::vpc_shell::pcvisit:LambdaLayer$aws:s3/bucketObjectv2:BucketObjectv2::vpc-shell-sandbox-lambda-layer-object pcvisit:DockerRepository-ecr-all-build-artefacts urn:pulumi:Sandbox::vpc_shell::pcvisit:DockerRepository-ecr-all-build-artefacts::vpc-shell-sandbox-pcvisit-DockerRepository-ecr-all-build-artefacts vpc-shell-sandbox-ecr-cache-rule-ecr-public urn:pulumi:Sandbox::vpc_shell::vpc-shell-sandbox-ecr-cache-rule-ecr-public::vpc-shell-sandbox-ecr-cache-rule-ecr-public pcvisit:Subdomain urn:pulumi:Sandbox::vpc_shell::pcvisit:Subdomain::vpc-shell-sandbox-dns-checker-subdomain pcvisit:DNSCheck urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck::vpc-shell-sandbox-dns-checker SourceCredentials urn:pulumi:Sandbox::vpc_shell::SourceCredentials::vpc-shell-sandbox-CreateSourceCodeCredentialsForSandbox aws:codestarconnections/connection:Connection urn:pulumi:Sandbox::vpc_shell::aws:codestarconnections/connection:Connection::vpc-shell-sandbox-BitBucketConnection aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record::vpc-shell-sandbox-shop-validation-domain aws:ec2/subnet:Subnet urn:pulumi:Sandbox::vpc_shell::pcvisit:SelfRegisteringSubnet$aws:ec2/subnet:Subnet::vpc-shell-sandbox-subnet-c aws:ec2/subnet:Subnet urn:pulumi:Sandbox::vpc_shell::pcvisit:SelfRegisteringSubnet$aws:ec2/subnet:Subnet::vpc-shell-sandbox-subnet-b pcvisit:ApplicationLoadBalancer urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer ::vpc-shell-sandbox-ApplicationLoadBalancer aws:ec2/subnet:Subnet urn:pulumi:Sandbox::vpc_shell::pcvisit:SelfRegisteringSubnet$aws:ec2/subnet:Subnet::vpc-shell-sandbox-subnet-a aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record::vpc-shell-sandbox-validation-domain awsx:x:ec2:IngressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup$awsx:x:ec2:IngressSecurityGroupRule::vpc-shell-sandbox-ecs-cluster-containers awsx:x:ec2:EgressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup$awsx:x:ec2:EgressSecurityGroupRule::vpc-shell-sandbox-ecs-cluster-egress awsx:x:ec2:IngressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup$awsx:x:ec2:IngressSecurityGroupRule::vpc-shell-sandbox-ecs-cluster-ssh aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record::vpc-shell-sandbox-salesportal-validation-domain aws:ec2/securityGroup:SecurityGroup urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup$aws:ec2/securityGroup:SecurityGroup::vpc-shell-sandbox-ecs-cluster aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record::vpc-shell-sandbox-webapp-validation-domain aws:ec2/vpnConnectionRoute:VpnConnectionRoute urn:pulumi:Sandbox::vpc_shell::aws:ec2/vpnConnectionRoute:VpnConnectionRoute::vpc-shell-sandbox-vpn-route-plusserver aws:ecr/repository:Repository urn:pulumi:Sandbox::vpc_shell::pcvisit:DockerRepository-ecr-all-build-artefacts$aws:ecr/repository:Repository::vpc-shell-sandbox-ecr-all-build-artefacts aws:codebuild/sourceCredential:SourceCredential urn:pulumi:Sandbox::vpc_shell::SourceCredentials$aws:codebuild/sourceCredential:SourceCredential::source-credential-for-bitbucket aws:ecr/repository:Repository urn:pulumi:Sandbox::vpc_shell::vpc-shell-sandbox-ecr-cache-rule-ecr-public$aws:ecr/repository:Repository::vpc-shell-sandbox-ecr-public-docker-library-node pcvisit:LambdaFunction urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaFunction::vpc-shell-sandbox-dns-checker-lambda aws:ec2/routeTableAssociation:RouteTableAssociation urn:pulumi:Sandbox::vpc_shell::pcvisit:SelfRegisteringSubnet$aws:ec2/subnet:Subnet$aws:ec2/routeTableAssociation:RouteTableAssociation::vpc-shell-sandbox-subnet-route-table-association-c aws:ec2/routeTableAssociation:RouteTableAssociation urn:pulumi:Sandbox::vpc_shell::pcvisit:SelfRegisteringSubnet$aws:ec2/subnet:Subnet$aws:ec2/routeTableAssociation:RouteTableAssociation::vpc-shell-sandbox-subnet-route-table-association-b aws:ec2/natGateway:NatGateway urn:pulumi:Sandbox::vpc_shell::aws:ec2/natGateway:NatGateway::vpc-shell-sandbox-nat aws:ec2/routeTableAssociation:RouteTableAssociation urn:pulumi:Sandbox::vpc_shell::pcvisit:SelfRegisteringSubnet$aws:ec2/subnet:Subnet$aws:ec2/routeTableAssociation:RouteTableAssociation::vpc-shell-sandbox-subnet-route-table-association-a aws:apigateway/domainName:DomainName urn:pulumi:Sandbox::vpc_shell::pcvisit:Subdomain$aws:apigateway/domainName:DomainName::vpc-shell-sandbox-dns-checker-subdomain-domain-name pcvisit:MaintenancePage urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage ::vpc-shell-sandbox-maintenance_assets aws:acm/certificateValidation:CertificateValidation urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:acm/certificateValidation:CertificateValidation::vpc-shell-sandbox-salesportal-certificateValidation aws:lb:ApplicationLoadBalancer urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer::vpc-shell-sandbox-bpl-alb aws:acm/certificateValidation:CertificateValidation urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:acm/certificateValidation:CertificateValidation::vpc-shell-sandbox-shop-certificateValidation aws:acm/certificateValidation:CertificateValidation urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:route53/record:Record$aws:acm/certificateValidation:CertificateValidation::vpc-shell-sandbox-certificateValidation aws:acm/certificateValidation:CertificateValidation urn:pulumi:Sandbox::vpc_shell::aws:route53/zone:Zone$aws:acm/certificateValidation:CertificateValidation::vpc-shell-sandbox-webapp-certificateValidation aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup$awsx:x:ec2:IngressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-ecs-cluster-containers aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup$awsx:x:ec2:IngressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-ecs-cluster-ssh aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::awsx:x:ec2:Vpc$awsx:x:ecs:Cluster$awsx:x:ec2:SecurityGroup$awsx:x:ec2:EgressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-ecs-cluster-egress aws:ecr/pullThroughCacheRule:PullThroughCacheRule urn:pulumi:Sandbox::vpc_shell::vpc-shell-sandbox-ecr-cache-rule-ecr-public$aws:ecr/repository:Repository$aws:ecr/pullThroughCacheRule:PullThroughCacheRule::vpc-shell-sandbox-ecr-cache-rule-ecr-public aws:ecr/repositoryPolicy:RepositoryPolicy urn:pulumi:Sandbox::vpc_shell::pcvisit:DockerRepository-ecr-all-build-artefacts$aws:ecr/repository:Repository$aws:ecr/repositoryPolicy:RepositoryPolicy::vpc-shell-sandbox-ecr-all-build-artefacts-pull-policy aws:cloudwatch/logGroup:LogGroup urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaFunction$aws:cloudwatch/logGroup:LogGroup::vpc-shell-sandbox-dns-checker-lambda-log-group aws:iam/role:Role urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaFunction$aws:iam/role:Role::vpc-shell-sandbox-dns-checker-lambda-role aws:ec2/routeTable:RouteTable urn:pulumi:Sandbox::vpc_shell::aws:ec2/routeTable:RouteTable::vpc-shell-sandbox-privateRoute aws:route53/record:Record urn:pulumi:Sandbox::vpc_shell::pcvisit:Subdomain$aws:route53/record:Record::vpc-shell-sandbox-dns-checker-subdomain-a-record awsx:lb:ApplicationListener urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener::vpc-shell-sandbox-bpl-alb-listener-https-trackworld pcvisit:StaticAssets urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets ::vpc-shell-sandbox-maintenance_page awsx:lb:ApplicationListener urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener::vpc-shell-sandbox-bpl-alb-listener-https awsx:lb:ApplicationListener urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener::vpc-shell-sandbox-bpl-alb-listener-http aws:lb/loadBalancer:LoadBalancer urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$aws:lb/loadBalancer:LoadBalancer::vpc-shell-sandbox-bpl-alb pcvisit:Parameter urn:pulumi:Sandbox::vpc_shell::pcvisit:Parameter::vpc-shell-sandbox-dns-checker-ssm-parameterstore-dnschecker pcvisit:LambdaApiGateway urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaApiGateway::vpc-shell-sandbox-dns-checker-lambda-api-gateway aws:ssm/parameter:Parameter urn:pulumi:Sandbox::vpc_shell::aws:ssm/parameter:Parameter::vpc-shell-sandbox-dns-checker-ssm-parameterstore-dnschecker-ssm-entry aws:iam/rolePolicyAttachment:RolePolicyAttachment urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaFunction$aws:iam/role:Role$aws:iam/rolePolicyAttachment:RolePolicyAttachment::vpc-shell-sandbox-dns-checker-lambda-role-policy-attachment aws:iam/rolePolicy:RolePolicy urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaFunction$aws:iam/role:Role$aws:iam/rolePolicy:RolePolicy::vpc-shell-sandbox-dns-checker-lambda-role-policy awsx:x:ec2:EgressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:EgressSecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-https-trackworld-external-0-egress
awsx:x:ec2:EgressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:EgressSecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-http-external-0-egress awsx:x:ec2:IngressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:IngressSecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-http-external-0-ingress awsx:x:ec2:IngressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:IngressSecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-https-external-0-ingress awsx:lb:ListenerRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:lb:ListenerRule::vpc-shell-sandbox-bpl-alb-https-test-maintenanceMode awsx:lb:ListenerRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:lb:ListenerRule::vpc-shell-sandbox-bpl-alb-trackworld-test-maintenanceMode awsx:lb:ListenerRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:lb:ListenerRule::vpc-shell-sandbox-bpl-alb-http-test-maintenanceMode awsx:x:ec2:EgressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:EgressSecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-https-external-0-egress awsx:x:ec2:IngressSecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:IngressSecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-https-trackworld-external-0-ingress
aws:ec2/vpcEndpoint:VpcEndpoint urn:pulumi:Sandbox::vpc_shell::aws:ec2/vpcEndpoint:VpcEndpoint::vpc-shell-sandbox-s3gw aws:apigateway:x:API urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaApiGateway$aws:apigateway:x:API::vpc-shell-sandbox-dns-checker-lambda-api-gateway-api aws:s3/bucketV2:BucketV2 urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $aws:s3/bucketV2:BucketV2::vpc-shell-sandbox-maintenance_page-bucket aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:EgressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-https-trackworld-external-0-egress aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:IngressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-https-external-0-ingress aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:IngressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-http-external-0-ingress aws:lb/listener:Listener urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$aws:lb/listener:Listener::vpc-shell-sandbox-bpl-alb-listener-http aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:EgressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-http-external-0-egress aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:EgressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-https-external-0-egress aws:ec2/securityGroupRule:SecurityGroupRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:x:ec2:IngressSecurityGroupRule$aws:ec2/securityGroupRule:SecurityGroupRule::vpc-shell-sandbox-bpl-alb-listener-https-trackworld-external-0-ingress aws:s3/bucketPublicAccessBlock:BucketPublicAccessBlock urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $aws:s3/bucketV2:BucketV2$aws:s3/bucketPublicAccessBlock:BucketPublicAccessBlock::vpc-shell-sandbox-maintenance_page-PublicAccess pulumi:providers:command urn:pulumi:Sandbox::vpc_shell::pulumi:providers:command::default_0_4_1 aws:s3/bucketCorsConfigurationV2:BucketCorsConfigurationV2 urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $aws:s3/bucketV2:BucketV2$aws:s3/bucketCorsConfigurationV2:BucketCorsConfigurationV2::vpc-shell-sandbox-maintenance_page-cors-rules command:local:Command urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $command:local:Command::vpc-shell-sandbox-maintenance_page-sync-static-assets aws:s3/bucketPolicy:BucketPolicy urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $aws:s3/bucketV2:BucketV2$aws:s3/bucketPolicy:BucketPolicy::vpc-shell-sandbox-maintenance_page-policy aws:lb/listenerRule:ListenerRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:lb:ListenerRule$aws:lb/listenerRule:ListenerRule::vpc-shell-sandbox-bpl-alb-http-test-maintenanceMode
aws:lb/listener:Listener urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$aws:lb/listener:Listener::vpc-shell-sandbox-bpl-alb-listener-https aws:lb/listener:Listener urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$aws:lb/listener:Listener::vpc-shell-sandbox-bpl-alb-listener-https-trackworld aws:lb/listenerCertificate:ListenerCertificate urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb/listenerCertificate:ListenerCertificate::vpc-shell-sandbox-ListenerCertificate-https-Subdomain-2 aws:lb/listenerCertificate:ListenerCertificate urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb/listenerCertificate:ListenerCertificate::vpc-shell-sandbox-ListenerCertificate-https-Subdomain-1 aws:lb/listenerCertificate:ListenerCertificate urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb/listenerCertificate:ListenerCertificate::vpc-shell-sandbox-ListenerCertificate-https-Subdomain-0 aws:lb/listenerRule:ListenerRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:lb:ListenerRule$aws:lb/listenerRule:ListenerRule::vpc-shell-sandbox-bpl-alb-https-test-maintenanceMode
aws:lb/listenerRule:ListenerRule urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $aws:lb:ApplicationLoadBalancer$awsx:lb:ApplicationListener$awsx:lb:ListenerRule$aws:lb/listenerRule:ListenerRule::vpc-shell-sandbox-bpl-alb-trackworld-test-maintenanceMode aws:lambda/layerVersion:LayerVersion urn:pulumi:Sandbox::vpc_shell::pcvisit:LambdaLayer$aws:lambda/layerVersion:LayerVersion::vpc-shell-sandbox-lambda-layer-version aws:lambda/function:Function urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaFunction$aws:lambda/function:Function::vpc-shell-sandbox-dns-checker-lambda-function aws:apigateway/restApi:RestApi urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaApiGateway$aws:apigateway:x:API$aws:apigateway/restApi:RestApi::vpc-shell-sandbox-dns-checker-lambda-api-gateway-api aws:apigateway/deployment:Deployment urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaApiGateway$aws:apigateway:x:API$aws:apigateway/deployment:Deployment::vpc-shell-sandbox-dns-checker-lambda-api-gateway-api aws:lambda/permission:Permission urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaApiGateway$aws:apigateway:x:API$aws:lambda/permission:Permission::vpc-shell-sandbox-dns-checker-lambda-api-gateway-api-0469df9c aws:apigateway/stage:Stage urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaApiGateway$aws:apigateway:x:API$aws:apigateway/stage:Stage::vpc-shell-sandbox-dns-checker-lambda-api-gateway-api pcvisit:SsmParameterStore urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:SsmParameterStore::vpc-shell-sandbox-dns-checker-ssm-parameterstore aws:apigatewayv2/apiMapping:ApiMapping urn:pulumi:Sandbox::vpc_shell::pcvisit:DNSCheck$pcvisit:LambdaApiGateway$aws:apigatewayv2/apiMapping:ApiMapping::vpc-shell-sandbox-dns-checker-lambda-api-gateway-api-mapping

Found no pending operations associated with pcvisit/Sandbox

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

mjeffryes commented 3 weeks ago

Thanks for the bug report @stefangpeter. ComandOutputs is an internal struct in the implementation of the the provider. It seems that somewhere we're getting a bad value internally and can't convert it to our internal representation.

If you're able to share a more complete program that reproduces the error, that would probably help us debug. I suspect the values of srcDirectory and templatesBucketName may be significant to reproduce (or more accurately, I suspect their being secret or unknown during the preview may be what triggers the error).

Also, not sure if it's useful for you, but you may be able to work around the error by skipping preview using pulumi up -f

stefangpeter commented 3 weeks ago

thanks for the reply. I looked a bit more in it.

We made a feature branch to check if the upgrade of pulumi wants to change some existing resources (RedisDB, VPN, VPC etc). the example code from abpve is part of a class handling the assets of a stack (maintancepage etc). creating the bucket and the cors and policies, and uploading ressources into it) When I do the pulumi up in the stack of the newly created branch (no resources existing) it will run without error. If I switch the stack of the branch to our sandbox it will generate the error (the s3 bucket etc all existing).

In one case of the error the srcDirectory is just "./assets". and the templatesBucketName is just created from "assets" put into the following method: (resname = "assets") export function nginxCachingCompatibleApplicationBucketName( resName : string ) : string { const naiveName = ${ resName }.${ stackName() }.pcvisit.com const naiveNameasLowerCase = naiveName.toLowerCase() const nameW_S3CompatibleChars = naiveNameasLowerCase.replace(/[^a-z0-9.-]/g,'-'); return nameW_S3CompatibleChars }

I tried reproducing the behaviour in creating the new stack, then change something for the command and prview again, but it works. Maybe it is a problem that the ressources of sandbox are created with pulumi v5 and me trying to check against it with pulumi v6 (without refresh)?

Edit: Haven't tried it. But the error occurs when there is an existing local.Command resource created with version < 0.9.0 and now I do a pulumi up with version > 0.8.0 of @pulumi/command. It than wants to update the ressource: command:local:Command application-subnet-signalizingoverwss-pcv-32565-assets-sync-static-assets update [diff: +addPreviousOutputInEnv]; 1 error but the addPreviousOutputInEnv is not set by me ;)

stefangpeter commented 2 weeks ago

this problems now gets more and more severe. Suddenly the work around using command 0.7. does not work anymore. I even can't remove the local.COmmand (commenting it out) due to the error: error: 2 failures decoding: stdout: Missing required field 'stdout' on 'local.CommandOutputs' stderr: Missing required field 'stderr' on 'local.CommandOutputs'

So I can't run this stuff in our productive environemt anymore. wtf? I tried going back to 0.6.0, does not work. it tried using the latest 0.11 does not work :(

I don't even know what it wants to update ^^: pulumi:pulumi:Stack vpc_shell-Sandbox 2 messages ├─ pcvisit:ApplicationLoadBalancer vpc-shell-sandbox-ApplicationLoadBalancer
│ └─ pcvisit:MaintenancePage vpc-shell-sandbox-maintenance_assets
│ └─ pcvisit:StaticAssets vpc-shell-sandbox-maintenance_page
+- │ └─ command:local:Command vpc-shell-sandbox-maintenance_page-sync-static-assets replace
└─ pcvisit:LambdaLayer vpc-shell-sandbox-lambda-layer
+- └─ aws:lambda:LayerVersion vpc-shell-sandbox-lambda-layer-version replace
Diagnostics: pulumi:pulumi:Stack (vpc_shell-Sandbox): check account policies for accountID: 693840509409, companyAccountToConfigure :Sandbox hashing of ./assets/maintenance_page done, hash: "i0t87xOPHyM3KyKWsnl4BQ4loAA="

Resources: 121 unchanged

Do you want to perform this update? details pulumi:pulumi:Stack: (same) [urn=urn:pulumi:Sandbox::vpc_shell::pulumi:pulumi:Stack::vpc_shell-Sandbox]

aws:ec2/vpc:Vpc: (read) [id=vpc-0048c64f425b4023b] [urn=urn:pulumi:Sandbox::vpc_shell::aws:ec2/vpc:Vpc::vpc-shell-sandbox-for-fargate-vpc] [provider=urn:pulumi:Sandbox::vpc_shell::pulumi:providers:aws::default_6_39_1::b06d5ed7-929e-4055-880d-dd5358e163c2] tags: { Name : "vpc-shell-sandbox-for-fargate-vpc" general:Project : "vpc-shell" general:Stack : "sandbox" technical:RessourceType: "aws:ec2/vpc:Vpc" } --command:local:Command: (delete-replaced) [id=434809c38f6b] [urn=urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $command:local:Command::vpc-shell-sandbox-maintenance_page-sync-static-assets] [provider=urn:pulumi:Sandbox::vpc_shell::pulumi:providers:command::default_0_7_2::06bf0548-bc8c-491d-b118-9905a921f069] --aws:lambda/layerVersion:LayerVersion: (delete-replaced) [id=arn:aws:lambda:eu-central-1:693840509409:layer:vpc-shell-sandbox-lambda-layer-version:103] [urn=urn:pulumi:Sandbox::vpc_shell::pcvisit:LambdaLayer$aws:lambda/layerVersion:LayerVersion::vpc-shell-sandbox-lambda-layer-version] [provider=urn:pulumi:Sandbox::vpc_shell::pulumi:providers:aws::default_6_39_1::b06d5ed7-929e-4055-880d-dd5358e163c2] --aws:lambda/layerVersion:LayerVersion: (delete-replaced) [id=arn:aws:lambda:eu-central-1:693840509409:layer:vpc-shell-sandbox-lambda-layer-version:102] [urn=urn:pulumi:Sandbox::vpc_shell::pcvisit:LambdaLayer$aws:lambda/layerVersion:LayerVersion::vpc-shell-sandbox-lambda-layer-version] [provider=urn:pulumi:Sandbox::vpc_shell::pulumi:providers:aws::default_6_39_1::b06d5ed7-929e-4055-880d-dd5358e163c2]

thomas11 commented 1 week ago

I've tried a number of ways to reproduce this error but wasn't able to, so far.

CommandOutputs.{stdout,stderr} were introduced in #156 in release v0.7.0, although the properties had existed before that in a different place in the code. Therefore, they should be unrelated to an upgrade from v0.8 to v0.9.

However, I spotted in your original stack a providers:command::default_0_4_1 which was before v0.7.

Then I tried a simple local command that writes stdout:

import * as command from "@pulumi/command";

const cmd = new command.local.Command("commandResource", {
    create: "echo 0.4",
});

I ran this in several iterations, going from 0.4 to 0.7 or to 0.9, going back to 0.4 again, etc, but everything worked for me. pulumi stack export shows that the stdout and stderr fields are always in Pulumi's state.

Can you think of any other factors here? Did you edit or copy the Pulumi state at all?

As a worst-case manual unblock, you can edit the state yourself.

  1. pulumi stack export > stack.json
  2. edit stack.json: for each resource with "type": "command:local:Command", add
                    "stderr": "",
                    "stdout": ""
  3. pulumi stack import --file stack.json

This is an unusual step and should be done with care, but it's there as a fallback.

There's also the other issue with [diff: +addPreviousOutputInEnv]. This property was introduced in v0.10.0. It's probably an oversight on our part that it shows up in the diff and causes your command to re-run. It shouldn't hurt, though.

stefangpeter commented 1 week ago

I exported the stack. the object looks like this after the edit:

{
                "urn": "urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $command:local:Command::vpc-shell-sandbox-maintenance_page-sync-static-assets",
                "custom": true,
                "id": "vpc-shell-sandbox-maintenance_page-sync-static-assets23ebb06e",
                "type": "command:local:Command",
                "inputs": {
                    "create": "aws s3 sync ./assets/maintenance_page s3://maintenance-page.sandbox.pcvisit.com",
                    "triggers": [
                        "i0t87xOPHyM3KyKWsnl4BQ4loAA="
                    ]
                },
                "outputs": {
                    "create": "aws s3 sync ./assets/maintenance_page s3://maintenance-page.sandbox.pcvisit.com",
                    "stderr": "",
                    "stdout": "Completed 652 Bytes/5.8 KiB (5.0 KiB/s) with 4 file(s) remaining\rupload: assets\\maintenance_page\\index.html to s3://maintenance-page.sandbox.pcvisit.com/index.html\r\nCompleted 652 Bytes/5.8 KiB (5.0 KiB/s) with 3 file(s) remaining\rCompleted 1.8 KiB/5.8 KiB (5.0 KiB/s) with 3 file(s) remaining  \rupload: assets\\maintenance_page\\maintenance-content.html to s3://maintenance-page.sandbox.pcvisit.com/maintenance-content.html\r\nCompleted 1.8 KiB/5.8 KiB (5.0 KiB/s) with 2 file(s) remaining\rCompleted 2.6 KiB/5.8 KiB (6.6 KiB/s) with 2 file(s) remaining\rupload: assets\\maintenance_page\\maintenance.css to s3://maintenance-page.sandbox.pcvisit.com/maintenance.css\r\nCompleted 2.6 KiB/5.8 KiB (6.6 KiB/s) with 1 file(s) remaining\rCompleted 5.8 KiB/5.8 KiB (14.6 KiB/s) with 1 file(s) remaining\rupload: assets\\maintenance_page\\pcvisit_logo_horizontal-02-white.svg to s3://maintenance-page.sandbox.pcvisit.com/pcvisit_logo_horizontal-02-white.svg\r",
                    "triggers": [
                        "i0t87xOPHyM3KyKWsnl4BQ4loAA="
                    ]
                },
                "parent": "urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets ::vpc-shell-sandbox-maintenance_page",
                "dependencies": [
                    "urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $aws:s3/bucketV2:BucketV2::vpc-shell-sandbox-maintenance_page-bucket"
                ],
                "provider": "urn:pulumi:Sandbox::vpc_shell::pulumi:providers:command::default_0_7_2::06bf0548-bc8c-491d-b118-9905a921f069",
                "propertyDependencies": {
                    "create": [],
                    "triggers": []
                },
                "created": "2024-06-17T13:21:58.5076538Z",
                "modified": "2024-06-17T13:21:58.5076538Z",
                "stderr": "",
                "stdout": ""
            },

than I imported the stack, Than I pulumi uped it: View in Browser (Ctrl+O): https://app.pulumi.com/pcvisit/vpc_shell/Sandbox/updates/972

 Type                                 Name                                                   Status                  Info
 pulumi:pulumi:Stack                  vpc_shell-Sandbox                                      **failed**              1 error; 2 messages        
 └─ pcvisit:ApplicationLoadBalancer   vpc-shell-sandbox-ApplicationLoadBalancer
    └─ pcvisit:MaintenancePage        vpc-shell-sandbox-maintenance_assets
       └─ pcvisit:StaticAssets        vpc-shell-sandbox-maintenance_page

-- └─ command:local:Command vpc-shell-sandbox-maintenance_page-sync-static-assets deleting failed 1 error Diagnostics: command:local:Command (vpc-shell-sandbox-maintenance_page-sync-static-assets): error: 2 failures decoding: stdout: Missing required field 'stdout' on 'local.CommandOutputs' stderr: Missing required field 'stderr' on 'local.CommandOutputs'

I don't get the deleting part? Event, as mentioned, if I remove the object from the stack it still wants to delete it?

stefangpeter commented 1 week ago

I just renamed for testing purposes the command. it created it without any problems (but couldn't remove the other one) I renamed it back and tried again: error. I than exported the stack again and got somethign like that:

{
                "urn": "urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $command:local:Command::vpc-shell-sandbox-maintenance_page-sync-static-assets",
                "custom": true,
                "delete": true,
                "id": "434809c38f6b",
                "type": "command:local:Command",
                "inputs": {
                    "create": "aws s3 sync ./assets/maintenance_page s3://maintenance-page.sandbox.pcvisit.com",
                    "environment": {
                        "hash": "JZxDCvZ0mMtg4sOhxCMe9tWqTyE="
                    }
                },
                "outputs": {
                    "create": "aws s3 sync ./assets/maintenance_page s3://maintenance-page.sandbox.pcvisit.com",
                    "environment": {
                        "hash": "GQg6QteR+lMIUQ4FT7t9qnCFGU0="
                    },
                },
                "parent": "urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets ::vpc-shell-sandbox-maintenance_page",
                "dependencies": [
                    "urn:pulumi:Sandbox::vpc_shell::pcvisit:ApplicationLoadBalancer $pcvisit:MaintenancePage $pcvisit:StaticAssets $aws:s3/bucketV2:BucketV2::vpc-shell-sandbox-maintenance_page-bucket"
                ],
                "provider": "urn:pulumi:Sandbox::vpc_shell::pulumi:providers:command::default_0_7_2::06bf0548-bc8c-491d-b118-9905a921f069",
                "propertyDependencies": {
                    "create": [],
                    "environment": []
                },
                "modified": "2024-05-16T03:07:30.203646854Z",
                "sourcePosition": "project:///../../build_pipeline/libs/pcvisit_infrastructure_shared/src/components/StaticAssets.ts#125,13"
            }

I than added the stderr and stdout to the output parts, imported it and voila it worked?!?!? I will try this now with the other stacks if this solve the issue for us. But as you can see in the former answer by me, there were stdout and stderr present in the stack before??

mjeffryes commented 1 week ago

The bit the error message was complaining about was actually the extra stderr and stdout fields in the output struct here:

                "outputs": {
                    "create": "aws s3 sync ./assets/maintenance_page s3://maintenance-page.sandbox.pcvisit.com",
                    "stderr": "",
                    "stdout": "Completed 652 Bytes/5.8 KiB (5.0 KiB/s) with 4 file(s) remaining\rupload: assets\\maintenance_page\\index.html to s3://maintenance-page.sandbox.pcvisit.com/index.html\r\nCompleted 652 Bytes/5.8 KiB (5.0 KiB/s) with 3 file(s) remaining\rCompleted 1.8 KiB/5.8 KiB (5.0 KiB/s) with 3 file(s) remaining  \rupload: assets\\maintenance_page\\maintenance-content.html to s3://maintenance-page.sandbox.pcvisit.com/maintenance-content.html\r\nCompleted 1.8 KiB/5.8 KiB (5.0 KiB/s) with 2 file(s) remaining\rCompleted 2.6 KiB/5.8 KiB (6.6 KiB/s) with 2 file(s) remaining\rupload: assets\\maintenance_page\\maintenance.css to s3://maintenance-page.sandbox.pcvisit.com/maintenance.css\r\nCompleted 2.6 KiB/5.8 KiB (6.6 KiB/s) with 1 file(s) remaining\rCompleted 5.8 KiB/5.8 KiB (14.6 KiB/s) with 1 file(s) remaining\rupload: assets\\maintenance_page\\pcvisit_logo_horizontal-02-white.svg to s3://maintenance-page.sandbox.pcvisit.com/pcvisit_logo_horizontal-02-white.svg\r",
                    "triggers": [
                        "i0t87xOPHyM3KyKWsnl4BQ4loAA="
                    ]
                },

Your second attempt importing state from the working stack cleared those fields. You could probably simplify your workaround steps to just: export, delete stderr and stdout from outputs, re-import.

I'm not sure how you ended up with a stack in that state though. We'll close this ticket for now since we can't find a repro, but if you do find steps that would let us reproduce the broken state, please let us know!

stefangpeter commented 1 week ago

wait. I tried it with other stacks and after renaming and naming back the command I end up with a stack where the local command is twice in it:

            {
                "urn": "urn:pulumi:Sandbox::application_subnet::pcvisit:StaticAssets $command:local:Command::application-subnet-sandbox-assets-sync-static-assets",
                "custom": true,
                "delete": true,
                "id": "33600cd24f7f9",
                "type": "command:local:Command",
                "inputs": {
                    "create": "aws s3 sync ./assets s3://assets.sandbox.pcvisit.com",
                    "environment": {
                        "hash": "L939p01CX4+jceHMwogXIuCAM+Q="
                    }
                },
                "outputs": {
                    "create": "aws s3 sync ./assets s3://assets.sandbox.pcvisit.com",
                    "environment": {
                        "hash": "L939p01CX4+jceHMwogXIuCAM+Q="
                    }
                },
                "parent": "urn:pulumi:Sandbox::application_subnet::pcvisit:StaticAssets ::application-subnet-sandbox-assets",
                "dependencies": [
                    "urn:pulumi:Sandbox::application_subnet::pcvisit:StaticAssets $aws:s3/bucketV2:BucketV2::application-subnet-sandbox-assets-bucket"
                ],
                "provider": "urn:pulumi:Sandbox::application_subnet::pulumi:providers:command::default_0_7_2::58a2b789-221f-46a0-a387-301dfe323b0e",
                "propertyDependencies": {
                    "create": [],
                    "environment": []
                },
                "modified": "2024-05-04T03:15:04.391695329Z",
                "sourcePosition": "project:///../../build_pipeline/libs/pcvisit_infrastructure_shared/src/components/StaticAssets.ts#125,13"
            }

and a new entry it seems:

            {
                "urn": "urn:pulumi:Sandbox::application_subnet::pcvisit:StaticAssets $command:local:Command::application-subnet-sandbox-assets-sync-static-assets",
                "custom": true,
                "id": "application-subnet-sandbox-assets-sync-static-assets3adc2dc1",
                "type": "command:local:Command",
                "inputs": {
                    "create": "aws s3 sync ./assets s3://assets.sandbox.pcvisit.com",
                    "triggers": [
                        "51dQkTe5McQhYTULE8W1OHnfQWI="
                    ]
                },
                "outputs": {
                    "create": "aws s3 sync ./assets s3://assets.sandbox.pcvisit.com",
                    "stderr": "",
                    "stdout": "",
                    "triggers": [
                        "51dQkTe5McQhYTULE8W1OHnfQWI="
                    ]
                },
                "parent": "urn:pulumi:Sandbox::application_subnet::pcvisit:StaticAssets ::application-subnet-sandbox-assets",
                "dependencies": [
                    "urn:pulumi:Sandbox::application_subnet::pcvisit:StaticAssets $aws:s3/bucketV2:BucketV2::application-subnet-sandbox-assets-bucket"
                ],
                "provider": "urn:pulumi:Sandbox::application_subnet::pulumi:providers:command::default_0_7_2::58a2b789-221f-46a0-a387-301dfe323b0e",
                "propertyDependencies": {
                    "create": [],
                    "triggers": []
                },
                "created": "2024-06-17T14:04:38.807036Z",
                "modified": "2024-06-17T14:04:38.807036Z"
            },
stefangpeter commented 1 week ago

after checking further it is the case that in every stack using the static assets component with the local.Command the local.Command is twice in the stack. If I remove the "old" one withput the stderr/stdout the error is gone. I have no idea how this has happend. But I think you could really close the bug here.