Skip to content

Conversation

colleenmcginnis
Copy link
Contributor

@colleenmcginnis colleenmcginnis commented Sep 26, 2025

Builds on #213

Adds logic that will add includes to _snippets files in the correct order if the rendered_changelog_destination in the config.changelog.yaml is using release-notes/_snippets. This is the case in fleet-server and elastic-agent as of elastic/fleet-server#5374 and elastic/elastic-agent#9440.

When using this model, there are multiple levels of nesting to make it as easy as possible to insert new patch version sections in the correct order. For example, when 9.0.8 is released this tool will:

  • Create a 9.0.8-specific release notes (index.md), breaking-changes.md, and deprecations.md snippet files. For example, the 9.0.8 release notes are added to a new snippet file: release-notes/_snippets/9.0.8/index.md.
  • 🆕 Include the 9.0.8-specific files in another snippet file that compiles the files of that type (index, breaking-changes, or deprecations) for all patch versions of a single minor. For example, release-notes/_snippets/index/9.0.md. This level of nesting makes it easier to put new patch versions for previous minors in the correct order on the rendered page.
  • 🆕 Then, that type-specific, minor-versioned file is included in another snippet file that compiles all the minor version snippets into a single list of all minors for the current major. For example, release-notes/_snippets/index.md.
  • Finally, that file is included in the main release notes page (release-notes/index.md) after the intro text.

These updates will (1) eliminate any manual steps in the resulting elastic-agent or fleet-server PR outside of copy edits, and (2) reduce the chance of conflicts when forward porting to later minors and main (like we ran into in elastic/elastic-agent#10032 and elastic/elastic-agent#10031).

Still to do:

  • Update docs
  • Add changelog entry
  • Fix tests

cc @karenzone

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @colleenmcginnis

@colleenmcginnis colleenmcginnis merged commit 49ad3b6 into elastic:main Oct 1, 2025
7 checks passed
@colleenmcginnis colleenmcginnis deleted the refine-markdown-output branch October 1, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants