Skip to content

feat(release): generate release data and release notes - #2529

Merged
mbrandenburger merged 3 commits into
hyperledger-labs:mainfrom
mbrandenburger:feat/2513-release-data
Nov 6, 2026
Merged

mbrandenburger merged 3 commits into
hyperledger-labs:mainfrom
mbrandenburger:feat/2513-release-data

Conversation

@mbrandenburger

@mbrandenburger mbrandenburger commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

scripts/release generates 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 a contract flag, the component ranges, dropped_next (empty for now), and tested_with: Go from go.mod, and Fabric, the Fabric-x committer and tools and Postgres from the Makefile pins. 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 is restore 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. check fails when a tagged release's data file differs from the file at its tag, or an untagged one differs from what data generates.

Other changes:

  • node version --json gains "contract" on every schema step.
  • scripts/release/refnode installs the Fabric-x SDK and reports every FSC store. TestRefnodeReportsEveryGoldenStore fails when a store with golden steps is missing from its report.
  • POSTGRES_VERSION ?= 16.2-alpine in the Makefile, used by the postgres target.

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 a skip-changelog release PR before tagging, so the tag contains them), docs/reference/node-cli.md (contract).

Closes #2513

Where this differs from the issue

  • The report command is refnode version --json. refnode node version --json, as the issue and Open release PRs and tag on merge #2514 write it, fails with unknown flag: --json.
  • Deferred to Backport fixes to release branches with Mergify #2515: bump --branch for release branches, patch notes and backfill. data refuses a patch version, since a patch has no upgrade guide of its own.
  • Dropped: make print-pins (the generator reads the Makefile pins with the same pattern as TestImagePins) and data --base (Mixed-version integration test and upgrade runbook #2459 adds rolls_over and tested_tag).
  • "Schema steps" compares with the golden .steps files 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 TestImagePins and make checks pass.
  • Previewed v0.28.0 end to end against the upstream tags and the changelog generate-notes returns: the modules match what tag-release.sh creates, the notes quote the v0.27-to-v0.28 intro and checklist with no relative link left, and list vault 2 and endorsetx 2 as restore from backup.

Notes for reviewers

  • check regenerates an untagged data file from the checked-out tree, so it fails once main moves 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.
  • The notes .md is not checked: its changelog comes from GitHub. Review it in the release PR.
  • The guide parser handles what the guides use today. It does not handle link titles, indented code fences or blockquotes.
  • Not breaking: node version --json gains a field. Panurus pins FSC v0.27.0 and uses its own version command.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Hey @mbrandenburger 👋 thanks for the PR!
I'm your friendly PR Helper Bot 🤖 and I'll be riding shotgun on this one, keeping track of your PR's status to help you get it approved and merged.

This comment updates automatically as you push changes -- think of it as your PR's live scoreboard!
Here's the latest:


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:

  • 61998cc feat(release): generate release data and release notes
  • c5d04bb fixup! feat(release): generate release data and release notes
  • 67ca67c fixup! feat(release): generate release data and release notes

You'll need to sign your commits with GPG (e.g. git commit -S). See the Signing Guide for a step-by-step walkthrough.


✅ 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!

@github-actions github-actions Bot added the status: needs revision The pull request requires changes from the author before it can be reviewed or merged label Nov 5, 2026
@mbrandenburger mbrandenburger added this to the 26Q4 milestone Nov 5, 2026

@SaidAltury-ibm SaidAltury-ibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thank you @mbrandenburger, i left a comment.

Comment thread scripts/release/main.go Outdated
return err
}
if !bytes.Equal(got, want) {
return errors.Errorf(`%s is not what "data" generates; regenerate it instead of editing it`, rel)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch! I've fixed that.

@adecaro
adecaro self-requested a review November 6, 2026 07:00

@adecaro adecaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>
@mergify

mergify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature status: needs revision The pull request requires changes from the author before it can be reviewed or merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate release data and release notes

3 participants