Skip to content

Conversation

cnunciato
Copy link
Contributor

@cnunciato cnunciato commented Oct 21, 2020

This change replaces Turnstyle with a simple script that does essentially the same thing, but logs a bit more and gives us additional control and debuggability. The inline comments explain how it works, but the gist is that it waits for any currently running workflow of the same type on the same branch to complete before exiting (allowing the workflow to continue). Applies only to the default branch, as before.

@cnunciato cnunciato force-pushed the cnunciato/replace-turnstyle branch 3 times, most recently from 6708eeb to cca5e5c Compare October 21, 2020 00:51
@cnunciato cnunciato requested a review from chrsmith October 21, 2020 00:54
@cnunciato cnunciato marked this pull request as ready for review October 21, 2020 00:54
@cnunciato cnunciato force-pushed the cnunciato/replace-turnstyle branch from cca5e5c to 294e51b Compare October 21, 2020 01:08
@github-actions
Copy link

Your site preview for commit 4f3556c is ready! 🎉

http://pulumi-docs-origin-pr-4410-4f3556c2.s3-website.us-west-2.amazonaws.com.

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack pulumi/www.pulumi.com/production was successful.

Resource Changes

    Name                  Type                                      Operation
~   cdn                   aws:cloudfront/distribution:Distribution  update
~   www.pulumi.com        aws:route53/record:Record                 update
*   origin-bucket-policy  aws:s3/bucketPolicy:BucketPolicy          replaced

@github-actions
Copy link

Your site preview for commit 21b5ebc is ready! 🎉

http://pulumi-docs-origin-pr-4410-21b5ebc0.s3-website.us-west-2.amazonaws.com.

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack pulumi/www.pulumi.com/production was successful.

Resource Changes

    Name                  Type                                      Operation
*   origin-bucket-policy  aws:s3/bucketPolicy:BucketPolicy          replaced
~   cdn                   aws:cloudfront/distribution:Distribution  update
~   www.pulumi.com        aws:route53/record:Record                 update

@github-actions
Copy link

Your site preview for commit cca5e5c is ready! 🎉

http://pulumi-docs-origin-pr-4410-cca5e5cd.s3-website.us-west-2.amazonaws.com.

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack pulumi/www.pulumi.com/production was successful.

Resource Changes

    Name                  Type                                      Operation
*   origin-bucket-policy  aws:s3/bucketPolicy:BucketPolicy          replaced
~   cdn                   aws:cloudfront/distribution:Distribution  update
~   www.pulumi.com        aws:route53/record:Record                 update

@github-actions
Copy link

Your site preview for commit 6708eeb is ready! 🎉

http://pulumi-docs-origin-pr-4410-6708eeba.s3-website.us-west-2.amazonaws.com.

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack pulumi/www.pulumi.com/production was successful.

Resource Changes

    Name                  Type                                      Operation
*   origin-bucket-policy  aws:s3/bucketPolicy:BucketPolicy          replaced
~   cdn                   aws:cloudfront/distribution:Distribution  update
~   www.pulumi.com        aws:route53/record:Record                 update

@github-actions
Copy link

Your site preview for commit 294e51b is ready! 🎉

http://pulumi-docs-origin-pr-4410-294e51b8.s3-website.us-west-2.amazonaws.com.

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack pulumi/www.pulumi.com/production was successful.

Resource Changes

    Name                  Type                                      Operation
*   origin-bucket-policy  aws:s3/bucketPolicy:BucketPolicy          replaced
~   cdn                   aws:cloudfront/distribution:Distribution  update
~   www.pulumi.com        aws:route53/record:Record                 update

@cnunciato cnunciato force-pushed the cnunciato/replace-turnstyle branch from 294e51b to 38618e8 Compare October 21, 2020 15:59
@cnunciato cnunciato force-pushed the cnunciato/replace-turnstyle branch from 38618e8 to 3334e0d Compare October 21, 2020 16:06
@github-actions
Copy link

Your site preview for commit 38618e8 is ready! 🎉

http://pulumi-docs-origin-pr-4410-38618e8d.s3-website.us-west-2.amazonaws.com.

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack pulumi/www.pulumi.com/production was successful.

Resource Changes

    Name                  Type                                      Operation
*   origin-bucket-policy  aws:s3/bucketPolicy:BucketPolicy          replaced
~   cdn                   aws:cloudfront/distribution:Distribution  update
~   www.pulumi.com        aws:route53/record:Record                 update

@github-actions
Copy link

Your site preview for commit 3334e0d is ready! 🎉

http://pulumi-docs-origin-pr-4410-3334e0de.s3-website.us-west-2.amazonaws.com.

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack pulumi/www.pulumi.com/production was successful.

Resource Changes

    Name                  Type                                      Operation
*   origin-bucket-policy  aws:s3/bucketPolicy:BucketPolicy          replaced
~   cdn                   aws:cloudfront/distribution:Distribution  update
~   www.pulumi.com        aws:route53/record:Record                 update

@cnunciato cnunciato requested a review from zchase October 21, 2020 21:54
Copy link
Contributor

@zchase zchase left a comment

Choose a reason for hiding this comment

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

LGTM 🎉 Just one question on error handling

}
}

waitForInProgressRuns();
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of adding a .then(...).catch(...) here? That way we can log when the waiting has completed and also catch any errors that could occur in the script.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah totally, we could to that -- but in this case, if the script fails, I want to fail the whole build (as that would mean something's wrong -- workflow not defined, various things we expect to "just be there"), so I'm deliberately not catching errors so they cause Node to exit non-zero and downstream jobs to be skipped.

@cnunciato cnunciato merged commit b80dfae into master Oct 21, 2020
@pulumi-bot pulumi-bot deleted the cnunciato/replace-turnstyle branch October 21, 2020 22:36
@github-actions
Copy link

Site previews for this pull request have been removed. ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants