Skip to content

changelog: restructure S3 layout to artifact-root - #3562

Merged
cotti merged 7 commits into
mainfrom
feature/folder_structure
Jul 3, 2026
Merged

cotti merged 7 commits into
mainfrom
feature/folder_structure

Conversation

@cotti

@cotti cotti commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Restructures the changelog/bundle S3 layout from product-first to artifact-root: bundles are product-scoped at bundle/{product}/{file}; changelog entries are stored once per authoring org/repo/branch at changelog/{org}/{repo}/{branch}/{file}. This decouples repository concerns (entries) from product concerns (bundles) and removes the developer-foreknowledge requirement for entry distribution.
  • Per-org + per-branch pools: entries are keyed by org, repo, and branch so changelogs from GitHub orgs other than elastic (e.g. acquired companies that keep their org) and from branches other than main stay isolated. The branch is stored verbatim, so a branch's / (feature/foo) and . (8.x) become real key segments (variable key depth).
  • Producer (changelog upload): entries keyed by org/repo/branch (--owner/--repo/--branch, falling back to bundle.owner/bundle.repo/git remote and the current checkout's branch), bundles keyed by product; scope-aware registry.json and RegistryKey.IsRegistry (changelog manifests require ≥3 {org}/{repo}/{branch} segments; bundles stay single-segment).
  • Consumers/bundling: CDN fetchers use the new paths (branch slashes preserved as real separators), entry sourcing reads the authoring pool with org defaulting to elastic and branch to main (overridable via bundle.owner/bundle.branch/--branch), and ResolveCdnBundleUrl -> bundle/{product}/{file}.
  • Scrubber Lambda: detect bundles by the bundle/ key prefix (the old /bundle/ substring check silently breaks under the new layout); registry pass-through accepts the deeper changelog/{org}/{repo}/{branch}/registry.json.
  • CLI: add --owner/--repo/--branch to changelog upload and --branch to changelog bundle; docs/cli-schema.json regenerated.
  • Tests + docs updated; new anonymized elastic/cloud-shaped profile fixture.

Part of the changelog folder restructure. Refs elastic/docs-eng-team#413. Companion PRs in elastic/docs-actions and elastic/docs-infra.

Important

Org CI consumes docs-builder via edge, so this propagates to all consumers on release — deploy the scrubber Lambda in lockstep. End-to-end CDN smoke (bundle-fetch / {changelog} cdn:) only validates after the first publish under the new layout.

Test plan

  • dotnet format clean
  • ./build.sh build --skip-dirty-check (lint + compile) clean
  • Native-AOT publish of the CLI (dotnet publish -c Release) — no trim/AOT warnings
  • Elastic.Changelog.Tests (786) and Elastic.Documentation.Configuration.Tests (417) green
  • docs/cli-schema.json stable vs. regenerated (CI schema check)

Made with Cursor

Move changelog/bundle S3 keys from product-first to artifact-root: bundles are
product-scoped under bundle/{product}/{file}; changelog entries are stored once
per authoring repo under changelog/{repo}/{file}. This decouples repository
concerns (entries) from product concerns (bundles) and removes the developer-
foreknowledge requirement for entry distribution.

- upload: entries -> changelog/{repo}/{file} (repo via --repo > bundle.repo > git
  remote); bundles -> bundle/{product}/{file}
- registries: bundle/{product}/registry.json and changelog/{repo}/registry.json;
  scope-aware grouping and RegistryKey.IsRegistry validation
- CDN consumers + bundling: repo-scoped entry sourcing, decoupled gate,
  ResolveCdnBundleUrl -> bundle/{product}/{file}
- scrubber Lambda: detect bundles by the bundle/ key prefix
- CLI: add --repo/--owner to `changelog upload`; regenerate cli-schema.json
- tests + docs updated; new cloud-shaped profile fixture

Refs elastic/docs-eng-team#413

Co-authored-by: Cursor <[email protected]>
@cotti
cotti requested review from a team as code owners June 24, 2026 16:29
@cotti
cotti requested a review from reakaleek June 24, 2026 16:29
@cotti
cotti temporarily deployed to integration-tests June 24, 2026 16:29 — with GitHub Actions Inactive
@cotti cotti added the feature label Jun 24, 2026
@cotti cotti self-assigned this Jun 24, 2026
@cotti cotti changed the title changelog: restructure S3 layout to artifact-root (Option AD) changelog: restructure S3 layout to artifact-root Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR changes changelog upload and bundle handling to use artifact-root S3 keys, adds repo/owner/branch scoping for changelog uploads and CDN sourcing, and updates registry validation and grouping to match the new layouts. It also adds bundle branch configuration, rewires CDN fetch paths for bundle and changelog entry sources, updates related CLI schema/docs, and refreshes tests for the new key and URL patterns.

Sequence Diagram(s)

sequenceDiagram
  participant ChangelogCommand
  participant ChangelogBundlingService
  participant CdnChangelogEntryFetcher
  participant CDN

  ChangelogCommand->>ChangelogBundlingService: Bundle(branch, repo, owner)
  ChangelogBundlingService->>ChangelogBundlingService: Resolve authoring repo/branch
  ChangelogBundlingService->>CdnChangelogEntryFetcher: FetchAsync(baseUri, org, repo, branch)
  CdnChangelogEntryFetcher->>CDN: GET /changelog/{org}/{repo}/{branch}/registry.json
  CDN-->>CdnChangelogEntryFetcher: registry + entry YAML
  CdnChangelogEntryFetcher-->>ChangelogBundlingService: bundled entries
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.51% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main S3 layout restructure to an artifact-root format.
Description check ✅ Passed The description is directly related and accurately covers the changelog and bundle layout changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feature/folder_structure

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/development/changelog-bundle-registry.md`:
- Around line 111-112: The producer details section is inconsistent after the
repo-scope update: the bullet that still says “for each product” needs to match
the new changelog-entry path model. Update the affected wording in
changelog-bundle-registry.md so the bullet in the producer details section
refers to repo-scoped entry registries instead of product-scoped processing,
keeping it consistent with the bundle/product and entry/repo grouping described
nearby.

In `@src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs`:
- Around line 787-797: Normalize merged bundle repo values before they are used
to build CDN keys in ChangelogBundlingService, not just owner/repo inputs.
Update NormalizeRepo so it also maps combined defaults like elasticsearch+kibana
to the repo segment expected by the repo-scoped CDN layout, and ensure
BundleChangelogs and PlanBundleAsync both use the normalized value when
composing changelog/…/registry.json paths. Keep the behavior for null, empty,
and simple repo names unchanged.

In `@src/services/Elastic.Changelog/Uploading/RegistryKey.cs`:
- Around line 18-21: The RegistryKey validation currently allows dots in both
bundle and changelog registry segments, but bundle product scopes must stay
limited to the bundle upload pattern. Update the matching logic in RegistryKey
so IsRegistry only accepts dot-containing names for the changelog/{repo} form,
while bundle/{product}/registry.json remains restricted to the existing bundle
character class. Keep the regex or segment checks aligned with the scrubber
behavior so unchanged JSON is only passed through for valid bundle or changelog
registry keys.

In `@src/tooling/docs-builder/Commands/ChangelogCommand.cs`:
- Around line 1659-1664: The repo resolution in ChangelogCommand is using the
process current directory, which can pick up the wrong remote when --config or
--directory targets another checkout. Update the logic around
GitRemoteConfigurationReader.TryReadOriginUrl, Paths.FindGitRoot, and
resolvedRepo to derive the git root from the upload source (configPath or upload
directory) first, and only fall back to Directory.GetCurrentDirectory() when no
source-specific root is available. Ensure the repo lookup still flows through
GitHubRemoteParser.TryParseGitHubComOwnerRepo and the existing
repoCli/bundleConfig fallback order.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5adba39d-1fdc-491f-ada6-5aefa9463e1b

📥 Commits

Reviewing files that changed from the base of the PR and between 2d8a676 and c0413cb.

📒 Files selected for processing (25)
  • docs/cli-schema.json
  • docs/cli/changelog/cmd-upload.md
  • docs/contribute/configure-changelogs-ref.md
  • docs/development/changelog-bundle-registry.md
  • src/Elastic.Documentation.Configuration/ReleaseNotes/CdnChangelogEntryFetcher.cs
  • src/Elastic.Documentation.Configuration/ReleaseNotes/CdnChangelogFetcher.cs
  • src/Elastic.Documentation.Configuration/ReleaseNotes/ChangelogRegistry.cs
  • src/Elastic.Markdown/Myst/Directives/Changelog/ChangelogBlock.cs
  • src/infra/docs-lambda-changelog-scrubber/Program.cs
  • src/infra/docs-lambda-changelog-scrubber/README.md
  • src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs
  • src/services/Elastic.Changelog/Uploading/ChangelogUploadService.cs
  • src/services/Elastic.Changelog/Uploading/Registry.cs
  • src/services/Elastic.Changelog/Uploading/RegistryBuilder.cs
  • src/services/Elastic.Changelog/Uploading/RegistryKey.cs
  • src/tooling/docs-builder/Commands/ChangelogCommand.cs
  • tests/Elastic.Changelog.Tests/Changelogs/BundleCdnSourcingTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/BundlePlanTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/CloudProfileFixtureTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/LinkAllowlistSanitizerTests.cs
  • tests/Elastic.Changelog.Tests/Uploading/ChangelogUploadServiceTests.cs
  • tests/Elastic.Changelog.Tests/Uploading/RegistryBuilderTests.cs
  • tests/Elastic.Changelog.Tests/Uploading/RegistryKeyTests.cs
  • tests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/CdnChangelogEntryFetcherTests.cs
  • tests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/CdnChangelogFetcherTests.cs

- RegistryKey: scope dot characters to changelog/{repo} segments; bundle product
  segments stay [a-zA-Z0-9_-]+ (matches producer validation), so the scrubber no
  longer passes through bundle/foo.bar/registry.json
- CLI upload: anchor the git-remote repo fallback to the --config/--directory
  source rather than the process cwd, so an out-of-tree config resolves the right origin
- docs: fix the producer-details bullet to describe repo-scoped entry registries
- condense private-method XML doc summaries to a single line

Skipped CodeRabbit's NormalizeRepo '+' suggestion: the config loader already
rejects '+' in bundle.repo, so merged values never reach key construction.

Refs elastic/docs-eng-team#413

Co-authored-by: Cursor <[email protected]>
@cotti
cotti temporarily deployed to integration-tests June 25, 2026 12:31 — with GitHub Actions Inactive
Per the docs-builder boolean-parameter rule, pass useLocalChangelogs/
explicitDirectory (ShouldSourceFromCdn) and allowDots (IsValidSegment) as
named arguments at their call sites.

Refs elastic/docs-eng-team#413

Co-authored-by: Cursor <[email protected]>
@cotti
cotti temporarily deployed to integration-tests June 25, 2026 13:57 — with GitHub Actions Inactive
Comment thread docs/cli/changelog/cmd-upload.md Resolved
Comment thread docs/cli/changelog/cmd-upload.md Resolved
Comment thread docs/cli/changelog/cmd-upload.md Resolved
Extends the artifact-root layout so changelog entries are stored at
changelog/{org}/{repo}/{branch}/{file} (and registry.json), keyed by the
authoring org, repo, and branch. This supports changelogs from GitHub orgs
other than elastic (e.g. acquired companies) and from branches other than
main. The branch is stored verbatim, so a branch's '/' (feature/foo) and
'.' (8.x) become real key segments. Bundles are unchanged.

- Producer: ChangelogUploadService validates org/repo/branch and builds the
  nested key; Owner/Branch added to the upload arguments.
- Registry: RegistryBuilder groups by the {org}/{repo}/{branch} prefix;
  RegistryKey.IsRegistry accepts >=3 changelog segments (bundle stays one).
- Consumer: CdnChangelogEntryFetcher takes org/repo/branch (slash-aware);
  ChangelogBundlingService resolves org (bundle.owner > elastic) and branch
  (bundle.branch > main) when sourcing from the CDN.
- Config/CLI: add bundle.branch and --branch to upload/bundle; producer
  branch falls back to the current checkout's branch.
- cli-schema.json regenerated; tests and docs updated.
@cotti
cotti requested a review from a team June 30, 2026 14:14

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/Elastic.Documentation.Configuration/ReleaseNotes/CdnChangelogEntryFetcher.cs`:
- Around line 260-266: Validate the branch path segments before the CDN URI is
built in PoolSegments and the CombineSegments call path. Since branch is config
input, reject empty segments and dot segments like "." and ".." before yielding
parts from branch.Split('/'), so new Uri(...) cannot normalize them into a
different changelog pool than intended. Keep the fix localized to
CdnChangelogEntryFetcher and its PoolSegments helper.

In `@src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs`:
- Around line 229-232: The repo owner prefix is being lost in the changelog
bundling flow, so non-default pools resolve to the wrong CDN path. Update the
logic around NormalizeRepo and the authoringOwner/authoringBranch setup in
ChangelogBundlingService so that if input.Owner is empty, the owner is derived
from the owner/repo prefix in input.Repo before falling back to DefaultOwner.
Keep ShouldSourceFromCdn using the normalized repo name, but ensure the resolved
owner used for CDN path construction matches the original repo owner segment
when present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8aebc6ba-b0b2-404d-8976-1e1bb227b946

📥 Commits

Reviewing files that changed from the base of the PR and between 820e382 and 741da09.

📒 Files selected for processing (22)
  • config/changelog.example.yml
  • docs/cli-schema.json
  • src/Elastic.Documentation.Configuration/Changelog/BundleConfiguration.cs
  • src/Elastic.Documentation.Configuration/Changelog/ChangelogConfigurationLoader.cs
  • src/Elastic.Documentation.Configuration/Changelog/ChangelogConfigurationYaml.cs
  • src/Elastic.Documentation.Configuration/ReleaseNotes/CdnChangelogEntryFetcher.cs
  • src/Elastic.Documentation.Configuration/ReleaseNotes/ChangelogRegistry.cs
  • src/infra/docs-lambda-changelog-scrubber/Program.cs
  • src/infra/docs-lambda-changelog-scrubber/README.md
  • src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs
  • src/services/Elastic.Changelog/Uploading/ChangelogUploadService.cs
  • src/services/Elastic.Changelog/Uploading/Registry.cs
  • src/services/Elastic.Changelog/Uploading/RegistryBuilder.cs
  • src/services/Elastic.Changelog/Uploading/RegistryKey.cs
  • src/tooling/docs-builder/Commands/ChangelogCommand.cs
  • tests/Elastic.Changelog.Tests/Changelogs/BundleCdnSourcingTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/CloudProfileFixtureTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/LinkAllowlistSanitizerTests.cs
  • tests/Elastic.Changelog.Tests/Uploading/ChangelogUploadServiceTests.cs
  • tests/Elastic.Changelog.Tests/Uploading/RegistryBuilderTests.cs
  • tests/Elastic.Changelog.Tests/Uploading/RegistryKeyTests.cs
  • tests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/CdnChangelogEntryFetcherTests.cs
✅ Files skipped from review due to trivial changes (5)
  • src/infra/docs-lambda-changelog-scrubber/Program.cs
  • tests/Elastic.Changelog.Tests/Changelogs/LinkAllowlistSanitizerTests.cs
  • src/Elastic.Documentation.Configuration/ReleaseNotes/ChangelogRegistry.cs
  • src/services/Elastic.Changelog/Uploading/Registry.cs
  • src/infra/docs-lambda-changelog-scrubber/README.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • tests/Elastic.Changelog.Tests/Uploading/RegistryKeyTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/CloudProfileFixtureTests.cs
  • src/services/Elastic.Changelog/Uploading/RegistryBuilder.cs
  • tests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/CdnChangelogEntryFetcherTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/BundleCdnSourcingTests.cs

Addresses review feedback on the changelog docs that still described the
repo-only entry layout. Updates cmd-upload, configure-changelogs-ref, and the
changelog-bundle-registry architecture page to changelog/{org}/{repo}/{branch}/...
(entries and the per-pool registry.json), documents owner/branch resolution and
the new bundle.branch config, and notes uploads can run from any branch.

Resolves the open question from review: the entry registry lives at the branch
level (changelog/{org}/{repo}/{branch}/registry.json), not repo-level.
@cotti

cotti commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @lcawl! Addressed your doc comments in 562bcab (on top of the new changelog/{org}/{repo}/{branch} work pushed earlier).

On your recurring open question — where the registry lives: we went with the per-branch form, so the registry is at changelog/{org}/{repo}/{branch}/registry.json (not repo-level). Rationale: entries are now keyed per branch (to support changelogs generated on branches other than main), so each branch needs its own index. The {org} segment was also added (alongside {branch}) to accommodate content from GitHub orgs other than elastic (e.g. an acquired company keeping its org).

All three reference docs (cmd-upload.md, configure-changelogs-ref.md, changelog-bundle-registry.md) now consistently use changelog/{org}/{repo}/{branch}/{file} and .../registry.json, plus the new bundle.branch config and --branch flag. Note bundles are unchanged (bundle/{product}/...) — one of the inline suggestions had bundle/{org}/{product}/{branch}/{file}, which I kept as bundle/{product}/{file} since the org/branch nesting applies to entries only.

Addresses CodeRabbit findings on the consumer-side org/repo/branch handling:

- CdnChangelogEntryFetcher now validates the org, repo, and each branch segment
  before building the CDN URI, rejecting empty/"."/".." segments so a malformed
  branch from config/CLI cannot normalize "../" into a different pool.
- ChangelogBundlingService derives the org from a combined owner/repo value
  (e.g. acme/widget -> acme) when no explicit owner is set, instead of dropping
  the prefix and defaulting to "elastic" — keeping the CDN pool path correct.

Skipped the suggestion to strip "+" in NormalizeRepo: bundle.repo with "+"
merged-repo syntax is already rejected at config load (ParseBundleConfiguration).

Adds tests for the unsafe-branch rejection and owner-from-combined-repo path.
@cotti

cotti commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the latest CodeRabbit review in a8aeb9f:

  • Branch segment validation (CdnChangelogEntryFetcher) — the consumer now validates org/repo and each /-delimited branch segment before building the CDN URI, rejecting empty/./.. so a malformed bundle.branch/--branch can't normalize ../ into a different pool. (The producer already validated these; this closes the consumer-side gap.)
  • Owner prefix loss (ChangelogBundlingService) — when --repo/bundle.repo is given in owner/repo form and no explicit owner is set, the org is now taken from the repo prefix (e.g. acme/widget → acme) instead of defaulting to elastic, so the CDN pool path stays correct.

Skipped (not valid against current code):

  • NormalizeRepo + elasticsearch+kibana — bundle.repo containing + is already rejected with a clear error at config load (ParseBundleConfiguration), so the merged-repo form never reaches NormalizeRepo.

Added tests for both fixes (unsafe-branch rejection; owner-from-combined-repo path). ./build.sh build clean, AOT publish clean, Elastic.Changelog.Tests (787) and Elastic.Documentation.Configuration.Tests (420) green, cli-schema.json unchanged.

# Conflicts:
#	src/tooling/docs-builder/Commands/ChangelogCommand.cs
@cotti
cotti temporarily deployed to integration-tests July 1, 2026 14:15 — with GitHub Actions Inactive

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/contribute/configure-changelogs-ref.md`:
- Around line 70-79: Clarify the CDN owner resolution text so it matches the
actual `changelog bundle` flow: the authoring org should be derived from the
resolved repo or git remote when `--owner`/`bundle.owner` is not provided, not
always default to `elastic`. Update the `changelog bundle` and CDN sourcing
description to reflect the same precedence as `changelog upload`, and make sure
the wording around `DOCS_BUILDER_CHANGELOG_CDN` and `registry.json` points to
the resolved authoring org/repo/branch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f8b20a87-cf2a-40ca-b0fe-e9842a7552c9

📥 Commits

Reviewing files that changed from the base of the PR and between 741da09 and 95b7756.

📒 Files selected for processing (10)
  • docs/cli-schema.json
  • docs/cli/changelog/cmd-upload.md
  • docs/contribute/configure-changelogs-ref.md
  • docs/development/changelog-bundle-registry.md
  • src/Elastic.Documentation.Configuration/ReleaseNotes/CdnChangelogEntryFetcher.cs
  • src/Elastic.Markdown/Myst/Directives/Changelog/ChangelogBlock.cs
  • src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs
  • src/tooling/docs-builder/Commands/ChangelogCommand.cs
  • tests/Elastic.Changelog.Tests/Changelogs/BundleCdnSourcingTests.cs
  • tests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/CdnChangelogEntryFetcherTests.cs
✅ Files skipped from review due to trivial changes (1)
  • src/Elastic.Markdown/Myst/Directives/Changelog/ChangelogBlock.cs
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/Elastic.Documentation.Configuration/ReleaseNotes/CdnChangelogEntryFetcher.cs
  • docs/cli/changelog/cmd-upload.md
  • tests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/CdnChangelogEntryFetcherTests.cs
  • src/tooling/docs-builder/Commands/ChangelogCommand.cs
  • src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs
  • docs/cli-schema.json
  • docs/development/changelog-bundle-registry.md

@Mpdreamz Mpdreamz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The artifact-root S3 layout looks solid — RegistryKey segment counting, org/repo/branch validation (rejecting ./../empty parts), and the scrubber's bundle/ vs changelog/ prefix check are all correctly handling branches with slashes (e.g. feature/foo). Cross-checked producer (upload) and consumer (CDN fetch/bundle) key construction — they agree.

One non-blocking item worth a look: ChangelogBundlingService.ResolveAuthoringOwner (src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs:819) splits a combined bundle.repo: "acme-corp/widget" to derive the owner when bundle.owner isn't set, but ChangelogCommand.ResolveUploadRepoOwnerBranch (src/tooling/docs-builder/Commands/ChangelogCommand.cs:1696) used for changelog upload doesn't do this split — it falls straight to the git remote owner instead. If a repo sets bundle.repo in owner/repo form without an explicit bundle.owner, upload and CDN-sourcing could resolve to different owners and the entry pools would never match. Probably a rare config shape, but worth aligning the two resolution paths in a follow-up.

Also flagging for a possible follow-up (not blocking): the bundle/{product}/... and changelog/{org}/{repo}/{branch}/... key shapes and their segment-validation rules are each independently hand-rolled in RegistryKey.cs, RegistryBuilder.cs, ChangelogUploadService.cs, and the CDN fetchers. Centralizing into shared builders on RegistryKey would reduce drift risk now that this is the canonical layout.

@cotti
cotti merged commit 6aa0052 into main Jul 3, 2026
25 checks passed
@cotti
cotti deleted the feature/folder_structure branch July 3, 2026 08:00

This branch was previously deployed

1 inactive deployment
integration-tests — 95b7756c Deployed Jul 1, 2026 by cotti via integration #7773
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.

3 participants