Skip to content

[wip] release notes automation#1023

Draft
SylvainJuge wants to merge 11 commits intoelastic:mainfrom
SylvainJuge:release-notes
Draft

[wip] release notes automation#1023
SylvainJuge wants to merge 11 commits intoelastic:mainfrom
SylvainJuge:release-notes

Conversation

@SylvainJuge
Copy link
Copy Markdown
Member

@SylvainJuge SylvainJuge commented Mar 26, 2026

Opened as a draft at this is a work-in-progress migration to using docs-builder to generate changelog entries and release notes.

Instructions provided here were used as a reference: elastic/elasticsearch#140795 (comment)

This will re-generate changelog entries from pull-requests and generate bundles, which emulates how each PR should have been gradually added to the changelog and how changelog bundles should be merged together at each release:

./wip-changelog.sh

All the PRs that are part of the changelog have beep properly labelled so they can fit one of the defined types.

For upstream dependency updates, they are currently labelled with enhancement, as they most often bring new enhancement and features from the SDK and the upstream implementation.

Next steps:

  • review all TODOs in this PR and either create issues/PRs in docs-builder or provide ways to achieve what is necessary.
  • find a way to generate github release notes markdown from a single bundle
  • generate changelog in markdown to replace current static release-notes
  • add automation in CI to require new PRs to be tagged so they are included in future changelogs + add changelog entries automatically
  • remove ./wip-changelog.sh
  • make it ready for merge: catch-up with any merged PR in the mean time

@SylvainJuge SylvainJuge self-assigned this Mar 26, 2026
version="${2}"
pr="${1}"

# TODO: do we have to add complete PR URLs here or could we just use the numeric ID ?
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

do we have to add complete PR URLs here or could we just use the numeric ID ?

If you're doing them singly like this it can be just the PR number. If you're providing a newline-delimited file that contains multiple PRs, it's a good idea to use the full URLs since then you can re-use it for the "changelog bundle" and "changelog remove" commands too.

More info about this option can be found in https://elastic.github.io/docs-builder/cli/release/changelog-add/


# TODO: do we have to add complete PR URLs here or could we just use the numeric ID ?
# having the complete URL in the generated changelog entry is however convenient for humans to open the link
docs-builder changelog add --prs https://github.com/elastic/elastic-otel-java/pull/${pr} --products "edot-java ${version} ga"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

--products "edot-java ${version} ga"

Because you have the default product in your changelog.yml, this clause is optional.

sed -i 's/#.*//g' "./docs/changelog/${pr}.yaml"
sed -i '/^[[:space:]]*$/d' "./docs/changelog/${pr}.yaml"

# TODO: to filter duplicate upstream dependency updates, we could maybe just remove any changelog entry
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

we could maybe just remove any changelog entry

Right now the only way to automatically fail changelog creation is via the rules.create settings. You've currently got the chore label in there, would it help to add others?

# for such update, the challenge might be to define a reliable heuristic, relying on PR title seems quite brittle.
}

create_bundle(){
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

create_bundle(){

I don't have authority to push to this repo, but if you add a profiles section to the changelog.yml file like this:

bundle:
  profiles:
    # Example: Edot-java release profile (filter by changelog fields)
    edot-java-release:
      # Filter: which input changelogs to include ({version} and {lifecycle} are substituted at runtime)
      products: "edot-java {version} ga"
      # Output filename ({version} is substituted at runtime)
      output: "{version}.yaml"
      # Optional: override the products array written to the bundle output.
      # output_products: "edot-java {version}"

Then your command could be simplified to this:

docs-builder changelog bundle edot-java-release ${version}

More profile examples can be found in https://elastic.github.io/docs-builder/cli/release/changelog-bundle/#profile-based-examples

--input-products "edot-java ${version} ga" \
--output "./docs/releases/${version}.yaml"

# TODO: document changelog remove
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

document changelog remove

If you add the profile per my other comment, then you can use it in the remove command too. For example:

docs-builder changelog remove edot-java-release ${version}

More examples are available in https://elastic.github.io/docs-builder/cli/release/changelog-remove/#remove-by-product

add_pr 712 1.5.0
add_pr 729 1.5.0
# add changelog entry not related to a PR
# TODO: how should we handle adding a 'tech preview' feature in a GA product ?
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

how should we handle adding a 'tech preview' feature in a GA product

That's something you could put in the product.lifecycle field too (though we're not currently doing anything with that info in the output).

For the acceptable values, refer to https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation/Lifecycle.cs

@lcawl
Copy link
Copy Markdown

lcawl commented Mar 28, 2026

I don't have authority to push commits to this PR, so I created SylvainJuge#1

@lcawl
Copy link
Copy Markdown

lcawl commented Apr 2, 2026

I created SylvainJuge#2 to hopefully address the current docs build error.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants