changelog bundle-amend cli command

docs-builder changelog bundle-amend <bundle-path> [options]
		

Amend a bundle with additional or excluded changelog entries, or replace the bundle intro description, without modifying the parent bundle file. Amend bundles follow a specific naming convention: {parent-bundle-name}.amend-{N} plus the same .yaml or .yml extension as the parent, where {N} is a sequence number.

Note

The suffix .amend-notes (for example 9.3.0.amend-notes.yaml) is reserved for use by the changelog scrubber Lambda. The Lambda generates and manages these files automatically; you must not create, edit, or delete them manually.

Specify at least one of --add, --remove, --description, --description-file, or --clear-description.

<bundle-path> string required
Required: Local path to the parent bundle, or a CDN locator /bundle/{product}/{file}.yaml (leading slash optional; an absolute http(s) URL with that path is also accepted). Locator syntax takes precedence: prefix with ./ to force local resolution of a relative path that would otherwise match the locator shape. Local paths support tilde (~) expansion and must be a .yml/.yaml file that exists on disk.
--add string[]

Optional: Changelog YAML paths to add. Repeat --add or pass a comma-separated list in one value (for example, --add "file1.yaml,file2.yaml"). Supports tilde (~) expansion and relative paths. When entries are sourced from the CDN (the default when bundle.repo or the parent bundle's repo resolves), paths are matched by file name and do not need to exist locally; with local sourcing (--force-local or bundle.use_local_changelogs) the paths must exist on disk.

Repeatable: pass --add multiple times to supply more than one value

--remove string[]

Optional: Changelog YAML paths to exclude from the effective bundle. Repeat --remove or pass a comma-separated list in one value. Supports tilde (~) expansion and relative paths. When entries are sourced from the CDN, paths are matched by file name and do not need to exist locally; with local sourcing the paths must exist on disk unless --force is used to exclude by file name.

Repeatable: pass --remove multiple times to supply more than one value

--force

Optional: When removing, match by file name even if the bundle checksum differs from the sourced changelog, or when no YAML can be sourced (inferred git-ref entries).

Default: false

--force-local

Optional: Force local entry sourcing for this run (equivalent to bundle.use_local_changelogs: true without editing config).

Default: false

--dry-run

Optional: Preview changes without writing an amend file.

Default: false

--output string
Optional: Where to write the new sidecar when the parent is a CDN locator. A directory, or a .yaml/.yml path whose file name must be {parent}.amend-N plus the same extension as the parent for the next unused N. Falls back to bundle.output_directory in changelog.yml, then the current directory. Ignored for a local parent.
--description string
Optional: Replace the parent bundle's intro description. Supports {version}, {lifecycle}, {owner}, and {repo} from the parent products. Mutually exclusive with --description-file and --clear-description. May be used without --add/--remove.
--description-file string
Optional: Path to a UTF-8 file whose contents replace the parent intro, or - to read from stdin. Same placeholders as --description. Mutually exclusive with --description and --clear-description.
--clear-description

Optional: Remove the effective bundle intro. Mutually exclusive with --description and --description-file. May be used without --add/--remove.

Default: false

-l --log-level enum

Minimum log level.

Values: trace, debug, information, warning, error, critical, none

Default: information

-c --config-source enum

Override the configuration source: local, remote

Values: local, remote, embedded

--skip-private-repositories
Skip cloning private repositories
-l --log-level enum

Minimum log level.

Values: trace, debug, information, warning, error, critical, none

Default: information

-c --config-source enum

Override the configuration source: local, remote

Values: local, remote, embedded

--skip-private-repositories
Skip cloning private repositories

changelog bundle-amend only amends a released bundle. A bundle counts as released when it is listed in the product's published bundle registry (bundle/{product}/registry.json on the changelog CDN).

  • Unreleased bundle. For a local parent, the command reads the registry of each product in the parent bundle and fails when none lists the parent's file name. When some products list it and others do not, the command warns: the amend is uploaded to every product of the parent, so the others receive it without a published parent. To change an unreleased version, add or edit its changelog files; the release bundle picks them up. A CDN locator parent already comes from the registry.
  • Registry unavailable. The command fails when the registry cannot be read (a network error, an unsupported schema version, or a registry with a missing or invalid bundle list). It never assumes the bundle is released. A product that has no registry at all has no published bundles, so the bundle counts as unreleased. A sidecar download that times out is a failed download, and the command stops with a message that names the file.
  • Published amends. For a local parent, the command also downloads the amends that are already published for the bundle, from the same registry response that proves the release, in every product tree the amend is uploaded to. They count as part of the effective bundle for the duplicate check and for the next amend number, so a checkout that holds only the parent cannot repeat an entry or reuse a number that another product's tree already has. The command fails when a product's registry cannot be read, and when two trees hold a different amend under the same name.
  • Local amends. A local amend next to the parent must match the published amend of the same name. The comparison covers the products, the entries and exclusions (by file name and checksum) and whether the intro is set. It leaves out what the changelog scrubber rewrites in a published bundle, such as private PR and issue references and scrubbed text.
  • A history for each product. Each product the release covers has its own published amends, so the command keeps them apart. An entry that one product's amend removed is still in another's, so the duplicate check and --remove look at every product: an identical addition is a duplicate if any product still has the entry, and --remove still removes an entry from the products that have it. The next amend number is higher than any number in any product, also in a product that lists amends for the release without the release notes file itself, because the amend is published there too. The .amend-notes sidecar is built for each product on its own, so the command does not compare it between products.
  • Dry run. --dry-run runs the same checks.
  • Added entries. Each --add file must list the parent bundle's product and must not repeat the content of an entry that is already in the effective bundle, even under another file name. An entry that the same command removes does not count, so --remove old.yaml --add new.yaml renames an entry. It also passes the field checks that changelog validate applies, using the repository's changelog.yml when one is found. That includes the pr: field matching the PR number at the start of the file name, and every product being a known product. A note-* file is checked as a note: it lists at least one concrete release version in versions (a wildcard does not count) and has no PR number in its name.
  • Removing entries. --remove cannot take out an entry that exists only in the .amend-notes sidecar. The renderer applies that sidecar after the numbered amends, so the entry would stay; the command fails and says so.

Add a note to a version that has not shipped, or to one that has, with changelog note cli command. Notes need no amend.

To create a bundle, use changelog bundle cli command. For details and examples, go to Bundle changelogs. For changelog notes (note-*.yml) after a bundle has shipped, go to Bundle changelogs > Add or remove notes after a bundle ships.

Amend bundles contain the parent bundle's products plus only the changes for that amend file, not a full repetition of the original bundle's entries. A description-only amend may omit entries and exclude-entries.

The parent's complete products (including target, repo, and owner) are copied into every amend file so the amend is self-contained: upload destination discovery, the registry's per-product target, and :version:-filtered CDN consumption all derive from a bundle file's own products.

Like bundles, amend files embed the full changelog content of each entry: entries added with --add carry inline title, type, products, and so on, alongside a file block recording the source file name and checksum for provenance.

Additions:

# 9.3.0.amend-1.yaml
products:
- product: elasticsearch
  target: 9.3.0
  repo: elasticsearch
  owner: elastic
entries:
- file:
    name: late-addition.yaml
    checksum: abc123def456
  type: bug-fix
  title: A late addition
  products:
  - product: elasticsearch
    target: 9.3.0
		

Removals:

# 9.3.0.amend-2.yaml
products:
- product: elasticsearch
  target: 9.3.0
  repo: elasticsearch
  owner: elastic
exclude-entries:
- file:
    name: 138723.yaml
    checksum: def456abc123
		

An amend file can contain both exclude-entries and entries. Within each amend file, exclusions are applied before additions.

When bundles are loaded (either via the changelog render command or the {changelog} directive), amend files are automatically merged with their parent bundles in sequence (amend-1, amend-2, …, then .amend-notes when that sidecar is present). The result is rendered as a single release.

A numbered amend may also set description. When that field is present, it replaces the parent bundle's intro (empty description clears it). Numbered amends that omit description leave the current intro unchanged. The .amend-notes sidecar never changes the intro.

Note

Amend bundles created by older docs-builder versions may omit products; they are still accepted when loading and merge into their parent as before. hide-features is always inherited from the parent bundle. If an amend bundle is found without a matching parent bundle, it remains standalone.

rules.bundle filtering does not apply to changelog bundle-amend. The command is a direct-injection escape hatch: the files you specify with --add are always included regardless of any product, type, or area filter configuration.

--add and --remove use the same CDN-versus-local gate as changelog bundle cli command, except bundle-amend has no --directory or --repo flags: CDN by default when bundle.repo or the parent bundle's repo resolves; local disk when --force-local or bundle.use_local_changelogs is set, or when no authoring repo can be resolved. In CDN mode, only the file name is used (including CDN paths such as /changelog/elastic/kibana/main/247279.yaml). The GET uses the resolved authoring org/repo/branch from changelog.yml or the parent bundle, not the org/repo/branch segments in the path you pass. Use --force-local to read local changelogs from disk.

The parent may be a local bundle file or a published CDN locator (/bundle/{product}/{file}.yaml, leading slash optional). A local parent writes {parent}.amend-N next to that file, using the parent's .yaml or .yml extension. A CDN parent fetches the published bundle and any existing amend-N sidecars, then writes only the new sidecar locally — it does not download-and-rewrite the parent, and it does not upload. --output (a directory, or the exact {parent}.amend-N name with the same extension as the parent for the next unused N) selects the write location for a CDN parent; when omitted, the command uses bundle.output_directory from changelog.yml, then the current directory. --output is ignored for a local parent.

Locator syntax is checked before local file existence, so a relative path such as bundle/{product}/{file}.yaml always resolves as a CDN locator even if a local file happens to exist at that same relative path. Prefix a local path with ./ to force local resolution in that case.

Pass a CDN locator as the parent. --add can be a CDN entry path (matched by file name) when entry sourcing uses the CDN:

docs-builder changelog bundle-amend \
  /bundle/kibana/9.3.0.yaml \
  --add /changelog/elastic/kibana/main/138723.yaml \
  --output ./docs/releases
		

This writes 9.3.0.amend-1.yaml (or the next unused N) under ./docs/releases and says so:

Created 9.3.0.amend-1.yaml (adds 1, removes 0). Commit it in a pull request. With the release notes workflow it's published when the PR merges; otherwise upload it with the changelog upload command.
		

Commit the file in a pull request. With the release notes workflow, the amend is validated on the PR and published when the PR merges. Without it, upload the file like any other bundle YAML:

docs-builder changelog upload \
  --artifact-type bundle \
  --directory ./docs/releases \
  --target s3 \
  --s3-bucket-name my-changelog-bundles
		

The first argument is the local parent bundle. --add can be a CDN path (matched by file name) when entry sourcing uses the CDN:

docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --add /changelog/elastic/kibana/main/138723.yaml
		
docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --add ./docs/changelog/138723.yaml \
  --force-local
		
docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --remove /changelog/elastic/kibana/main/138723.yaml
		

The CLI computes the checksum of the sourced YAML and matches it against the effective bundle (parent plus any existing amend files). If the bundle contains the file with a different checksum, or no YAML can be sourced (for example a git-ref entry that exists only in the bundle), the command fails unless you pass --force to remove by file name only. The same applies when products hold different versions of the file and the one you give is only one of them: pass --force to remove every version, so none stays in a product's release notes. A local .amend-notes copy next to the parent is not read when the published release notes list the sidecar of each product.

--remove works the same for a changelog note (note-*.yml). That does not unpublish the pool file. For late notes and the scrubber-owned .amend-notes sidecar, refer to Bundle changelogs > Add or remove notes after a bundle ships.

docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --remove /changelog/elastic/kibana/main/note-known-issue-aggregations.yml
		

Comma-separated list:

docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --add "./docs/changelog/138723.yaml,./docs/changelog/1770424335.yaml" \
  --force-local
		

Or repeat --add:

docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --add ./docs/changelog/138723.yaml \
  --add ./docs/changelog/1770424335.yaml \
  --force-local
		
docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --remove "./docs/changelog/old-a.yaml,./docs/changelog/old-b.yaml" \
  --force-local
		

Replace an entry in one amend file

docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --remove ./docs/changelog/old-entry.yaml \
  --add ./docs/changelog/new-entry.yaml \
  --force-local
		
docs-builder changelog bundle-amend \
  ./docs/changelog/bundles/9.3.0.yaml \
  --remove /changelog/elastic/kibana/main/138723.yaml \
  --dry-run
		

Use this when the release intro (upstream dependency lists, blog links, and similar Markdown) is ready after the bundle already exists. You do not need --add or --remove.

docs-builder changelog bundle-amend \
  ./docs/releases/1.12.0.yaml \
  --description-file .ci/changelog-bundle-description.md
		

Placeholders {version}, {lifecycle}, {owner}, and {repo} are substituted from the parent bundle's products.

--description passes the Markdown inline. --clear-description removes the effective intro. The three options are mutually exclusive.

After upload, {changelog} and changelog render use the last numbered amend that sets description.