From ec3b30d0a050bb8f88042eb5926dc3407726f947 Mon Sep 17 00:00:00 2001 From: Andrew Ross Date: Mon, 17 Mar 2025 16:46:25 -0700 Subject: [PATCH 1/3] Update changelog for new branching strategy The two file approach is no longer needed now that we are not maintaining the main branch as the next major version. This updates the changelog and the verifier workflow accordingly. Signed-off-by: Andrew Ross --- .github/workflows/changelog_verifier.yml | 39 +----------------------- CHANGELOG-3.0.md | 21 ------------- CHANGELOG.md | 4 +-- 3 files changed, 3 insertions(+), 61 deletions(-) delete mode 100644 CHANGELOG-3.0.md diff --git a/.github/workflows/changelog_verifier.yml b/.github/workflows/changelog_verifier.yml index cd0415119282c..74bc4fd513d18 100644 --- a/.github/workflows/changelog_verifier.yml +++ b/.github/workflows/changelog_verifier.yml @@ -14,42 +14,5 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} ref: ${{ github.event.pull_request.head.sha }} - uses: dangoslen/changelog-enforcer@v3 - id: verify-changelog-3x with: - skipLabels: "autocut, skip-changelog" - changeLogPath: 'CHANGELOG-3.0.md' - continue-on-error: true - - uses: dangoslen/changelog-enforcer@v3 - id: verify-changelog - with: - skipLabels: "autocut, skip-changelog" - changeLogPath: 'CHANGELOG.md' - continue-on-error: true - - run: | - # The check was possibly skipped leading to success for both the jobs - has_backport_label=${{ contains(join(github.event.pull_request.labels.*.name, ', '), 'backport')}} - has_breaking_label=${{ contains(join(github.event.pull_request.labels.*.name, ', '), '>breaking')}} - if [[ $has_breaking_label == true && $has_backport_label == true ]]; then - echo "error: Please make sure that the PR does not have a backport label associated with it when making breaking changes" - exit 1 - fi - - if [[ ${{ steps.verify-changelog-3x.outcome }} == 'success' && ${{ steps.verify-changelog.outcome }} == 'success' ]]; then - exit 0 - fi - - if [[ ${{ steps.verify-changelog-3x.outcome }} == 'failure' && ${{ steps.verify-changelog.outcome }} == 'failure' ]]; then - echo "error: Please ensure a changelog entry exists in CHANGELOG.md or CHANGELOG-3.0.md" - exit 1 - fi - - # Concatenates the labels and checks if the string contains "backport" - if [[ ${{ steps.verify-changelog.outcome }} == 'success' && $has_backport_label == false ]]; then - echo "error: Please make sure that the PR has a backport label associated with it when making an entry to the CHANGELOG.md file" - exit 1 - fi - - if [[ ${{ steps.verify-changelog-3x.outcome }} == 'success' && $has_backport_label == true ]]; then - echo "error: Please make sure that the PR does not have a backport label associated with it when making an entry to the CHANGELOG-3.0.md file" - exit 1 - fi + skipLabels: "autocut, skip-changelog" diff --git a/CHANGELOG-3.0.md b/CHANGELOG-3.0.md deleted file mode 100644 index f301c4669de96..0000000000000 --- a/CHANGELOG-3.0.md +++ /dev/null @@ -1,21 +0,0 @@ -# CHANGELOG -All notable changes to this project are documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on how to add changelog entries. - -## [Unreleased 3.0] -### Added - -### Dependencies - -### Changed - -### Deprecated - -### Removed - -### Fixed - -### Security - -[Unreleased 3.0]: https://github.com/opensearch-project/OpenSearch/compare/2.x...HEAD diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a35ca711ed3..17742e36ddf46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on how to add changelog entries. -## [Unreleased 2.x] +## [Unreleased 3.x] ### Added ### Dependencies @@ -18,4 +18,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Security -[Unreleased 2.x]: https://github.com/opensearch-project/OpenSearch/compare/2.19...2.x +[Unreleased 2.x]: https://github.com/opensearch-project/OpenSearch/compare/f58d846f...main From 80750e478039aefecad60e38ab151af26e459088 Mon Sep 17 00:00:00 2001 From: Andrew Ross Date: Tue, 18 Mar 2025 09:39:05 -0700 Subject: [PATCH 2/3] Remove documentation about two changelog files Signed-off-by: Andrew Ross --- CONTRIBUTING.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ec0abe535dd0..56b6da1f989c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -146,15 +146,6 @@ Adding in the change is two step process: 1. Add your changes to the corresponding section within the CHANGELOG file with dummy pull request information, publish the PR 2. Update the entry for your change in [`CHANGELOG.md`](CHANGELOG.md) and make sure that you reference the pull request there. -### Where should I put my CHANGELOG entry? -Please review the [branching strategy](https://github.com/opensearch-project/.github/blob/main/RELEASING.md#opensearch-branching) document. The changelog on the `main` branch will contain **two files**: `CHANGELOG.md` which corresponds to unreleased changes intended for the _next minor_ release and `CHANGELOG-3.0.md` which correspond to unreleased changes intended for the _next major_ release. Your entry should go into file corresponding to the version it is intended to be released in. In practice, most changes to `main` will be backported to the next minor release so most entries will be in the `CHANGELOG.md` file. - -The following examples assume the _next major_ release on main is 3.0, then _next minor_ release is 2.5, and the _current_ release is 2.4. - -- **Add a new feature to release in next minor:** Add a changelog entry to `[Unreleased 2.x]` in CHANGELOG.md on main, then backport to 2.x (including the changelog entry). -- **Introduce a breaking API change to release in next major:** Add a changelog entry to `[Unreleased 3.0]` to CHANGELOG-3.0.md on main, do not backport. -- **Upgrade a dependency to fix a CVE:** Add a changelog entry to `[Unreleased 2.x]` on main, then backport to 2.x (including the changelog entry), then backport to 2.4 and ensure the changelog entry is added to `[Unreleased 2.4.1]`. - ## Review Process We deeply appreciate everyone who takes the time to make a contribution. We will review all contributions as quickly as possible. As a reminder, [opening an issue](https://github.com/opensearch-project/OpenSearch/issues/new/choose) discussing your change before you make it is the best way to smooth the PR process. This will prevent a rejection because someone else is already working on the problem, or because the solution is incompatible with the architectural direction. From 4d9a98275921a7b0494abf4b4c3ce06ee0ec82f4 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 18 Mar 2025 13:24:40 -0400 Subject: [PATCH 3/3] Update changelog_verifier.yml --- .github/workflows/changelog_verifier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog_verifier.yml b/.github/workflows/changelog_verifier.yml index 74bc4fd513d18..7bd28e1a9e18f 100644 --- a/.github/workflows/changelog_verifier.yml +++ b/.github/workflows/changelog_verifier.yml @@ -15,4 +15,4 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - uses: dangoslen/changelog-enforcer@v3 with: - skipLabels: "autocut, skip-changelog" + skipLabels: "autocut, skip-changelog"