Skip to content
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

[OSCI][FEAT] Changelog Project - PoC Changelog and release notes automation tool - OpenSearch Dashboards #5519

Merged
merged 283 commits into from
Apr 16, 2024

Conversation

BigSamu
Copy link
Contributor

@BigSamu BigSamu commented Nov 21, 2023

Description

This PR is a PoC for tackling the proposal for automating the Changelog and Release Notes process detailed by @ashwin-pc in OpenSearch-Project issue opensearch-project/.github#156.

The solution followed is detailed in the README.md file inside the /changelogs directory. The PoC will be applied first in the OpenSearch-Dashboards repo, and after successful roll-out, it will be implemented in all other repos of OpenSearch-Project.

This PoC is being developed by four members of the OSCI programme (@JohnathonBowers, @MadaniKK, @CMDWillYang and @BigSamu) under the supervision of @BSFishy @joshuarrrr and @ashwin-pc.
test

Issues Resolved

Closes issue #156 from OpenSearch Project general repo and issue #5509 from OpenSearch-Dashboards repo.

Changelog

  • feat: Design new procedure for automating changelogs and release notes process
  • feat: Create Github workflow automating creation of changeset files (i.e. fragments files)
  • feat: Create script automating the update of CHANGELOG.md file and release notes files

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 32.65%. Comparing base (85df662) to head (3b0506a).
Report is 10 commits behind head on main.

❗ Current head 3b0506a differs from pull request most recent head e4c81c2. Consider uploading reports for the commit e4c81c2 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5519       +/-   ##
===========================================
- Coverage   55.58%   32.65%   -22.94%     
===========================================
  Files        1199     2249     +1050     
  Lines       24259    45516    +21257     
  Branches     4087     7133     +3046     
===========================================
+ Hits        13485    14861     +1376     
- Misses      10133    29959    +19826     
- Partials      641      696       +55     
Flag Coverage Δ
Linux_1 32.65% <ø> (?)
Windows_2 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BigSamu
Copy link
Contributor Author

BigSamu commented Apr 12, 2024

@AMoo-Miki, @ashwin-pc

I finished the reviews from @AMoo-Miki for the parts I could make changes to - the changelog part workflow. For the part of part of the release notes, I will have to review that code because I didn't work on it, but instead, other contributors.

@CMDWillYang, can you review all the changes that @AMoo-Miki is asking for in part of the release notes?

@BigSamu
Copy link
Contributor Author

BigSamu commented Apr 12, 2024

@AMoo-Miki, @ashwin-pc

I finished the reviews from @AMoo-Miki for the parts I could make changes to - the changelog part workflow. For the part of part of the release notes, I will have to review that code because I didn't work on it, but instead, other contributors.

@CMDWillYang, can you review all the changes that @AMoo-Miki is asking for in part of the release notes?

@CMDWillYang, I tagged you in all the reviews @AMoo-Miki is asking for the release notes part. It would be great if you could review them. Please let me know if you have any doubts. I wrote to you on Slack to be in contact.

@CMDWillYang
Copy link
Contributor

Many thanks for the review @AMoo-Miki
I've made changes to all but the below suggestions. Please take a look at the comments under each review for more details and discussion.

  1. migrate to js.
  2. error handling for missing unreleased section

Please let me know your thoughts!

@ananzh ananzh merged commit 4199162 into opensearch-project:main Apr 16, 2024
64 of 65 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-5519-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4199162bbdf8245d72f9e9d809504c2055c2d39e
# Push it to GitHub
git push --set-upstream origin backport/backport-5519-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-5519-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.14 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.14 2.14
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.14
# Create a new branch
git switch --create backport/backport-5519-to-2.14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4199162bbdf8245d72f9e9d809504c2055c2d39e
# Push it to GitHub
git push --set-upstream origin backport/backport-5519-to-2.14
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.14

Then, create a pull request where the base branch is 2.14 and the compare/head branch is backport/backport-5519-to-2.14.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-5519-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4199162bbdf8245d72f9e9d809504c2055c2d39e
# Push it to GitHub
git push --set-upstream origin backport/backport-5519-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-5519-to-2.x.

