Repository navigation
Conversation
A Go module release page carried only install commands and guest checksums: release-golang.yml wrote its notes from a template and never read languages/golang/CHANGELOG.md. rc.3's upgrade steps, which say that re-installing EQL v4 drops indexes and grants, reached nobody reading the release. A new `notes` job takes the version's `## [X.Y.Z]` section with scripts/go-release-notes.mjs and hands it to `publish`, which puts it above the install text. The script rewrites relative links to the file at the version's tag, since they resolve nowhere on a release page, and joins the CHANGELOG's soft-wrapped lines, since GitHub renders every newline in a release body as a line break. The notes come from their own job because `publish` holds contents: write and takes them as the release body. `build` runs third-party code after checkout; `notes` runs only checkout and a dependency-free Node script, so nothing in it could have written the text but the script. `publish` stays git and gh only, and receives the notes through the environment rather than interpolated into its script. `build` waits for `notes`, so a version with no CHANGELOG section, or an empty one, stops the release before the build rather than shipping a page with no notes, as rc.1 and rc.2 did.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true |
The test was formatted with Biome 2.5.3 from an older install; next pins ^2.5.15, whose formatter breaks the it.each call differently, and CI's code:check failed on it.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Go module release page on GitHub shows only the install commands and the checksums of the embedded WebAssembly (WASI) guests. The changes in the release, and any upgrade steps, live in
languages/golang/CHANGELOG.md, and the release workflow never reads it. Forv0.1.0-rc.3that meant the warning about re-installing the EQL SQL bundle (it drops indexes and database grants, which must be restored) never reached anyone reading the release.This PR makes
release-golang.ymlput the version's CHANGELOG section at the top of the release page. A version with no CHANGELOG section is refused before anything is built, so a release can't ship without notes.Changes
.github/workflows/release-golang.ymlnotesjob: checks out the commit, runsscripts/go-release-notes.mjs "$VERSION", and passes the result on as a job output. It holds no write token and runs nothing butactions/checkoutand that script.buildnowneeds: notes, so a missing section stops the run in seconds, before the build.publishtakes the notes through an environment variable,NOTES, never written into its script, and puts them above a new### Installheading followed by the existing install text.scripts/go-release-notes.mjs(new; Node built-ins only)## [<version>]section, matching the version exactly (rc.3 does not match rc.30), and refuses a missing or empty section.languages/golang/and would point nowhere on a release page./markdownAPI ingfmmode). Fenced code blocks, headings, tables and quotes are left as they are.scripts/__tests__/go-release-notes.test.mjs(new): the section parsing, link rewriting and line joining. Every version section in the real CHANGELOG produces notes with no relative link left. The workflow wiring is checked: no write permissions onnotes,buildandpublishwait on it, notes reachpublishonly through the environment, and nonoderuns inpublish. It also runs the realnotesstep in a scratch directory, for a version that has a section and for one that doesn't.AGENTS.md: the Go release paragraph says a version needs a CHANGELOG section before dispatch.Verification
vitest run --config scripts/vitest.config.mjs: 84 of 86 files pass, 1418 tests. The two failing files,bench-index-expressionsandcheck-auth-npm-changeset, could not load in my local setup, which borrowednode_modulesfrom amaininstall missing@changesets/parseand@cipherstash/eql; they don't touch these files. Ingo-release-artifact, 9 cases skip locally because they need bash 4 and GNU coreutils; that was already so before this PR.notesstep's output for0.1.0-rc.3was rendered through GitHub's/markdownAPI: no stray line breaks, the five headings, and the link resolves to the file on the tag. The same text is going on the rc.3 release page by hand.Related
Refs #1442, #1443
Review notes
publishholdscontents: writeand takes the notes as the release body, so they must come from something that ran no third-party code. That is why they come from a new job, not from a step inbuild. Step outputs can't be overwritten by later steps, butbuildruns cargo build scripts and the Go tests on the same runner afterwards, and the workflow's threat model treats that job as untrusted.publishstill runs onlygitandgh.publishreuses thenotesoutput. A re-run that finds the release already there still only replaces the attached files and leaves the notes as they are.