OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

Add workflow for changelog verification

Open kotwanikunal opened this issue 2 years ago • 3 comments

Signed-off-by: Kunal Kotwani [email protected]

Description

  • The changes under this PR build on adding a changelog enforcer using the GHA Changelog Enforcer following the Keep A Changelog format
  • What this solves for currently:
    • Enforcing all new PRs made to the repo have a changelog attached to them
    • Dependabot PRs have the appropriate changes automatically added to the CHANGELOG.md file
  • What this currently does not solve for currently:
    • Backported PRs will have issues since the changes will not be automatically added to the older version within the changelog file

Issues Resolved

  • #1868

Check List

  • [ ] New functionality includes testing.
    • [ ] All tests pass
  • [ ] New functionality has been documented.
    • [ ] New functionality has javadoc added
  • [x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

kotwanikunal avatar Aug 02 '22 06:08 kotwanikunal

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1245/
  • CommitID: a5a1090a53c9e29ee4f7531f9236b0e66f489690

github-actions[bot] avatar Aug 02 '22 06:08 github-actions[bot]

> Task :libs:opensearch-grok:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Problems handling incoming cache access requests.
java.lang.OutOfMemoryError: Java heap space

kotwanikunal avatar Aug 02 '22 16:08 kotwanikunal

Gradle Check (Jenkins) Run Completed with:

  • RESULT: SUCCESS :white_check_mark:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1278/
  • CommitID: a5a1090a53c9e29ee4f7531f9236b0e66f489690

github-actions[bot] avatar Aug 02 '22 16:08 github-actions[bot]

@dblock What do you think of this? Related: #1868

kotwanikunal avatar Aug 16 '22 16:08 kotwanikunal

I love it. Super simple. Let's update developer docs too?

Yes. I will update the PR as soon as we have the syntax and process finalized.

kotwanikunal avatar Aug 16 '22 18:08 kotwanikunal

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1869/
  • CommitID: fb9d28e61b9f58180a9720d6270e7389f79599ba

github-actions[bot] avatar Aug 18 '22 02:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1870/
  • CommitID: f8986a92ecf8c39d18bd64303c8b6687653a433d

github-actions[bot] avatar Aug 18 '22 02:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: ABORTED :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1868/
  • CommitID: fc2879a5c72ad774235725f399a8a583a1030fa2

github-actions[bot] avatar Aug 18 '22 04:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1892/
  • CommitID: 6aa2ecde2a5851848006054746aeccce87639a57

github-actions[bot] avatar Aug 18 '22 17:08 github-actions[bot]

One more question: dependabot is going to open PRs and won't update CHANGELOG. Do we need to treat it in some special way?

dblock avatar Aug 18 '22 17:08 dblock

One more question: dependabot is going to open PRs and won't update CHANGELOG. Do we need to treat it in some special way?

There is a plugin for dependabot dangoslen/dependabot-changelog-helper@v1 which I have added that adds the change to a new dependency section and commits the changelog file to the PR (using stefanzweifel/git-auto-commit-action@v4).

The thing that is not yet covered is backporting. I did list that out as a callout on the PR. We might need to invest some additional time to achieve something similar to the dependabot-changelog-helper for our use case.

kotwanikunal avatar Aug 18 '22 17:08 kotwanikunal

The thing that is not yet covered is backporting. I did list that out as a callout on the PR. We might need to invest some additional time to achieve something similar to the dependabot-changelog-helper for our use case.

Backports will need to include CHANGELOG entries from the changes backported. If those don't merge clean they will need work, which is OK.

dblock avatar Aug 18 '22 19:08 dblock

Gradle check:


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':distribution:bwc:minor:buildBwcLinuxTar'.
> Building 2.2.0 didn't generate expected file /var/jenkins/workspace/gradle-check/search/distribution/bwc/minor/build/bwc/checkout-2.x/distribution/archives/linux-tar/build/distributions/opensearch-min-2.2.0-SNAPSHOT-linux-x64.tar.gz

kotwanikunal avatar Aug 18 '22 19:08 kotwanikunal

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1904/
  • CommitID: 6aa2ecde2a5851848006054746aeccce87639a57

github-actions[bot] avatar Aug 18 '22 20:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1906/
  • CommitID: 2116581d3158116d026e490b51fc0cad7e81169f

github-actions[bot] avatar Aug 18 '22 21:08 github-actions[bot]

Unrelated:

Tests with failures:
 - org.opensearch.index.fielddata.SortedSetDVStringFieldDataTests.testSortMissingLastReverse

kotwanikunal avatar Aug 18 '22 22:08 kotwanikunal

Gradle Check (Jenkins) Run Completed with:

  • RESULT: SUCCESS :white_check_mark:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1908/
  • CommitID: 2116581d3158116d026e490b51fc0cad7e81169f

github-actions[bot] avatar Aug 18 '22 22:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: SUCCESS :white_check_mark:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1987/
  • CommitID: 208d4c98e78829888fca9c3041340606b512c2d4

github-actions[bot] avatar Aug 22 '22 17:08 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: SUCCESS :white_check_mark:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1988/
  • CommitID: 291f4d5bdda1ed6a81c27a7785098f54769ac1d9

github-actions[bot] avatar Aug 22 '22 17:08 github-actions[bot]

I merged it. Let's backport to 2.x and try to run with this.

dblock avatar Aug 23 '22 17:08 dblock

@kotwanikunal Are you going to take this on as a campaign for all plugins once it's stable here? Maybe we need to open sub-issues in those repos?

dblock avatar Aug 25 '22 13:08 dblock

@dblock I can run that once we ensure the process and any further automation/guardrails are in place. I am also backporting all the changes to 1.x right now.

kotwanikunal avatar Aug 29 '22 17:08 kotwanikunal

@kotwanikunal @dblock I think the changelog doc link in the checklist section is broken.

I recently opened this PR https://github.com/opensearch-project/OpenSearch/pull/4360 and you can see that the link points to https://github.com/opensearch-project/OpenSearch/CONTRIBUTING.md#changelog which is wrong. Correct link is https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#changelog.

Maybe we need to change the relative link from [Changelog](../CONTRIBUTING.md#changelog) to [Changelog](../blob/main/CONTRIBUTING.md#changelog) ?

lukas-vlcek avatar Aug 31 '22 17:08 lukas-vlcek

@kotwanikunal @dblock I think the changelog doc link in the checklist section is broken.

I recently opened this PR #4360 and you can see that the link points to https://github.com/opensearch-project/OpenSearch/CONTRIBUTING.md#changelog which is wrong. Correct link is https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#changelog.

Maybe we need to change the relative link from [Changelog](../CONTRIBUTING.md#changelog) to [Changelog](../blob/main/CONTRIBUTING.md#changelog) ?

I'll add in the fix. Thanks for bringing it to notice.

kotwanikunal avatar Aug 31 '22 19:08 kotwanikunal

@lukas-vlcek Fixed it with https://github.com/opensearch-project/OpenSearch/pull/4364

kotwanikunal avatar Sep 01 '22 17:09 kotwanikunal