kavilla added a commit to kavilla/OpenSearch-Dashboards-1 that referenced this pull request Jun 5, 2024
…mation tool - OpenSearch Dashboards (opensearch-project#5519)

Refactor and Enhance Workflow Management

- Added and updated changesets for multiple PRs to improve tracking and documentation of changes.
- Removed unnecessary test and dummy files (`test.txt`, various `.yml` fragments) to clean up the repository.
- Refactored workflow scripts to streamline changelog generation and fragment handling, moving temporary files to a designated folder.
- Updated GitHub Actions workflows by changing event triggers from `pull_request` to `pull_request_target` and vice versa to optimize workflow execution.
- Enhanced security and automation by updating token names and adding write permissions to the changeset workflow.
- Deleted obsolete workflow file for creating changeset files, now handled by an automated process.
- Major clean-up of dummy fragment files and unnecessary changelog entries to maintain clarity and relevancy in documentation.
- Implemented minor updates and improvements in codebase, specifically in generating release notes and handling fragments.

---------

Signed-off-by: Johnathon Bowers <[email protected]>
Signed-off-by: CMDWillYang <[email protected]>
Signed-off-by: Qiwen Li <[email protected]>
Signed-off-by: qiwen li <[email protected]>
Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Johnathon Bowers <[email protected]>
Co-authored-by: CMDWillYang <[email protected]>
Co-authored-by: Qiwen Li <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Anan Zhuang <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: autochangeset[bot] <154024398+autochangeset[bot]@users.noreply.github.com>
Co-authored-by: opensearch-bot[bot] <154024398+opensearch-bot[bot]@users.noreply.github.com>
Co-authored-by: opensearch-bot-dev[bot] <154634848+opensearch-bot-dev[bot]@users.noreply.github.com>
Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Miki <[email protected]>
Co-authored-by: Kawika Avilla <[email protected]>
@kavilla
Copy link
Member

kavilla commented Jun 5, 2024

#6918

manasvinibs pushed a commit that referenced this pull request Jun 5, 2024
…ease notes automation tool (#6918)

* [OSCI][FEAT] Changelog Project - PoC Changelog and release notes automation tool - OpenSearch Dashboards (#5519)

Refactor and Enhance Workflow Management

- Added and updated changesets for multiple PRs to improve tracking and documentation of changes.
- Removed unnecessary test and dummy files (`test.txt`, various `.yml` fragments) to clean up the repository.
- Refactored workflow scripts to streamline changelog generation and fragment handling, moving temporary files to a designated folder.
- Updated GitHub Actions workflows by changing event triggers from `pull_request` to `pull_request_target` and vice versa to optimize workflow execution.
- Enhanced security and automation by updating token names and adding write permissions to the changeset workflow.
- Deleted obsolete workflow file for creating changeset files, now handled by an automated process.
- Major clean-up of dummy fragment files and unnecessary changelog entries to maintain clarity and relevancy in documentation.
- Implemented minor updates and improvements in codebase, specifically in generating release notes and handling fragments.

---------

Signed-off-by: Johnathon Bowers <[email protected]>
Signed-off-by: CMDWillYang <[email protected]>
Signed-off-by: Qiwen Li <[email protected]>
Signed-off-by: qiwen li <[email protected]>
Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Johnathon Bowers <[email protected]>
Co-authored-by: CMDWillYang <[email protected]>
Co-authored-by: Qiwen Li <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Anan Zhuang <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: autochangeset[bot] <154024398+autochangeset[bot]@users.noreply.github.com>
Co-authored-by: opensearch-bot[bot] <154024398+opensearch-bot[bot]@users.noreply.github.com>
Co-authored-by: opensearch-bot-dev[bot] <154634848+opensearch-bot-dev[bot]@users.noreply.github.com>
Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Miki <[email protected]>
Co-authored-by: Kawika Avilla <[email protected]>

* delete file erroneous restored when handling conflict

Signed-off-by: Kawika Avilla <[email protected]>

---------

Signed-off-by: Johnathon Bowers <[email protected]>
Signed-off-by: CMDWillYang <[email protected]>
Signed-off-by: Qiwen Li <[email protected]>
Signed-off-by: qiwen li <[email protected]>
Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: Samuel Valdes Gutierrez <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Johnathon Bowers <[email protected]>
Co-authored-by: CMDWillYang <[email protected]>
Co-authored-by: Qiwen Li <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Anan Zhuang <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: autochangeset[bot] <154024398+autochangeset[bot]@users.noreply.github.com>
Co-authored-by: opensearch-bot[bot] <154024398+opensearch-bot[bot]@users.noreply.github.com>
Co-authored-by: opensearch-bot-dev[bot] <154634848+opensearch-bot-dev[bot]@users.noreply.github.com>
Co-authored-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Miki <[email protected]>
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.

[OSCI][PROPOSAL] Changelog and release notes automation proposal - PoC for OpenSearch Dashboards