Skip to content

changelog: source bundle entries from the CDN with a per-product registry#3470

Open
cotti wants to merge 1 commit into
changelog_directive_s3from
changelog_bundle_s3_source
Open

changelog: source bundle entries from the CDN with a per-product registry#3470
cotti wants to merge 1 commit into
changelog_directive_s3from
changelog_bundle_s3_source

Conversation

@cotti
Copy link
Copy Markdown
Contributor

@cotti cotti commented Jun 5, 2026

Note

Stacked on changelog_directive_s3. Base this against that branch and merge it first; the diff shown here is only this change.

Summary

Source the individual changelog entries that make up a bundle from the public CDN by default (scoped to the bundle's product), instead of the local docs/changelog/ folder. This makes bundles reflect what was actually published to S3 — i.e. with private references scrubbed — and decouples bundle creation from a checkout that happens to hold every entry.

The bundle filter is content-based: whether an entry belongs in a bundle depends on the products / prs / issues fields inside the YAML, not on the file name. CloudFront has no ListObjects, so we publish a small per-product index on upload and the client enumerates → fetches → filters.

What changed

  • Per-product entry registry: upload now writes {product}/changelog/registry.json alongside the existing bundle registry (RegistryBuilder / RegistryKey); the scrubber key allow-list recognizes it.
  • CDN entry sourcing: new CdnChangelogEntryFetcher downloads the entry index and each entry; CDN base resolution is centralized in ChangelogCdn (shared with the changelog directive's cdn: mode).
  • Opt-out + safe fallback: bundle.use_local_changelogs: true forces the local folder, and we fall back to local automatically when no concrete product can scope the per-product CDN fetch.
  • --plan cdn_url: changelog bundle --plan now emits cdn_url ({base}/{product}/bundle/{file}) so CI can poll for the scrubbed bundle. docs/cli-schema.json regenerated.
  • No silent gaps: a registry-listed entry that hasn't propagated to the CDN yet is retried with short backoff + cache-busting (defeats a CloudFront-cached 404); a persistent miss fails the bundle rather than shipping an incomplete release.

Verification

  • dotnet format --verify-no-changes: clean
  • dotnet publish -c Release (docs-builder): 0 trim/AOT warnings
  • Elastic.Documentation.Configuration.Tests (409/409) and Elastic.Changelog.Tests (732/732): pass
  • cli-schema.json matches -- __schema output

Test plan

  • upload publishes {product}/changelog/registry.json and individual entries
  • bundle (default) fetches scrubbed entries from the CDN and applies the content filter
  • bundle with use_local_changelogs: true uses the local folder
  • bundle --plan surfaces a correct cdn_url
  • A not-yet-propagated entry recovers via retry; a persistently missing entry fails the run

Made with Cursor

…stry

Source the individual changelog entries that make up a bundle from the
public CDN by default, scoped to the bundle's product(s), instead of the
local folder. Because the bundle filter is content-based (an entry's
products/prs/issues live inside the YAML, not its name) and CloudFront has
no ListObjects, a per-product entry index ({product}/changelog/registry.json)
is published on upload so the client can enumerate then fetch+filter.

- Add bundle.use_local_changelogs opt-out, plus automatic local fallback
  when no concrete product can scope the per-product CDN fetch.
- Extend RegistryBuilder/RegistryKey to write and pass-through the entry
  index (scrubber recognizes {product}/changelog/registry.json).
- Add CdnChangelogEntryFetcher and centralize CDN base resolution in
  ChangelogCdn (shared with the changelog directive's cdn: mode).
- Emit cdn_url from `changelog bundle --plan` so CI can poll for the
  scrubbed bundle ({base}/{product}/bundle/{file}).
- Harden entry sourcing: a registry-listed entry that has not yet
  propagated to the CDN is retried with short backoff and cache-busting;
  a persistent miss fails the bundle instead of silently shipping an
  incomplete release.

dotnet format, AOT publish (0 trim/AOT warnings), and the affected unit
tests all pass; cli-schema.json regenerated for the new --plan output.

Co-authored-by: Cursor <cursoragent@cursor.com>
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