Skip to content

fix(changelog): groundwork for PR-anchored CDN sourcing - #3922

Merged
Mpdreamz merged 4 commits into
mainfrom
fix/changelog-branch-repository
Aug 25, 2026
Merged

fix(changelog): groundwork for PR-anchored CDN sourcing#3922
Mpdreamz merged 4 commits into
mainfrom
fix/changelog-branch-repository

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

Summary

Groundwork for replacing the retired pool registry (changelog/{org}/{repo}/{branch}/registry.json) with direct per-PR key probing. Three independent changes, all straight to main:

  • --files keyed GET (FetchNamedAsync): the --files CDN path now issues one direct GET per requested file name instead of fetching the pool registry first. A 404 is authoritative (not retried); 5xx uses the normal retry budget. This also fixes a real bug: a --files run could not see an entry the stale registry omitted.
  • CDN guard for --all / --input-products: these filters require pool enumeration (download everything, then filter in memory). With no pool index, they cannot work on CDN. Both now error immediately with a message pointing at --force-local.
  • filename: issue/timestamp retired (ChangelogConfigurationLoader, ChangelogFileWriter): these strategies are no longer supported. The default changes from Timestamp to Pr. A PR-less changelog add now errors and points at changelog note (the escape hatch being added in Stack A). --use-issue-number likewise errors.
  • Pool registry pass-through retired (ScrubberProcessor): a changelog/{org}/{repo}/{branch}/registry.json event from an old client is now dropped with a debug log instead of being mirrored to the public bucket. The pool index was removed in Retire the client-side changelog registry refresh #3760; no client writes it, so this event path was dead anyway.

Part of the broader fix for the reported regression where changelog bundle --prs against CDN finds no entries (tracked in elastic/docs-eng-team#734).

Test plan

  • All 937 unit tests pass (dotnet test tests/Elastic.Changelog.Tests/)
  • --files CDN path fetches entry directly, no registry GET
  • --all and --input-products error on CDN with pointer to --force-local
  • filename: timestamp and filename: issue each produce a tailored error
  • changelog add with no resolvable PR errors and names changelog note
  • Pool registry key events are ignored (not mirrored) by the scrubber

🤖 Generated with Claude Code

Mpdreamz and others added 3 commits August 25, 2026 12:57
…stamp

changelog entries are always keyed by PR number from now on.

- `filename: issue` and `filename: timestamp` in changelog.yml now emit
  errors pointing at `changelog note` for PR-less items
- Default flips from `Timestamp` to `Pr` (all seven onboarded repos
  already use PR-number file names)
- `--use-issue-number` CLI flag errors with a clear migration message;
  `--use-pr-number` remains but is now a no-op (always true)
- `ChangelogFileWriter.GenerateFilename` drops the issue and timestamp
  branches; a PR-less call with no resolvable PR number now errors
  instead of silently falling back to a timestamp slug
- Test fixtures updated: tests that exercised incidental filename
  generation now supply an explicit PR URL; config tests updated to
  reflect the new default and the new error cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ilently

The pool-tree index changelog/{org}/{repo}/{branch}/registry.json has
not been written by any client since #3760. Events for that key shape
are now dropped with a debug log rather than mirrored verbatim to the
public bucket. A stale create event from an old CLI version is harmless;
no delete propagation is needed either, since nothing reads these keys.

Bundle registry events (bundle/{product}/registry.json) continue to
schedule a group reconcile as before — they are reconciler-owned and
this change does not affect them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on CDN

Add FetchNamedAsync to CdnChangelogEntryFetcher for direct per-file GETs
without consulting the pool registry. A 404 is authoritative (not retried),
while 5xx/transport errors use the normal retry budget.

Switch the --files CDN path in ChangelogBundlingService to FetchNamedAsync,
fixing a regression where a --files run could not see entries omitted from the
stale pool registry.

Add a CDN guard that errors --all and --input-products with a message pointing
at --force-local, since those filters require pool enumeration which no longer
exists.

Update tests: CDN sourcing pool-selection tests now use --prs (registry still
fetched for that path); --files tests assert the direct entry URL rather than
the registry; MonthlyProfile fixture converted to use_local_changelogs since
product-filter CDN mode is now correctly blocked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner August 25, 2026 11:22
@Mpdreamz
Mpdreamz requested a review from reakaleek August 25, 2026 11:22
Comment thread src/services/Elastic.Changelog/Creation/ChangelogFileWriter.cs Outdated
- ChangelogFileWriter: GenerateFilename now returns null? on error and
  WriteChangelogAsync short-circuits before writing when no PR is derivable.
  Previously the placeholder 'changelog.yaml' was written unconditionally.

- CdnChangelogEntryFetcher.TryFetchNamedEntryAsync: permanent client errors
  (4xx other than 404) no longer consume the retry budget — they fail fast
  immediately. Only 5xx / transport errors retry as before.

- Update PrFetchFailureTests: issue-only+StrictFetch flow now returns false
  (no file written) because filename derivation requires a PR number.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Mpdreamz
Mpdreamz merged commit dd69c39 into main Aug 25, 2026
35 of 37 checks passed
@Mpdreamz
Mpdreamz deleted the fix/changelog-branch-repository branch August 25, 2026 13:48
Mpdreamz added a commit that referenced this pull request Aug 26, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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