Skip to content

feat(changelog): bundling resolves notes-{target}.json from CDN - #3929

Merged
Mpdreamz merged 2 commits into
mainfrom
fix/changelog-notes-bundling
Aug 26, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
fix/changelog-notes-bundling

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

Summary

  • Moves NotesIndex + NotesIndexJsonContext from Elastic.Changelog.Reconciliation to Elastic.Documentation.Configuration.ReleaseNotes so both the CDN fetcher and the Lambda reconciler share one definition
  • Adds CdnChangelogEntryFetcher.FetchNotesAsync: fetches changelog/{org}/{repo}/notes-{target}.json; 404 → empty list (no error); listed-but-absent note → hard error
  • ChangelogBundlingService.BundleChangelogs now fetches and merges note entries when useCdn is true and an explicit target is available from input.OutputProducts; dedup by checksum prevents duplicate entries

Test plan

  • 681 Elastic.Documentation.Configuration.Tests passing (includes 4 new FetchNotesAsync tests)
  • 952 Elastic.Changelog.Tests passing (reconciler still uses the moved type)
  • dotnet build -c Release — 0 errors
  • FetchNotesAsync_IndexAbsent_ReturnsEmptyWithNoError
  • FetchNotesAsync_HappyPath_FetchesAllListedNotes
  • FetchNotesAsync_ListedNoteNotFound_EmitsErrorAndReturnsEmpty
  • FetchNotesAsync_EmptyIndex_ReturnsEmpty

Stacks on fix/changelog-notes-reconciler (Step 5). Part of the two-anchor plan.

Known gap (Step 9): the PR-based CDN sourcing (FetchCdnEntriesAsync) still reads the pool registry that nothing writes post-#3760. Notes resolve correctly, but PR entries remain broken until Step 9 replaces the registry read with per-PR probing.

🤖 Generated with Claude Code

@Mpdreamz
Mpdreamz requested a review from a team as a code owner August 25, 2026 15:07
@Mpdreamz
Mpdreamz requested a review from reakaleek August 25, 2026 15:07

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes: notes target resolution is currently ambiguous for multi-target output and can silently produce incomplete bundles.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs Outdated
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-notes-bundling branch from aa0b140 to bd3c98b Compare August 26, 2026 07:30
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-notes-bundling branch from bd3c98b to 1327886 Compare August 26, 2026 07:56
Base automatically changed from fix/changelog-notes-reconciler to main August 26, 2026 08:09
Mpdreamz and others added 2 commits August 26, 2026 10:09
Moves NotesIndex + NotesIndexJsonContext to Elastic.Documentation.Configuration
so both the CDN entry fetcher and the Lambda reconciler share one type.

Adds CdnChangelogEntryFetcher.FetchNotesAsync: fetches the per-target notes
index (changelog/{org}/{repo}/notes-{target}.json), a missing index returns []
with no error, a listed-but-absent note is a hard error.

ChangelogBundlingService.BundleChangelogs now calls FetchCdnNotesAsync after
matching PR entries when useCdn is true and an explicit target is available
via input.OutputProducts. Notes are merged with checksum-based dedup and passed
to BuildAndWriteBundle alongside the PR-matched entries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…es complete for multi-target bundles

Replace ResolveNoteTarget (returns first match) with ResolveNoteTargets (returns all distinct
non-wildcard targets). MergeNotesAsync now fetches notes for every resolved target and merges
them with dedup-by-checksum, so a bundle over two output targets (e.g. 8.19.0 and 9.0.0)
fetches notes-8.19.0.json AND notes-9.0.0.json instead of silently dropping one.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-notes-bundling branch from 1327886 to be48672 Compare August 26, 2026 08:09
@Mpdreamz
Mpdreamz merged commit 578ff24 into main Aug 26, 2026
30 of 31 checks passed
@Mpdreamz
Mpdreamz deleted the fix/changelog-notes-bundling branch August 26, 2026 08:22
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