Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds optional bundle-level Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as "CLI (changelog cmd)"
participant ConfigLoader as "Config Loader"
participant Bundler as "Bundling Service"
participant Renderer as "Rendering Service"
participant Formatter as "Formatter (Markdown/Asciidoc)"
User->>CLI: run changelog bundle --description "..."
CLI->>ConfigLoader: load bundle config (bundle + profiles)
ConfigLoader-->>CLI: parsed config (may include descriptions)
CLI->>Bundler: BundleChangelogs(input with Description)
Bundler->>Bundler: resolve description (CLI > profile > bundle)
Bundler->>Bundler: validate & substitute placeholders ({version},{lifecycle},{owner},{repo})
Bundler-->>Renderer: emit validated bundles with Description
Renderer->>Renderer: collect descriptions (single, none, or multi -> warn/skip)
Renderer->>Formatter: BuildRenderContext(description)
Formatter->>Formatter: render header then description then entries
Formatter-->>User: generated changelog output
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/tooling/docs-builder/Commands/ChangelogCommand.cs (2)
509-530:⚠️ Potential issue | 🟠 MajorReject
--descriptionin profile mode.Line 516 adds the new flag, but the profile-mode gate never adds it to
forbidden. That meansbundle <profile> ... --description ...is accepted and then dropped when profile/config description resolution runs, so the flag becomes a silent no-op instead of an error.Suggested fix
if (!string.IsNullOrWhiteSpace(directory)) forbidden.Add("--directory"); + if (!string.IsNullOrWhiteSpace(description)) + forbidden.Add("--description");Also applies to: 591-622
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/tooling/docs-builder/Commands/ChangelogCommand.cs` around lines 509 - 530, The Bundle command currently accepts the --description flag in profile mode but silently drops it during profile/config resolution; update the profile-mode gate in the Bundle method to reject/forbid the "description" flag by adding "description" to the forbidden list used when a profile (or profileArg/profileReport) is supplied so the CLI returns an error instead of silently ignoring the value; make the same change in the other profile-mode guard later in the method (the second forbidden-list block around the config/profile resolution logic) so both code paths consistently reject --description in profile mode.
791-820:⚠️ Potential issue | 🟠 MajorValidate the resolved description template, not just the CLI flag.
This guard misses
bundle.descriptionfromchangelog.yml, so option-based bundles can still bypass placeholder validation via config. It also rejects{owner}/{repo}-only descriptions even when--owner/--repoor config already make those values resolvable. The check should run against the final description after config defaults, and only require--output-productsfor{version}/{lifecycle}placeholders.src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs (1)
431-470:⚠️ Potential issue | 🟠 MajorProfile descriptions are substituted too early.
This expands
{version}/{lifecycle}/{owner}/{repo}fromfilterResultand config values before the finaloutputProductsand bundle-product fallbacks exist. A profile invoked with only a report plus staticoutput_productscan still renderunknownor empty values here, even though the common post-build path at Lines 352-367 could resolve them correctly. Keep the raw template here and let the shared substitution logic run once the bundle metadata is finalized.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/cli/changelog/bundle.md`:
- Around line 492-498: The example places profiles at the YAML root so the CLI
won't find them; move the profiles mapping under the bundle key (so the CLI
reads bundle.profiles) by nesting the existing "profiles:" block inside a
top-level "bundle:" mapping (preserving the same profile name
"elasticsearch-release" and fields like products, output_products, and
description) so the command can discover the profile.
---
Outside diff comments:
In `@src/tooling/docs-builder/Commands/ChangelogCommand.cs`:
- Around line 509-530: The Bundle command currently accepts the --description
flag in profile mode but silently drops it during profile/config resolution;
update the profile-mode gate in the Bundle method to reject/forbid the
"description" flag by adding "description" to the forbidden list used when a
profile (or profileArg/profileReport) is supplied so the CLI returns an error
instead of silently ignoring the value; make the same change in the other
profile-mode guard later in the method (the second forbidden-list block around
the config/profile resolution logic) so both code paths consistently reject
--description in profile mode.
🪄 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: Pro
Run ID: 56f0beb5-514c-4f2b-b8e0-cd55f8918ab5
📒 Files selected for processing (21)
config/changelog.example.ymldocs/cli/changelog/bundle.mddocs/cli/changelog/gh-release.mddocs/contribute/changelog.mddocs/syntax/changelog.mdsrc/Elastic.Documentation.Configuration/Changelog/BundleConfiguration.cssrc/Elastic.Documentation.Configuration/ReleaseNotes/Bundle.cssrc/Elastic.Documentation.Configuration/ReleaseNotes/BundleLoader.cssrc/Elastic.Documentation.Configuration/ReleaseNotes/ReleaseNotesSerialization.cssrc/Elastic.Documentation/ReleaseNotes/Bundle.cssrc/Elastic.Markdown/Myst/Directives/Changelog/ChangelogInlineRenderer.cssrc/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cssrc/services/Elastic.Changelog/Configuration/ChangelogConfigurationLoader.cssrc/services/Elastic.Changelog/GithubRelease/GitHubReleaseChangelogService.cssrc/services/Elastic.Changelog/Rendering/Asciidoc/ChangelogAsciidocRenderer.cssrc/services/Elastic.Changelog/Rendering/ChangelogRenderContext.cssrc/services/Elastic.Changelog/Rendering/ChangelogRenderingService.cssrc/services/Elastic.Changelog/Rendering/Markdown/IndexMarkdownRenderer.cssrc/services/Elastic.Changelog/Serialization/ChangelogConfigurationYaml.cssrc/tooling/docs-builder/Commands/ChangelogCommand.cstests/Elastic.Changelog.Tests/Changelogs/BundleLoading/BundleLoaderTests.cs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/contribute/changelog.md`:
- Around line 833-837: The docs overstate that option-based mode requires
`--output-products` for `{version}`/`{lifecycle}`; update the paragraph to match
actual behavior by changing the wording for option-based mode to state that if
`--output-products` is not provided the bundler will fall back to an empty
substitution (rather than failing), and keep the existing accurate guidance for
profile-based mode (mentioning `bundle profile` and `output_products`). Ensure
the text clearly references the placeholders `{version}` and `{lifecycle}`, the
flag `--output-products`, and the profile usage `bundle profile` so readers
understand the differing behaviors.
🪄 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: Pro
Run ID: a144fcbe-4797-4d58-a1bb-eb3bae592abe
📒 Files selected for processing (2)
docs/cli/changelog/bundle.mddocs/contribute/changelog.md
✅ Files skipped from review due to trivial changes (1)
- docs/cli/changelog/bundle.md
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/Elastic.Changelog.Tests/Changelogs/BundleChangelogsTests.cs`:
- Line 5973: Multiple tests in BundleChangelogsTests.cs share the literal Output
= "bundle.yaml" (and a reader that expects that path), causing cross-test
contamination under parallel runs; change the tests to generate a unique
per-test output path (e.g., use TestContext.TestName or Guid.NewGuid() to
compose a filename like $"bundle_{Guid...}.yaml") and update the places that
read the file to use that generated path (look for the Output property
assignments and the reader call that opens "bundle.yaml" in the same file and
replace the hard-coded string with the test-local variable).
🪄 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: Pro
Run ID: 8db6792c-b0a7-4b26-a5ce-80c1af81f212
📒 Files selected for processing (3)
src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cssrc/tooling/docs-builder/Commands/ChangelogCommand.cstests/Elastic.Changelog.Tests/Changelogs/BundleChangelogsTests.cs
✅ Files skipped from review due to trivial changes (1)
- src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs
🚧 Files skipped from review as they are similar to previous changes (1)
- src/tooling/docs-builder/Commands/ChangelogCommand.cs
tests/Elastic.Changelog.Tests/Changelogs/BundleChangelogsTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/tooling/docs-builder/Commands/ChangelogCommand.cs (1)
774-781:⚠️ Potential issue | 🟠 Major
--plancan falsely fail placeholder descriptionsLine 780 sets
Description, butplanInputdoes not includeOutputProducts. With placeholder validation ({version}, etc.),--plancan reject valid calls that already passed--output-products.Proposed fix
var planInput = new BundleChangelogsArguments { Output = processedOutput, Profile = profile, ProfileArgument = profileArg, Config = config, + OutputProducts = outputProducts, Description = description };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/tooling/docs-builder/Commands/ChangelogCommand.cs` around lines 774 - 781, The plan input for the --plan flow builds a BundleChangelogsArguments instance (planInput) but omits the OutputProducts property, so placeholder validation (e.g., {version}) can reject valid runs that provided --output-products; update the code that constructs planInput to copy the OutputProducts from the existing config/arguments (the same source used for processedOutput and profileArg) into planInput.OutputProducts so placeholder validation sees the same products as the real run, ensuring --plan mirrors --output-products behavior (modify the BundleChangelogsArguments construction where planInput is created).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/tooling/docs-builder/Commands/ChangelogCommand.cs`:
- Around line 774-781: The plan input for the --plan flow builds a
BundleChangelogsArguments instance (planInput) but omits the OutputProducts
property, so placeholder validation (e.g., {version}) can reject valid runs that
provided --output-products; update the code that constructs planInput to copy
the OutputProducts from the existing config/arguments (the same source used for
processedOutput and profileArg) into planInput.OutputProducts so placeholder
validation sees the same products as the real run, ensuring --plan mirrors
--output-products behavior (modify the BundleChangelogsArguments construction
where planInput is created).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5d50bc92-3346-4045-86c9-a010c65929ea
📒 Files selected for processing (2)
config/changelog.example.ymlsrc/tooling/docs-builder/Commands/ChangelogCommand.cs
✅ Files skipped from review due to trivial changes (1)
- config/changelog.example.yml
This PR adds support for a
descriptionwithin changelog bundle files.Summary
--description) or configuration (bundle.description,bundle.profiles.<name>.description){changelog}directive andchangelog renderoutputImplementation details
Schema & Model Changes
Descriptionfield toBundleandBundleDtotypesReleaseNotesSerializationConfiguration Support
BundleConfigurationandBundleProfilewithDescriptionfieldsconfig/changelog.example.ymlwith description examplesCLI Integration
--descriptionparameter to bothchangelog bundleandchangelog gh-release{version},{lifecycle},{owner},{repo}so that they can be used in a reusable bundle description in the changelog configuration fileBundleDescriptionSubstitutionhelper for consistent placeholder handlingRendering Pipeline
{changelog}directive to display descriptions after release headingsDocumentation
docs/cli/changelog/bundle.md,docs/cli/changelog/gh-release.md)docs/contribute/changelog.md) with detailed description usagedocs/syntax/changelog.md) showing rendered output|) for multiline descriptions$'...\n\n...') for multiline command-line usageSteps to test
EDOT Java test
Try to create content like what appears in https://www.elastic.co/docs/release-notes/edot/sdks/java#edot-java-1-10-0-release-notes
Run the following commands to prepare for local testing:
Create a changelog configuration file. Or check out [DOCS] Test bundle descriptions elastic-otel-java#1046
Create a changelog with a description that has links, bullets, etc. For example:
Create a bundle for that changelog and add a description. For example:
Add changelog directives to view the output then preview it locally. For example:
ECCTL test
Try to create content like https://www.elastic.co/docs/release-notes/ecctl with URLs generated from variables in bundle profiles.
Create a changelog configuration file. Or check out [DOCS] Test release note changelogs ecctl#765
Create a changelog. For example:
Verify that the changelog configuration file has a profile that includes a description, for example:
Create a bundle for that changelog. For example:
Verify that the URL in the description was resolved correctly in the bundle file. For example:
Add changelog directives to view the output then preview it locally. For example:
Generative AI disclosure
Tool(s) and model(s) used: claude-4-sonnet