Repository navigation
feat(release): generate release data and release notes - #2529
Conversation
|
Hey @mbrandenburger 👋 thanks for the PR! This comment updates automatically as you push changes -- think of it as your PR's live scoreboard! PR Checks✅ DCO Sign-off -- All commits have valid sign-offs. Nice work! ❌ GPG Signature -- Heads up! The following commits don't have a verified GPG signature:
You'll need to sign your commits with GPG (e.g. ✅ Merge Conflicts -- No merge conflicts detected. Smooth sailing! ✅ Issue Link -- Linked to #2513 (assigned to you). ⏳ All checks must pass before this PR can be reviewed. You've got this! |
SaidAltury-ibm
left a comment
There was a problem hiding this comment.
thank you @mbrandenburger, i left a comment.
| return err | ||
| } | ||
| if !bytes.Equal(got, want) { | ||
| return errors.Errorf(`%s is not what "data" generates; regenerate it instead of editing it`, rel) |
There was a problem hiding this comment.
The behaviour here is right, but the message can mislead at exactly the wrong moment. I put a correct, unedited v0.28.0.json in place, then bumped a component range in preamble/ranges.go the way a normal PR would, and check failed with "is not what data generates; regenerate it instead of editing it".
Nobody edited the file. main just moved, which is the case you flag in the PR description. Mid-release, on a red check, that message sends the maintainer looking for an edit that never happened. Could it name the other cause too? Something like "…or main has changed since it was generated; regenerate it" would cover both.
There was a problem hiding this comment.
Good catch! I've fixed that.
adecaro
left a comment
There was a problem hiding this comment.
LGTM now that @SaidAltury-ibm 's point has been addressed.
scripts/release writes the release data file of a minor, docs/upgrade/releases/vX.Y.Z.json, and the body of its GitHub release, vX.Y.Z.md. The data lists the module tags, the upgrade mode and guide, every store's schema steps, the component ranges, and the versions the release was tested with: Go from go.mod, and Fabric, the Fabric-x committer and tools, and Postgres from the Makefile pins. The notes quote the upgrade guide's opening paragraphs and # Checklist section, with links resolved against the tag and paragraphs unwrapped. Tables follow for the tested versions, the schema steps added since the previous tag (a contract step is "restore from backup"), and the component ranges, then the generated changelog. The commands are bump (next minor), data, notes and check. check fails when a tagged release's data file differs from the file at its tag, or when an untagged one differs from what data generates. data refuses patch versions; release branches come later. node version --json gains "contract" on every schema step. The reference binary scripts/release/refnode installs the Fabric-x SDK, so its report covers every FSC store; a test fails when a store with golden steps is missing from it. The Makefile pins POSTGRES_VERSION. docs/dev/documentation.md states the upgrade-guide rule the notes rely on, docs/upgrade/releases/README.md describes the files and how to preview a release, and docs/dev/releasing.md commits the data and notes in a PR before tagging. Closes hyperledger-labs#2513 Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
c614762 to
67ca67c
Compare
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
scripts/releasegenerates the release data and the release notes of a minor, so a maintainer can preview a release by hand now, and the release workflows of #2514 can run the same commands.What a release gets:
docs/upgrade/releases/vX.Y.Z.json: the module tags, the upgrade mode (stop-all) and guide, every store's schema steps with acontractflag, the component ranges,dropped_next(empty for now), andtested_with: Go fromgo.mod, and Fabric, the Fabric-x committer and tools and Postgres from theMakefilepins. The monitoring and lint pins from test(integration): pin container images to exact refs #2528 stay out, since a node does not run against them.docs/upgrade/releases/vX.Y.Z.md: the upgrade guide's opening paragraphs and# Checklist, then tables for the tested versions, the schema steps added since the previous tag (a contract step's Rollback isrestore from backup), and the component ranges, then GitHub's generated changelog. Links in the quoted text point at the tag, and wrapped paragraphs are joined, since GitHub renders a newline in a release body as a line break.Commands:
bump(next minor),data,notes,check.checkfails when a tagged release's data file differs from the file at its tag, or an untagged one differs from whatdatagenerates.Other changes:
node version --jsongains"contract"on every schema step.scripts/release/refnodeinstalls the Fabric-x SDK and reports every FSC store.TestRefnodeReportsEveryGoldenStorefails when a store with golden steps is missing from its report.POSTGRES_VERSION ?= 16.2-alpinein theMakefile, used by thepostgrestarget.Docs:
docs/dev/documentation.md(the upgrade-guide rule the notes rely on),docs/upgrade/releases/README.md(the files and how to preview a release),docs/dev/releasing.md(merge the data and notes in askip-changelogrelease PR before tagging, so the tag contains them),docs/reference/node-cli.md(contract).Closes #2513
Where this differs from the issue
refnode version --json.refnode node version --json, as the issue and Open release PRs and tag on merge #2514 write it, fails withunknown flag: --json.bump --branchfor release branches, patch notes andbackfill.datarefuses a patch version, since a patch has no upgrade guide of its own.make print-pins(the generator reads theMakefilepins with the same pattern asTestImagePins) anddata --base(Mixed-version integration test and upgrade runbook #2459 addsrolls_overandtested_tag)..stepsfiles at the previous tag; a store with no file there lists all its steps. "Protocol versions" is the full component table.Verification
go test -race ./scripts/release/... ./node/version/...,go test -C integration ./nwo -run TestImagePinsandmake checkspass.generate-notesreturns: the modules match whattag-release.shcreates, the notes quote the v0.27-to-v0.28 intro and checklist with no relative link left, and listvault 2andendorsetx 2asrestore from backup.Notes for reviewers
checkregenerates an untagged data file from the checked-out tree, so it fails oncemainmoves on between merging a release PR and tagging it. Open release PRs and tag on merge #2514 should run it only in the release PR and after tagging..mdis not checked: its changelog comes from GitHub. Review it in the release PR.node version --jsongains a field. Panurus pins FSC v0.27.0 and uses its ownversioncommand.