Conversation
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4122/ Sample changed pages: |
There was a problem hiding this comment.
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.
d656566 to
74e7c01
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
[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).
Summary
NoteAmendis 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, writesbundle_seqon product-scoped indexes, and still refreshes the legacynotes-{version}.jsonpath list. Other products’.amend-notes.yamlfiles are not deleted.ReconcileAsyncreturns products that had a sidecar write, skip-unchanged, or delete.Scrubber. After notes work, each returned product runs
BundleRegistryReconciler.ReconcileGroupAsyncand 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
NoteAmendReconcilerTestsandScrubberProcessorTests.cmd-note.mdandchangelog-bundle-registry.mddescribe 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:I do not know how to test the other S3 file handling changes until the stacked PRs are merged.
Generative AI disclosure
Tool(s) and model(s) used: Cursor Grok 4.6