-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement new changelog process #67335
Comments
Pinging @elastic/es-delivery (Team:Delivery) |
Subscribing, since this is of interest to Cloud as well. We currently generate release notes from PRs, including the actual content from a section in the root comment, and collate them by category in individual files. It's somewhat similar to what you seem to be planning, with some differences since our repo is private.
We're susceptible to this same problem where changes are backed but can still appear in the release notes. @Aran-K something for us to chat about when you're back from PTO. EDIT: Also of interest to @gtback |
++ I'm also interested in this. I am working to help standardize the changelog/release notes across products to help present them in a unified interface. My goal is to define a simple JSON format that all teams can use (and generate however they'd like) for some automation to slurp up and put in an App Search instance. I'm hoping to have a version ready to share shortly. I'm equally fine with YAML, though I don't necessarily think the format you're describing is the one we'll use directly (for example, we'll probably want to convert the PR number into a full URL). I don't have a strong preference between one-item-per-file and multiple items in one file. |
I updated the example in the description following some work to prototype the process in the Elasticsearch repo. Most notably, I stopped defining multiple documents in the YAML as this turned out to actually make things harder. |
@rjernst raised an idea I wanted to share here in case it could be incorporated. We currently add a It would be great if the new generator and/or process avoided this cleanup. |
Part of #67335. Add tasks for generating release notes, using information stored in files in the repository: * `generateReleaseNotes` - generates new release notes, release highlights and breaking changes * `validateChangelogs` - validates that all the changelog YAML files are well-formed (confirm to schema, have required fields depending on the `type` value) I also changed `Version` to allow a `v` prefix in relaxed mode
Part of #67335. Add tasks for generating release notes, using information stored in files in the repository: * `generateReleaseNotes` - generates new release notes, release highlights and breaking changes * `validateChangelogs` - validates that all the changelog YAML files are well-formed (confirm to schema, have required fields depending on the `type` value) I also changed `Version` to allow a `v` prefix in relaxed mode
Part of elastic#67335. Add tasks for generating release notes, using information stored in files in the repository: * `generateReleaseNotes` - generates new release notes, release highlights and breaking changes * `validateChangelogs` - validates that all the changelog YAML files are well-formed (confirm to schema, have required fields depending on the `type` value) I also changed `Version` to allow a `v` prefix in relaxed mode
Hi guys, thank you for this gem! However, not having a simple CHANGELOG.md file in this gem's root is just weird and we're always scared about what could (potentially) break. For example, when we see today's version 8 release, the first thing we did was to ensure we won't upgrade :) |
@jirihradil if you are looking for a changelog for the Ruby client, you can find one in the dedicated repository: https://github.com/elastic/elasticsearch-ruby/blob/main/CHANGELOG.md |
@pugnascotia Thank you for both the link and PR! |
We're using the new process for 8.1.0, so I think we can close this. I filed a follow-up for possibly also adopting this setup in elastic/ml-cpp#2217. |
Summary
This issue concerns implementing a new process and tooling for generating the release notes for an Elasticsearch release. Instead of pulling data from GitHub directly, each PR will add a file to the repository that contains all the required data.
Background
Our current process for generating the release notes / changelog for Elasticsearch relies on pulling information directly from GitHub. There are issues with this approach:
Some years ago, we experimented with including a changelog file in the ES repository, which was updated with each PR. This approach was quickly abandoned due to the number of merge conflicts that it generated.
Instead, we now propose that each release branch has a dedicated directory (for example
changelog
but it doesn't have to be that) which is populated with a file per PR and contains all the information necessary to generate the release notes. This needs to use a structured format so that it can easily processed with tools.File format
Each changelog file must contain all the information required to generate the notes. This probably includes, but is not limited to, the following.
enhancement
,feature
,bugfix
etcCore/Features
orSearch/Mapping
We could simply have a
labels
field that mirrors the PR's GitHub labels. However, the current process uses the GitHub labels directly, which means the ES release point person often has to decide what area and change type to select for a number of PRs, where they are labelled for multiple areas and change types. It would be better to move this burden to PR authors, who are better placed to make these decisions.The obvious file formats are JSON or YAML. YAML has the advantage of being easier for humans to read and edit.
We should enforce the existence and validity of changelog entries for PRs whose labels do not exempt them from the changelog (e.g. test fixes, build-related work).
A prototype generator exists, written in Python. We should rewrite this in Java as a Gradle task, so that any team member can update it. This task must carefully verify the input files to ensure that all requires fields are present and there are no typos in the key names.
Open questions
precommit
task that running the generation step results in no changes in the current checkout. This would require whoever adds a changelog file to also run the generation step and commit the result, but this will result in merge conflicts in the generated outputs, leaving us in the same position as having a single changelog file.Possible file example
The text was updated successfully, but these errors were encountered: