-
Notifications
You must be signed in to change notification settings - Fork 205
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
rotate responsibility for release process #7011
Conversation
@@ -475,10 +475,11 @@ jobs: | |||
condition: not(eq(variables['skip-github'], 'TRUE')) | |||
- bash: | | |||
set -euo pipefail | |||
pr_handler=$(head -1 release/rotation | awk "${print $1}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step of the release process runs on the trigger commit on the master branch, so the release/rotation
file is the right one. (As opposed to many steps in the release process that checkout the target commit.)
b41b795
to
0a521a1
Compare
ci/cron/wednesday.yml
Outdated
-H "$AUTH" \ | ||
--silent \ | ||
--location \ | ||
-d "{\"title\": \"$title\", \"head\": \"$branch\", \"base\": \"master\", \"body\": \"$body\"}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're wary about special characters in the title or body, you could do something like this:
jq -n --arg branch "$branch" --arg title "$title" --arg body "$body" '{"title": $title, "head": $branch, "base": "master", "body": $body}' \
| curl ... -d @- https://...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know jq
had such a syntax. Thanks!
ci/cron/wednesday.yml
Outdated
local tmp | ||
tmp=$(mktemp) | ||
cp release/rotation $tmp | ||
cat <(tail -n +2 $tmp) <(head -1 $tmp) > release/rotation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to get cat
involved here.
cat <(tail -n +2 $tmp) <(head -1 $tmp) > release/rotation | |
(tail -n +2 $tmp; head -1 $tmp) > release/rotation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You always want to oust my cats. 😿
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let the cat sleep. It's had a hard day.
ci/cron/wednesday.yml
Outdated
--definition-name "digital-asset.daml" \ | ||
--org "https://dev.azure.com/digitalasset" \ | ||
--project daml | ||
echo $pr_number > $out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be used anywhere. I might be mistaken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used to get the PR number so we can assign the Standard-Change label to it, assign the release handler, and mention it in the second PR message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, it's unused in the second open_pr
, but not the first. Can I suggest making it an optional parameter, rather than calling mktemp
?
echo $pr_number > $out | |
if [[ -n "$out" ]]; then | |
echo $pr_number > $out | |
fi |
05f1041
to
2a7ba56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you very much! I’ll leave the Bash bikeshedding to @SamirTalwar 🙂
@@ -523,7 +524,14 @@ jobs: | |||
# using basic auth format: | |||
# https://username:password@github.com/:user/:repo.git | |||
# This series of pipes extracts the `username:password` part. | |||
AUTH="$(git config remote.origin.url | grep -o "://.*:.*@" | cut -c4- | rev | cut -c2- | rev)" | |||
# | |||
# It looks like in some cases the credentials get stored separately as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this always the case and we just didn’t hit it so far or did something change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. It's probably a git version change between our GCP-hosted nodes and the Azure ones.
Making it work for both seemed like less effort than trying to figure out when I should support which one.
This PR attempts to add some automation around assigning release management. The PR adds a file `release/rotation`; each week, the updated CI cron job will: - Open a PR for the new release [as current]. - Assign the first user in the file to that PR. - Add the Standard-Change label to the PR. - Start the build for that PR [as current]. - Open a new PR that rotates the `release/rotate` file, i.e. pushes back the first line to the end of the file. This PR also adds mentions of the "release handler" (the first line of `release/rotation`) to the various messages we send to Slack along the release process. The initial state of the `release/rotation` file has been created by listing all the volunteers (Language team, Application Runtime team, as well as @SamirTalwar-DA and @stefanobaghino-da) and piping the file through `shuf`. (Then I put myself at the top so I can hopefully iron out the issues with the first attempt.) CHANGELOG_BEGIN CHANGELOG_END
2a7ba56
to
9f4599d
Compare
Nice! Is there a way for people to know in advance about this? |
@stefanobaghino-da We just go through the file top to bottom so you can just look at the entries to see when you are up. |
How would I go about that? I don't know who was last. |
The file is rotated every week so the one at the top is always the next one. |
Ah, sorry. I discussed it in team meetings, but obviously that doesn't work for you and @SamirTalwar-DA. Happy to answer any further questions here, on Slack, or on a call, though the gist of it really is just that when it's your turn, you will be @-mentioned both in relevant PRs and relevant Slack messages. (That is, if it works as intended — it did not quite do so last week, but I tried to fix it, so maybe this week it will.) |
This PR attempts to add some automation around assigning release management. The PR adds a file
release/rotation
; each week, the updated CI cron job will:release/rotate
file, i.e. pushes back the first line to the end of the file.This PR also adds mentions of the "release handler" (the first line of
release/rotation
) to the various messages we send to Slack along the release process.The initial state of the
release/rotation
file has been created by listing all the volunteers (Language team, Application Runtime team, as well as @SamirTalwar-DA and @stefanobaghino-da) and piping the file throughshuf
. (Then I put myself at the top so I can hopefully iron out the issues with the first attempt.)CHANGELOG_BEGIN
CHANGELOG_END