Skip to content

Record a release with no notes instead of failing - #4866

Merged
Mpdreamz merged 5 commits into
mainfrom
docs/serverless-empty-release-ledger
Nov 16, 2026
Merged

Mpdreamz merged 5 commits into
mainfrom
docs/serverless-empty-release-ledger

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

release serverless now writes a bundle with no entries when a range has nothing to publish. A release with no notes stops failing the run and raising an alert, and it stays on record.

Affects: Release notes, CLI

Prompt summary: Let Elastic Cloud Hosted releases that only carry dependency bumps succeed. The release is tracked in the ledger, but the markdown render does not show it.

Why

The dry run of frontend-adminconsole over 2f4acb2be2a6..d3124c7dda83 failed with "No changelog entries could be resolved for commit range": the range holds five Renovate bumps and no user-facing pull request. ECH deploys this service often, so each such release would fail the run and alert #docs-alerts.

What

Empty releases are written, not failed

With the new WriteEmptyRange option, a range with no notes writes a bundle holding the profile's products, the release date and git_ref, and no entries. The same applies when the rules.bundle filter removes every entry. A pull request whose metadata could not be read is still an error in both cases, so a failed fetch is never recorded as a release with no notes. The DRA path keeps its OnEmptyRange behaviour.

release serverless turns it on

ServerlessReleaseCommand sets the option, so the existing bundle_path outputs always point at one file. This also applies to Kibana and Elasticsearch: an empty promotion now writes an empty bundle. docs/cli-schema.json regenerates with the new remarks.

Bundle names carry the promotion's short ref

Bundles were named {repo}-{product}-{date}, so a release with no notes could take the name of a bundle with notes published earlier on the same day, and publishing it would replace that bundle. release serverless now ends each file name with the 12-character short ref of the promotion (cloud-cloud-hosted-2026-11-16-d3124c7dda83.yaml), and the bundle_path outputs point at it. The review pull request in docs-internal-workflows already adds the same suffix, so published names do not change; the suffix now also holds for any other way of uploading the files.

The render stays quiet

The {changelog} directive already skips a bundle with no entries and no description. New tests lock that in for a bundle without an entries key, and for an empty bundle beside a bundle with notes that share its target, which renders as one section.

Verify

dotnet test --project tests/Elastic.Changelog.Tests --treenode-filter "/*/*/BundleGitRefTests/*"
dotnet test --project tests/Elastic.Markdown.Tests --treenode-filter "/*/*/ChangelogEmpty*/*"

GITHUB_TOKEN=$(gh auth token) dotnet run --project src/tooling/docs-builder -- release serverless frontend-adminconsole d3124c7dda83

The last command is read-only and writes bundles/cloud-cloud-hosted-<today>-d3124c7dda83.yaml with products, release-date and git_ref, and no entries. Making the incomplete-range guard always allow an empty release fails the unreadable-pull-request test.

🤖 Generated with Claude Code

`release serverless` failed on a range with no user-facing pull request, such as
a run of dependency bumps, and every such release raised an alert. It now writes
a bundle with the products, the release date and `git_ref` and no entries, so
the release stays on record. The `{changelog}` render already skips a bundle
with nothing to show.

Bundle names are `{repo}-{product}-{date}`, so a second release on the same day
would replace the first when published. When the published registry already
lists the bundle, the release is written as its next `.amend-N` sidecar. An
unreadable registry stops the run, so an outage never becomes an overwrite.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner November 16, 2026 12:32
@Mpdreamz
Mpdreamz requested a review from akira28 November 16, 2026 12:32
@Mpdreamz Mpdreamz added the bug label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Mpdreamz and others added 2 commits November 16, 2026 14:09
When the bundle rules removed every resolved entry, a range now wrote an empty
bundle even if the metadata of another pull request in the range could not be
read, so a failed fetch was recorded as a release with no notes. That case is an
error again. Tests cover the rule-filtered empty release, the same range
without the option, and the unreadable pull request.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The review pull request in docs-internal-workflows already adds the promotion's
short sha to every bundle file name, so two releases on one day publish as
separate files with the same target, and the site merges them into one section.
That also made the amend path unreachable: the registry never lists the bundle
under the unsuffixed name it looked for.

This removes the registry lookup, the amend writer and their tests, and adds a
render test for an empty bundle beside a bundle with notes that share a target.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Bundle files were named {repo}-{product}-{date}, so a release with no notes
could carry the name of a bundle with notes published earlier on the same day,
and publishing it would replace that bundle. `release serverless` now ends each
file name with the short ref of the promotion, as the review pull request already
does, so no two promotions share a name whoever uploads the files.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
When the requested bundle file already exists, the service writes the new bundle
to a timestamped name but told the caller the requested path. A caller that
renames the reported file then moved the older bundle and left the new one
behind. `release serverless` renames each bundle to carry the short ref of its
promotion, so it hit this. The service now reports the path it wrote.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz merged commit 238c823 into main Nov 16, 2026
43 checks passed
@Mpdreamz
Mpdreamz deleted the docs/serverless-empty-release-ledger branch November 16, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant