Skip to content

[Release notes] Product scoped amend and rebuilt registry - #4122

Open
lcawl wants to merge 5 commits into
changelog-note-registry-fixesfrom
changelog-note-registry-fixes-2
Open

lcawl wants to merge 5 commits into
changelog-note-registry-fixesfrom
changelog-note-registry-fixes-2

Conversation

@lcawl

@lcawl lcawl commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

NoteAmend is scoped to products in the notes map and those products get a registry plus shallow rebuild.
This PR is the third phase of fixes for changelog note registry issues.

Background

Relates to #4090, #4103

Per #4103 (comment), since the related issues touch the same areas of the code and have a significant, overlapping impact, this PR is part of a multi-PR phased approach.

Details

NoteAmend. It no longer lists every bundle/{product}/ prefix. It only processes products that appear in the product×version notes map, writes bundle_seq on product-scoped indexes, and still refreshes the legacy notes-{version}.json path list. Other products’ .amend-notes.yaml files are not deleted. ReconcileAsync returns products that had a sidecar write, skip-unchanged, or delete.

Scrubber. After notes work, each returned product runs BundleRegistryReconciler.ReconcileGroupAsync and is added to the bundle shallow map, using the same SQS message ids. A registry failure fails those notes messages.

Tests and docs. Isolation coverage is in NoteAmendReconcilerTests and ScrubberProcessorTests. cmd-note.md and changelog-bundle-registry.md describe the per-product sidecar and registry rebuild.

Screenshots

When I revert work-arounds (remove local copy of note amend bundles and change the directive to pull from CDN):

:::{changelog} cloud-enterprise
:config: /changelog.yml
:link-visibility: keep-links
:description-visibility: keep-descriptions
:highlights:
:::

...it's now successfully finding and rendering the cloud-4.2.0.amend-notes.yaml:

image

I do not know how to test the other S3 file handling changes until the stacked PRs are merged.

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

@github-actions

Copy link
Copy Markdown
Contributor

@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 due to a high-confidence correctness regression noted inline that can leave product registry state stale after partial failure/retry.


What is this? | From workflow: PR Review

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

@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 based on a high-confidence correctness regression noted inline.


What is this? | From workflow: PR Review

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

@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 due to a correctness issue called out inline.


What is this? | From workflow: PR Review

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

@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 due to a high-confidence correctness issue in the no-late-notes retry path that can leave stale amend sidecar/registry state.


What is this? | From workflow: PR Review

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

Comment thread src/services/Elastic.Changelog/Reconciliation/NoteAmendReconciler.cs Outdated

@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 due to a high-confidence correctness regression noted inline.


What is this? | From workflow: PR Review

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

if (write.Notes.Count == 0)
{
if (touchedProducts.Contains(write.Product))
await notesIndexReconciler.DeleteIndexAsync(indexKey, ct);

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.

[HIGH] Deleting the vanished product index before registry reconcile success can strand stale registry state

This delete happens inside NoteAmendReconciler.ReconcileAsync, before ScrubberProcessor runs ReconcileGroupAsync(bundleScope) for the touched product. If that later registry reconcile fails, the SQS message is retried — but this notes-{product}-{version}.json key is already gone, so NotesIndexReconciler.ReconcileRepoAsync no longer returns this vanished product/version and the product drops out of touchedProducts on retry.

That creates a concrete failure path where .amend-notes cleanup already happened but the product registry still references stale bundle state, with no deterministic future trigger to rebuild it.

Please defer deleting empty product-scoped notes indexes until after per-product registry reconcile succeeds (or persist a retry signal so retries still force registry reconcile for products already touched in a prior attempt).

This branch was successfully deployed

2 active deployments
docs-preview 84151333 Deployed Sep 16, 2026 by github-actions[bot]
assembler-preview 84151333 Deployed Sep 16, 2026 by github-actions[bot]
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