Skip to content

Update changelog bundle-amend command to support CDN changelogs - #3907

Merged
Mpdreamz merged 2 commits into
mainfrom
bundle-amend-cdn
Aug 27, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
bundle-amend-cdn

Conversation

@lcawl

@lcawl lcawl commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Enhance the --add and --remove options in the docs-builder changelog bundle-amend command so they work with files in S3/CDN not just local files.

Background

changelog bundle already treats the CDN as the source of truth for changelog YAML when bundle.repo resolves. --files accepts CDN paths (or any path reduced to a basename) and does not require those files on disk. That matches how teams are expected to work: upload entries, bundle from the pool, then delete local YAML (changelog remove) because bundles are self-contained.

changelog bundle-amend never joined that model. --add and --remove call File.Exists and read disk only. There is no CDN fetch and no --force-local. The result is a broken post-publish workflow for the common case:

  • Remove an entry from an existing bundle when the changelog lives only on the CDN (or was already cleaned up locally). Today you must invent a dummy file whose name matches file.name. The dummy’s checksum will not match, so you also need --force. That is ceremony, not provenance: --force already means “match by name.”
  • Add a changelog that exists only on the CDN (uploaded, never checked out, or private-repo copy that exists in S3 with scrubbed public PR/issue refs). --add cannot embed that YAML unless you download it by hand first. bundle --files already solves this for new bundles; amend cannot fix a published bundle the same way.

Implementation details

changelog bundle-amend now uses the same CDN vs local sourcing gate as changelog bundle --files. The changelog-tool skill is unchanged, and nothing was committed.

Behavior

  • CDN by default when bundle.repo or the parent bundle’s repo resolves.
  • --add / --remove match by file name (CDN paths like /changelog/elastic/kibana/main/247279.yaml work; no local file required).
  • --force-local (and bundle.use_local_changelogs) still reads disk.
  • --force --remove 300.yaml excludes inferred git-ref entries without a dummy file.
  • CdnChangelogEntryFetcher.FetchNamedAsync downloads only the requested names.

docs-actions: no bundle-amend usage; no changes there.

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No
  1. If you answered "Yes" to the previous question, please specify the tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used: Cursor Grok 4.6

@lcawl
lcawl marked this pull request as ready for review August 21, 2026 13:20
@lcawl
lcawl requested review from a team as code owners August 21, 2026 13:20
@lcawl
lcawl requested a review from reakaleek August 21, 2026 13:20
@lcawl lcawl changed the title Add support for CDN files to the changelog bundle-amend command Update changelog bundle-amend command to support CDN changelogs Aug 26, 2026
@lcawl
lcawl force-pushed the bundle-amend-cdn branch from a8d11c7 to 93963b3 Compare August 27, 2026 00:00
@lcawl
lcawl requested a review from Mpdreamz August 27, 2026 00:05

@Mpdreamz Mpdreamz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed manually (AI bot review is blocked today by the daily AI-credits guardrail). Verified: builds clean, dotnet test tests/Elastic.Changelog.Tests passes (1043/1043), CDN vs local sourcing gate is shared via the new ChangelogEntrySourcing helper, and the add/remove/force/force-local paths are covered by new tests including CDN-miss, checksum-mismatch, and force-local isolation cases.

@Mpdreamz
Mpdreamz merged commit b2d1d40 into main Aug 27, 2026
31 of 32 checks passed
@Mpdreamz
Mpdreamz deleted the bundle-amend-cdn branch August 27, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants