Skip to content

[Changelogs] Fix derived lifecycle for date-based bundles ("ga" instead of "preview") #3725

Description

@lcawl

Describe the bug

Problem

For standard (non-github_release) changelog bundle profiles, {lifecycle} in output_products / products / output is derived from the version argument via VersionLifecycleInference.InferLifecycle.

That works for semver (9.2.0ga, 9.2.0-beta.1beta). For ISO date targets used by serverless releases, it is wrong:

Argument Actual {lifecycle} Expected
2026-07-21 preview ga

Cause: InferLifecycle treats the first - as a semver prerelease delimiter. For 2026-07-21 it takes 07 as an unknown prerelease tag and falls through to preview.

Example profile that surfaces this:

serverless-release:
  output_products: "cloud-serverless {version} {lifecycle}"
  output: "cloud-serverless/kibana-{version}.yaml"
docs-builder changelog bundle serverless-release 2026-07-21 ./docs/temp/serverless-prs.txt

writes:

products:
- product: cloud-serverless
  target: 2026-07-21
  lifecycle: preview   # incorrect

This matches the documented contract (profile mode does not take a separate lifecycle CLI arg; {lifecycle} means “derive”). The bug is the derived value for dates, not that derivation exists.

Expected behavior

The default lifecycle for date-based releases should be "ga" same as for versioned releases like "9.2.0".
If non-GA releases are desired, that would need a separate profile with an explicit lifecycle, as is currently documented.

Steps to reproduce

The preview value exists in all recent Kibana Serverless release bundles, for example: elastic/kibana#280230

Tooling

  • docs-builder
  • migration tooling
  • I'm not sure

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions