Skip to content

Fix changelog note indexes so they're product-scoped #4103

Description

@lcawl

What happened?

Notes indexes are keyed by version only: changelog/{org}/{repo}/notes-{version}.json. Neither the object name nor the JSON body records which product the notes belong to.

For example, a cloud-enterprise 4.2.0 note uploaded with docs-builder changelog upload --artifact-type changelog produced:

{
  "schema_version": 1,
  "notes": [
    {
      "path": "master/note-the-list-of-supported-operating-systems-has-been-updated.yml",
      "bundle_seq": 2
    }
  ]
}

with filename notes-4.2.0.json. Expected: the index is scoped to the product (and version) declared on the note, e.g. notes-cloud-enterprise-4.2.0.json, with product / version in the body so a downloaded file is self-describing.

This is more than a naming issue. NotesIndexReconciler reads products[].product and products[].versions, then drops the product and unions version strings. NoteAmendReconciler then matches all notes for that version against every product that has a bundle at the same version. changelog bundle CDN note fetch does the same (notes-{version}.json; output products are collapsed to distinct versions).

The cloud repo authors several products (cloud-enterprise, cloud-hosted, cloud-serverless, cloud-kubernetes, …) that can share version or date slugs. An ECE-only 4.2.0 note can be treated as a late note for another product’s 4.2.0 bundle (wrong .amend-notes sidecar and bundle_seq).

How can we reproduce it?

  1. Author a note that applies to one product at a version another product in the same repo might also use:

    products:
    - product: cloud-enterprise
      versions:
      - 4.2.0
  2. Upload with docs-builder changelog upload --artifact-type changelog --target s3 ….

  3. Inspect the public notes index: changelog/{org}/{repo}/notes-4.2.0.json — no product in the key or payload.

  4. (Cross-product) Publish a bundle for a different product at 4.2.0 in the same repo. The ECE note is eligible for that product’s amend reconcile / CDN note merge.

A note that lists several products[] / versions should appear in one index per (product, version) pair; the YAML in the changelog pool stays a single file (same fan-out as multi-product bundles).

Version or commit

Current main (notes index layout from ChangelogKeys.NotesIndexKey / NotesIndexReconciler; not a one-off CLI regression).

Additional notes

I believe that this issue will implement changes that overlap with #4090 so the fixes will need to be coordinated

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions