-
Notifications
You must be signed in to change notification settings - Fork 214
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
docs(MAINTAINERS): Cover pre-release generation #9235
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
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.
The shell changes look fine, but I haven't tried to replicate
) and use previous releases as a template. This uses the | ||
validator-oriented release description. | ||
) and use previous releases as a template. The release description should include the | ||
[_**validator oriented release description**_](#describe-the-release). | ||
|
||
### Cleanup |
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.
@mhofman Please pay particular attention to the changes in this section.
@mhofman I'm re-requesting review, because there have been substantial changes per our earlier discussion. |
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.
Thanks for improving these docs. I need to do another pass, and figure out what else I had missing in the draft.
|
||
To ease the maintenance process, we want to avoid any commit original to the release branch that has no direct equivalent on the `master` branch, except when needed to generate or test a specific release. To satisfy that, we usually directly cherry-pick commits and PRs from the `master` branch. We do not expect to merge the release branches back into `master`. | ||
|
||
To clearly delineate separate releases from each other on the release branch, we now use "dev release" branches to compile all changes going into a release before merging that branch into the release branch when the release is cut. It also allows us to re-scope a release if needed without having to revert commits on the release branch. |
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 know I wrote this originally, but I think the "no merge back" only applies for this long running release fork. I do expect that release branches in the future will be short lived, and merged back to master.
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 want this to document current practices rather than hopeful improvements. A great deal of changes will be required when we switch to that model.
MAINTAINERS.md
Outdated
- _**release label**_: This is used for the cosmos-sdk upgrade name and git tags, and is currently | ||
expected to follow a sequential pattern (example: `agoric-upgrade-8`). | ||
It is preceded by release candidates numbered from zero (example: `agoric-upgrade-8-rc0`), and the | ||
actual release shares its commit (but not its label) with the final release candidate. |
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.
Nit picking here, but the upgrade handler/plan name does not need to be exactly the "release label", and it actually isn't always the same since the plan name for the "test" network upgrades is not the same as rc git tags.
Maybe we should change one to make it clear git tags != plan name ?
MAINTAINERS.md
Outdated
|
||
- [ ] When a new release is planned, create a new branch from branch `release-mainnet1B` with a name like `dev-$releaseShortLabel` (example: `dev-upgrade-8`). This can be done from the command line or the [GitHub Branches UI](https://github.com/Agoric/agoric-sdk/branches). | ||
- [ ] Initialize the new branch for the planned upgrade: | ||
- [ ] In **golang/cosmos/app/app.go**, update the `upgradeName` constants and the associated upgrade handler function name to correspond with the [_**release label**_](#assign-release-parameters). |
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 think here we need to also remove any logic specific to the previous upgrade (e.g. core proposals)
MAINTAINERS.md
Outdated
- [ ] When a new release is planned, create a new branch from branch `release-mainnet1B` with a name like `dev-$releaseShortLabel` (example: `dev-upgrade-8`). This can be done from the command line or the [GitHub Branches UI](https://github.com/Agoric/agoric-sdk/branches). | ||
- [ ] Initialize the new branch for the planned upgrade: | ||
- [ ] In **golang/cosmos/app/app.go**, update the `upgradeName` constants and the associated upgrade handler function name to correspond with the [_**release label**_](#assign-release-parameters). | ||
- [ ] Ensure that **a3p-integration/package.json** has an object-valued `agoricSyntheticChain` property with `fromTag` set to the [agoric-3-proposals Docker images](https://github.com/Agoric/agoric-3-proposals/pkgs/container/agoric-3-proposals) tag associated with the previous release. |
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 think an example might help here use-upgrade-7
(if we keep using upgrade-8 as example)
MAINTAINERS.md
Outdated
- [ ] Ensure that **a3p-integration/package.json** has an object-valued `agoricSyntheticChain` property with `fromTag` set to the [agoric-3-proposals Docker images](https://github.com/Agoric/agoric-3-proposals/pkgs/container/agoric-3-proposals) tag associated with the previous release. | ||
- [ ] Ensure that **a3p-integration/proposals** contains a single subdirectory with the following characteristics | ||
- named like "$prefix:[_**release short label**_](#assign-release-parameters)" per [agoric-3-proposals: Naming](https://github.com/Agoric/agoric-3-proposals/pkgs/container/agoric-3-proposals#naming) (conventionally using "a" for the unreleased $prefix, e.g. `a:upgrade-8`) | ||
- containing a **package.json** having an object-valued `agoricProposal` property with `sdkImageTag` set to "unreleased" and `planName` set to the [_**release label**_](#assign-release-parameters) |
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.
planName
definitely needs to be the "upgrade plan name". The conflation with the git tag right now has been bother me.
```sh | ||
git config rerere.enabled true | ||
``` | ||
- [ ] Author a `rebase-todo` by selecting relevant changes from the `master` branch rebase log (see below). |
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 still owe the regex to build the todo log
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.
Here is how I've been generating the todo log:
- Switch to
master
branch git rebase -i --rebase-merges $LAST_COMMIT_IN_PREVIOUS_LOG
- Run the following substitution to "organize" the todo log
\n# Branch (.*)\nreset .*\n(merge -C .*\n)?((?:pick .*\(#\d+\)\n)*)(?:label branch-point.*\n)?((?:pick .*\n)*)(?:merge -C .*\n)?(?:label \1\n)
->$2\n$3\n# Branch $1\nlabel base-$1\n$4label $1\nreset base-$1\n
- Manually fix the last block
- Add comments for squashed PRs
- Copy the resulting todo
- Run the rebase and verify the commit graph does not change (aka that the re-organization didn't change anything)
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 useful for dev-upgrade-15?
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.
Hmm, I did not recognize your todo lists as derived from something produced by git and instead just manually based #9264 and #9266 on what you had done with upgrade-14 PRs like #8942. But even looking now, I don't think I understand where $LAST_COMMIT_IN_PREVIOUS_LOG
is coming from, or how those "reorganizations" would be applied. Is the latter scriptable in a way that could be explained and checked in?
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.
Is the latter scriptable in a way that could be explained and checked in?
A possibility: restructure blocks, then rename labels.
awk '
# Restructure branch-specific blocks from `git rebase -i --rebase-merges`
# so that `merge` commands appear at block end rather than block start.
NR == 1 && match($0, /^label /) {
# An initial `label` (but not a following no-op `reset`) belongs in the first block.
firstBlockPrefix = $0 "\n";
noopReset = "reset " substr($0, RLENGTH + 1, length($0) - RLENGTH);
next;
}
firstBlockPrefix != "" && $0 == noopReset {
next;
}
/^$|^# Branch .*/ {
# TODO: We may be able to find the PR number from a commit id or branch name.
sub(/Branch/, "PR #??? Branch");
blockHeader = blockHeader $0 "\n";
next;
}
!match($0, /^(reset|merge -C) /) {
printf "%s%s", blockHeader, firstBlockPrefix;
blockHeader = "";
firstBlockPrefix = "";
}
{
print;
}
END {
printf "%s%s", blockHeader, firstBlockPrefix;
}
' | awk '
# Rename each label that receives a `merge` to "base-$branchName".
function addLabel(label) {
if (++labels[label] == 1) return;
print "duplicate label: " label > "/dev/stderr";
exit 1;
}
match($0, /^$|^# .*[Bb]ranch /) {
branch = substr($0, RLENGTH + 1, length($0) - RLENGTH);
}
branch != "" && match($0, /^merge -C /) && match(prev, /^reset /) {
onto = substr(prev, RLENGTH + 1, length($0) - RLENGTH);
sub(/ .*/, "", onto);
newOnto = "base-" branch;
addLabel(newOnto);
renames[++renameCount] = onto SUBSEP newOnto;
}
/^label / {
addLabel(substr($0, RLENGTH + 1, length($0) - RLENGTH));
}
{
buf = buf $0 "\n";
prev = $0;
}
END {
# For "last-wins" semantics, apply renames in reverse order.
for (i = renameCount; split(renames[i], pair, SUBSEP); i--) {
for (j = split("label reset", rebaseCmds, " "); cmd = rebaseCmds[j]; j--) {
newBuf = "";
seekLine = sprintf("\n%s %s", cmd, pair[1]);
while (k = index(buf, seekLine)) {
len = length(seekLine);
r = sprintf("\n%s %s", cmd, pair[2]);
if (!match(substr(buf, k + len, 1), /[ \n]/)) r = seekLine;
newBuf = newBuf substr(buf, 1, k - 1) r;
buf = substr(buf, k + len, length(buf) - (k - 1) - len);
}
buf = newBuf buf;
}
}
printf "%s", buf;
}
'
MAINTAINERS.md
Outdated
- [ ] Open an [agoric-3-proposals](https://github.com/Agoric/agoric-3-proposals) PR to represent the mainnet proposal | ||
corresponding with the upgrade. Include in the proposal files tests copied from this release. | ||
|
||
- [ ] Open an [agoric-3-proposals](https://github.com/Agoric/agoric-3-proposals) PR to represent the mainnet proposal | ||
corresponding with the upgrade. Include tests copied from this repository in the proposal files. |
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 seems partially duplicated.
It's not just test files, but really the whole folder, including package.json.
MAINTAINERS.md
Outdated
- [ ] Review recent changes in the [_**base branch**_](#assign-release-parameters) for anything that | ||
should be merged into its ancestors, all the way up to `master`. This |
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 think we can remove this.
MAINTAINERS.md
Outdated
- [ ] Update the [_**base branch**_](#assign-release-parameters) **a3p-integration/proposals/*/package.json** | ||
`agoricProposal` `sdkImageTag` string contents to match the number from the | ||
["Generate new SDK version" step](#user-content-generate-sdk-version). |
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 unclear what to do with this edit, especially given the subsequent request to delete the checkout.
I think this section is better placed as a sub-bullet of copying over the test proposal to agoric-3-proposal, as one of the modifications to be made.
Other modifications:
- set the
releaseNotes
to the expected URL - generate the expected
upgradeInfo
from the script
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.
Done.
```sh | ||
git config rerere.enabled true | ||
``` | ||
- [ ] Author a `rebase-todo` by selecting relevant changes from the `master` branch rebase log (see below). |
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 useful for dev-upgrade-15?
- [ ] Review the [next release](https://github.com/Agoric/agoric-sdk/labels/next%20release) | ||
GitHub label for additional tasks particular to this release. |
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 think we no longer have this.
currently `chore(release): publish _release_label_`. Paste | ||
`have-news.md` as the description of the PR. Follow the example | ||
of previous releases for any other details of the PR. | ||
- [ ] Create the release PR: |
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.
In my release PRs I have been trying to include hidden in a details
tag, the formatted rebase todo of master
since the last release was cut, so we can more easily see which PRs were included, and which weren't, and in the future, just reformat since that point only to avoid duplicate work.
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.
Can you elaborate?
|
||
Creating this PR will also kick off the CI tests. | ||
Creating this PR will initiate the CI tests. |
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.
We should probably have the PR labelled force:integration
(at least until we have better CI logic to detect these kind of release PRs).
The idea is that integration tests should pass before we publish, which happens before we attempt to merge.
@@ -165,20 +256,22 @@ to pass. | |||
``` |
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.
Commenting here but it's about the section above. I believe publish to NPM should only happen after the publish PR is approved. I thought this was already in the Maintainers file, but it might only be in the run book.
33bd98f
to
676098a
Compare
closes: #9234
Description
Update MAINTAINERS.md and scripts/get-released-tags to be more descriptive about expected use.
Security Considerations
n/a
Scaling Considerations
n/a
Documentation Considerations
Included in code changes.
Testing Considerations
None.
Upgrade Considerations
Non-technical processes such as internal handoff are not included and are expected to remain in upgrade runbooks.