Closed t0yv0 closed 4 months ago
Something a tad fishy in https://github.com/pulumi/pulumi-aws/issues/3595
It appears that the codebase attempts to pin AWS to 5.35.0 but during some of the tests aws-6.25.0 gets installed anyway, which may be a change coming from the upgrade?
warning: using pulumi-language-yaml from $PATH at /home/runner/work/pulumi-yaml/pulumi-yaml/bin/pulumi-language-yaml
[resource plugin aws-native-0.98.0] installing
[resource plugin aws-6.25.0] installing
Ah looks like because of pulumi/pulumi#15568 there is a problem now with the auto-pin behavior this repository depended on. Since the new ProgramTest creates a separate sandbox for the test, TestExampleWebserver now starts auto-upgrading aws to 6.x with this change which hits the regression listed above.
** TODO FAIL: TestExampleAwsStaticWebsite (12.16s)
[[file:~/code/pulumi-yaml/pkg/tests/example_test.go::func TestExampleAwsStaticWebsite(t *testing.T) {][Test]]
Error: websiteURL does not exist on site-bucket
on Pulumi.yaml line 6:
6: websiteUrl: ${site-bucket.websiteURL}
Existing properties are: websiteUrl, bucketName, domainName, id, tags and 22 others
Similarly caused by inadvertent AWS upgrade to 6.x
The TestExampleAwsx failure similarly caused by a schema change, which might have been called out in the major version rel notes...
Previewing update (p-it-antons-mac-awsx-farga-bfb0d9b9):
[resource plugin awsx-2.5.0] installing
@ previewing update....[resource plugin aws-6.25.0] installing
+ pulumi:pulumi:Stack: (create)
[urn=urn:pulumi:p-it-antons-mac-awsx-farga-bfb0d9b9::awsx::pulumi:pulumi:Stack::awsx-p-it-antons-mac-awsx-farga-bfb0d9b9]
@ previewing update....
Downloading provider: aws
@ previewing update.....
Error: awsx:ecs:FargateService is not assignable from {cluster: string, taskDefinitionArgs: {container: {cpu: number, image: string, memory: number, portMappings: List<{containerPort: number, targetGroup: aws:lb/targetGroup:TargetGroup}>}}}
on Pulumi.yaml line 14:
14: container:
15: cpu: 512
16: image: nginx:latest
17: memory: 128
18: portMappings:
19: - containerPort: 80
20: targetGroup: ${lb.defaultTargetGroup}
Cannot assign '{cluster: string, taskDefinitionArgs: {container: {cpu: number, image: string, memory: number, portMappings: List<{containerPort: number, targetGroup: aws:lb/targetGroup:TargetGroup}>}}}' to 'awsx:ecs:FargateService':
taskDefinitionArgs: Cannot assign '{container: {cpu: number, image: string, memory: number, portMappings: List<{containerPort: number, targetGroup: aws:lb/targetGroup:TargetGroup}>}}' to 'awsx:ecs:FargateServiceTaskDefinition':
container: Cannot assign '{cpu: number, image: string, memory: number, portMappings: List<{containerPort: number, targetGroup: aws:lb/targetGroup:TargetGroup}>}' to 'awsx:ecs:TaskDefinitionContainerDefinition':
name: Missing required property 'name'
Resources:
+ 1 to create
Per conversation with @Frassle looking into pinning provider versions in each individual test using this method from https://www.pulumi.com/docs/languages-sdks/yaml/yaml-language-reference/
resources:
something:
type: aws:s3:Bucket
properties:
...
options:
version: 5.6.0
One more problem here, reusing PulumiPulumiProgramTests from pkg/codegen/testing/test is no longer working since https://github.com/pulumi/pulumi/pull/15549 because it generates relative links that no longer resolve.
To take full advantage of https://github.com/pulumi/pulumi/pull/15526 this codebase need to depend on a later version of pulumi/pkg. Should be hopefully a routine dependency update.