Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Fix example programs, bring the tests back to green #4159

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

cnunciato
Copy link
Contributor

@cnunciato cnunciato commented Apr 10, 2024

Makes some additional fixes for failures I noticed when running the tests for #4157.

Should make all the tests 🟢 again. (Also bumps all the Go programs by running make upgrade-programs.)

Fixes pulumi/docs#11463.
Fixes pulumi/docs#11483. (This has also been failing for several weeks.)

@pulumi-bot
Copy link
Collaborator

Your site preview for commit 4c69bac is ready! 🎉

http://pulumi-hugo-origin-pr-4159-4c69bac9.s3-website.us-west-2.amazonaws.com.

@cnunciato cnunciato force-pushed the cnunciato/fix-another-example branch from 4c69bac to b75b7e0 Compare April 10, 2024 00:11
@pulumi-bot
Copy link
Collaborator

Your site preview for commit b75b7e0 is ready! 🎉

http://pulumi-hugo-origin-pr-4159-b75b7e0c.s3-website.us-west-2.amazonaws.com.

@cnunciato cnunciato force-pushed the cnunciato/fix-another-example branch from b75b7e0 to 4a539d4 Compare April 10, 2024 00:16
@pulumi-bot
Copy link
Collaborator

Your site preview for commit 4a539d4 is ready! 🎉

http://pulumi-hugo-origin-pr-4159-4a539d43.s3-website.us-west-2.amazonaws.com.

@cnunciato cnunciato force-pushed the cnunciato/fix-another-example branch from 4a539d4 to 36abc83 Compare April 10, 2024 00:19
@pulumi-bot
Copy link
Collaborator

Your site preview for commit 36abc83 is ready! 🎉

http://pulumi-hugo-origin-pr-4159-36abc83f.s3-website.us-west-2.amazonaws.com.

@cnunciato cnunciato force-pushed the cnunciato/fix-another-example branch from 36abc83 to d1086cf Compare April 10, 2024 19:37
@pulumi-bot
Copy link
Collaborator

Your site preview for commit d1086cf is ready! 🎉

http://pulumi-hugo-origin-pr-4159-d1086cf0.s3-website.us-west-2.amazonaws.com.

continue
fi

# Optionally test only from the specified example forward by setting ONLY_TEST_FROM="<example-path>".
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor enhancement to make it easier to run the tests locally (so you don't have to sit through all of them again after making a fix).

"Resource": "%s/*"
}]
}""", arn));
var policyDocument = bucket.arn().applyValue(arn -> serializeJson(
Copy link
Contributor Author

@cnunciato cnunciato Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was necessary because Java 11 doesn't support multiline strings specified in this way. We use serializeJson elsewhere for this, so I went with that for consistency.

@pulumi-bot
Copy link
Collaborator

Your site preview for commit 0d97aca is ready! 🎉

http://pulumi-hugo-origin-pr-4159-0d97aca8.s3-website.us-west-2.amazonaws.com.

"Resource": f"{arn}/*"
}]
}))
s3_bucket_policy_document = s3_bucket.arn.apply(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in this file are just the result of running black on it.

- "s3:PutObjectAcl"
Resource:
Fn::Sub: "${myBucket.arn}/*"
fn::toJSON:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was failing as well on a YAML-related syntax error.

value: ${myBucket.id}
bucket_arn:
value: ${myBucket.arn}
bucket_name: ${myBucket.id}
Copy link
Contributor Author

@cnunciato cnunciato Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to export value wrappers here, so since the other examples don't use them, we can remove them.

@@ -1,5 +0,0 @@
module aws-simulated-server-interpolate-go
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing the script to fail because this example doesn't exist.

@cnunciato cnunciato requested review from sean1588, toriancrane and a team April 10, 2024 21:38
@cnunciato cnunciato marked this pull request as ready for review April 10, 2024 21:38
@cnunciato cnunciato changed the title Fix another example program Fix example programs, bring the tests back to green Apr 10, 2024
@pulumi-bot
Copy link
Collaborator

Your site preview for commit b9c29d4 is ready! 🎉

http://pulumi-hugo-origin-pr-4159-b9c29d45.s3-website.us-west-2.amazonaws.com.

Copy link
Contributor

@toriancrane toriancrane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@cnunciato cnunciato merged commit 15cb2b0 into master Apr 11, 2024
2 checks passed
@cnunciato cnunciato deleted the cnunciato/fix-another-example branch April 11, 2024 12:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflow failure: Scheduled Jobs: Upgrade Examples Workflow failure: Scheduled Jobs: Run Tests
3 participants