Skip to content

Make the serverless final slice and base branch per service - #4830

Merged
Mpdreamz merged 2 commits into
mainfrom
docs/builder-plan-onboarding-cloud
Nov 12, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
docs/builder-plan-onboarding-cloud

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

release serverless now reads the final production slice and the base branch from each service instead of two constants, so a service with other names can be added. Kibana and Elasticsearch keep their values and their output does not change.

Affects: Release notes, CLI

Prompt summary: Onboard Elastic Cloud Hosted as a serverless release notes target, the way Kibana and Elasticsearch already are. ECH names its final slice and its main branch differently, so the first step is to stop hard-coding them. This pull request is that step, with no change in behaviour.

Why

ServerlessPromotion hard-codes production-noncanary-ds-5 and main, and two slice-specific regexes match only that name. A service with a different final slice cannot be registered without editing shared code.

What

Final slice and base branch live on the service

ServerlessService gains FinalSlice and BaseBranch. Kibana and Elasticsearch register production-noncanary-ds-5 and main. The FinalSlice and BaseBranch constants are gone, and ServerlessReleaseCommand reads both from the service it resolved.

Exact slice matching

A promotion commit message lists its slices, for example production-noncanary-ds-4,production-noncanary-ds-5. One generated regex now reads that list, and the code compares each slice by exact name. A second generated regex reads versions.yaml lines and the code picks the one for the service's slice. Both stay AOT-safe.

Search options in one record

FindPreviousVersionAsync takes a PreviousVersionSearch record (final slice, current version, page limit) so the method stays within four parameters.

Verify

dotnet test --project tests/Elastic.Changelog.Tests --treenode-filter "/*/*/ServerlessPromotionTests/*"

The existing cases keep their expectations; only their calls pass the slice. Making IsFinalSlicePromotion accept ds-1 fails IsFinalSlicePromotion, as it should.

Stack: 1 of 2. Followed by #4831, which adds Elastic Cloud Hosted.

🤖 Generated with Claude Code

`release serverless` hard-coded `production-noncanary-ds-5` and `main`, so a
service with other names could not be added. Each service now carries its own
final slice and base branch, and the slice is matched by exact name instead of
a slice-specific regex. Kibana and Elasticsearch keep their current values, so
their output does not change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Every walk test passed ds-5, so they would still pass if the commit filter or the YAML lookup ignored the requested slice. The new test uses ds-1 with distinct ds-1 and ds-5 versions and checks the version found and the commits read.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

@Mpdreamz
Mpdreamz enabled auto-merge (squash) November 12, 2026 13:28
@Mpdreamz
Mpdreamz merged commit 37658a3 into main Nov 12, 2026
43 checks passed
@Mpdreamz
Mpdreamz deleted the docs/builder-plan-onboarding-cloud branch November 12, 2026 13:29
Mpdreamz added a commit that referenced this pull request Nov 12, 2026
Empty commit. #4830 was squash-merged, so this branch is rebased onto main and
needs a fresh run of the checks and the review bot.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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