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

chore: fix CHANGELOG generation for v2 branch #13019

Merged
merged 2 commits into from
Feb 15, 2021

Conversation

njlynch
Copy link
Contributor

@njlynch njlynch commented Feb 12, 2021

The CHANGELOG for the v2 releases has been inaccurate, only showing a fraction
of the changes and mixing v1 and v2 releases side by side.

The issue appears to be how conventional-changelog handles interleaving
changes across major versions on separate branches. After digging into the
internals of conventional-changelog and standard-release a bit, I don't see a
supported way to achieve our desired outcome.

However, I did come up with a hack that results in the right end result. By
(locally) removing all v1.* tags, and running the release, a correct CHANGELOG
is created. Likewise, on the master/v1 branch, removing v2.* tags prior to
bumping does not appear to have any adverse effects.

I would be thrilled for someone to point out the option(s) that I missed to do
this more elegantly, but for now this seems to work.

I also took the liberty of re-generating the v2 CHANGELOG for the previous
releases using this fix, to show what the correct output should look like.

I will backport the changes to bump.js to master once this has been shipped.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The CHANGELOG for the v2 releases has been inaccurate, only showing a fraction
of the changes and mixing v1 and v2 releases side by side.

The issue appears to be how `conventional-changelog` handles interleaving
changes across major versions on separate branches. After digging into the
internals of conventional-changelog and standard-release a bit, I don't see a
supported way to achieve our desired outcome.

However, I did come up with a hack that results in the right end result. By
(locally) removing all v1.* tags, and running the release, a correct CHANGELOG
is created. Likewise, on the master/v1 branch, removing v2.* tags prior to
bumping does not appear to have any adverse effects.

I would be thrilled for someone to point out the option(s) that I missed to do
this more elegantly, but for now this seems to work.

I also took the liberty of re-generating the v2 CHANGELOG for the previous
releases using this fix, to show what the correct output should look like.

I will backport the changes to bump.js to master once this has been shipped.
@njlynch njlynch requested a review from a team February 12, 2021 15:49
@njlynch njlynch self-assigned this Feb 12, 2021
@gitpod-io
Copy link

gitpod-io bot commented Feb 12, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 12, 2021
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

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

Okay with these Hax To The Max but my mind is more and more settling on ditching conventional-whatever and reimplementing it ourselves in 1/5th of the code and with more flexibility.

@mergify
Copy link
Contributor

mergify bot commented Feb 15, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 7eec23c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Feb 15, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 5ae60bd into v2-main Feb 15, 2021
@mergify mergify bot deleted the njlynch/v2-fixed-changelog branch February 15, 2021 10:34
njlynch added a commit that referenced this pull request Feb 16, 2021
See #13019 for the original fix, which was committed to the v2-main branch.
This backports the change to the master/v1 branch.
mergify bot pushed a commit that referenced this pull request Feb 16, 2021
See #13019 for the original fix, which was committed to the v2-main branch.
This backports the change to the master/v1 branch.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
NovakGu pushed a commit to NovakGu/aws-cdk that referenced this pull request Feb 18, 2021
See aws#13019 for the original fix, which was committed to the v2-main branch.
This backports the change to the master/v1 branch.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb pushed a commit that referenced this pull request Feb 22, 2021
See #13019 for the original fix, which was committed to the v2-main branch.
This backports the change to the master/v1 branch.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants