Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CTC check prior to tag promotion #322

Merged
merged 5 commits into from
Aug 19, 2024
Merged

Add CTC check prior to tag promotion #322

merged 5 commits into from
Aug 19, 2024

Conversation

joshwlewis
Copy link
Member

@joshwlewis joshwlewis commented Aug 19, 2024

This adds a CTC check prior to promoting to main tags e.g. from heroku/heroku:24.v133 to heroku/heroku:24. This should prevent releases during deployment moratoriums.

GUS-W-16376259.

@joshwlewis joshwlewis marked this pull request as ready for review August 19, 2024 18:41
@joshwlewis joshwlewis requested a review from a team as a code owner August 19, 2024 18:41
.github/workflows/ci.yml Outdated Show resolved Hide resolved
Co-authored-by: David Zülke <[email protected]>
@joshwlewis joshwlewis enabled auto-merge (squash) August 19, 2024 20:55
@joshwlewis joshwlewis merged commit 802e95d into main Aug 19, 2024
8 checks passed
@joshwlewis joshwlewis deleted the jwl/ctc-check branch August 19, 2024 20:59
steps:
- name: Obtain CTC Lock via TPS API
run: |
curl -sS -X PUT \
Copy link
Member

Choose a reason for hiding this comment

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

@joshwlewis This check currently won't actually block releases, since CTC uses non-HTTP-200 responses to denote blocking a lock (https://github.com/heroku/tps/blob/master/docs/ctc.md#responses), and Curl ignores these unless the --fail argument is used.

eg compare to the Cheverny implementation, which checks for HTTP 200/201:
https://github.com/heroku/cheverny/blob/f27b132b8b829b16d2161977f00316faf0f06520/lib/mediators/stack/ctc_checker.rb#L27

For bonus points, we should probably also use --fail-with-body rather than --fail, since the former will also print the API response message:
https://curl.se/docs/manpage.html#--fail-with-body

Copy link
Member

@edmorley edmorley Aug 27, 2024

Choose a reason for hiding this comment

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

For even more bonus points, perhaps we should also add --connect-timeout and --retry to reduce flakiness?

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.

3 participants