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

Add changelog generation script #4386

Closed

Conversation

BSFishy
Copy link
Contributor

@BSFishy BSFishy commented Jun 24, 2023

Description

Implements the changelog generation script as defined in the changesets proposal. To activate it, run yarn changelog:generate.

Currently, this PR is a draft. I am still working on it to make sure it adheres to the proposal. I created it as a draft so I can share it with other team members to get feedback as I'm developing. If you have some feedback in its current state, feel free to share it as a comment.

Issues Resolved

Implements changelog generator described in opensearch-project/.github#156

Testing the changes

Added sample changesets and ran yarn changelog:generate.

Check List

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

@codecov
Copy link

codecov bot commented Jun 24, 2023

Codecov Report

Merging #4386 (66b4c01) into main (1d41cfe) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #4386   +/-   ##
=======================================
  Coverage   66.15%   66.15%           
=======================================
  Files        3314     3314           
  Lines       63907    63907           
  Branches     9963     9963           
=======================================
  Hits        42277    42277           
  Misses      19184    19184           
  Partials     2446     2446           
Flag Coverage Δ
Linux_1 34.72% <ø> (ø)
Linux_2 55.04% <ø> (ø)
Linux_3 43.17% <ø> (ø)
Linux_4 35.09% <ø> (ø)
Windows_1 34.74% <ø> (ø)
Windows_2 55.00% <ø> (ø)
Windows_3 43.18% <ø> (ø)
Windows_4 35.09% <ø> (ø)

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

Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

A few high level comments here:

  1. This change should not wipe out the existing changelog file, but add onto it. Only the unreleased section should be removed, but that can be a manual action too. Its safe to assume that we will do a one time cleanup of the changelog to prep it for the new system, if we can avoid it the better, but its not necessary.
  2. The new changelog format also seems to include the tag and release date, lets follow this style too
  3. As per the proposal, once the changelog is generated, the associated changeset files should be deleted too.

for (const [sectionKey, entries] of Object.entries(fragmentYaml)) {
if (!SECTION_KEYS.includes(sectionKey)) {
// eslint-disable-next-line no-console
console.warn(`Unknown section ${sectionKey}. Ignoring`);
Copy link
Member

Choose a reason for hiding this comment

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

IF we encounter an unknown section I thin id like to be warned more explicitly. We dont want to miss something from the changelog because we missed a warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you think it should blow up with errors and exit without actually modifying the changelog?

Copy link
Member

Choose a reason for hiding this comment

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

Nah it can modify, we have git histories to revet the change if necessary.

@ananzh
Copy link
Member

ananzh commented Jul 25, 2024

@BSFishy Due to an extended period without updates, we're going to close this issue for now. We appreciate your contribution and understand that priorities and availability can change. Please feel free to reopen this issue when you have the opportunity to revisit it. Thank you for your understanding.

@ananzh ananzh closed this Jul 25, 2024
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.

4 participants