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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for go-changelog automations #1947

Merged
merged 4 commits into from
Feb 28, 2023
Merged

Conversation

wilkermichael
Copy link
Contributor

@wilkermichael wilkermichael commented Feb 23, 2023

I always add details to my commits and there isn't any crossover, so reviewing commit by commit is usually the best way to review my PRs

Changes proposed in this PR:

This PR adds go-changelog support to the Consul-K8s repo. This will be a new way of managing changelog items throughout the release cycle.

  • added go-changelog required templates and directories
  • added pipeline checks for unintended missing changelogs
    • added a label pr/no-changelog for ignoring missing changelogs if necessary otherwise a changelog is now required
  • added contribution instructions for adding changelogs using the go-changelog tool
  • modified prepare-release to automatically run go-changelog and add the changes to the CHANGELOG.MD file

How I've tested this PR:

  1. Verified that pipeline fails when missing a changelog file

image

  1. Temporarily commited a changelog file with a combination of feature and bug entries, verified pipeline now passes:

image

  1. Ran the following with with LAST_RELEASE_GIT_TAG being set to v1.0.4 and it generated a valid changelog:
 $ changelog-build -last-release ${LAST_RELEASE_GIT_TAG} -entries-dir .changelog/ -changelog-template .changelog/changelog.tmpl -note-template .changelog/note.tmpl -this-release $(git rev-parse HEAD)

FEATURES:

* cli: Transparent Proxy - Service mesh visualization updates [[GH-1947](https://github.com/hashicorp/consul/issues/1947)]
* control-plane: Transparent Proxy - Service mesh visualization updates [[GH-1947](https://github.com/hashicorp/consul/issues/1947)]
* helm: Transparent Proxy - Service mesh visualization updates [[GH-1947](https://github.com/hashicorp/consul/issues/1947)]

BUG FIXES:

* cli: Transparent Proxy - Service mesh visualization updates [[GH-1947](https://github.com/hashicorp/consul/issues/1947)]
* control-plane: Transparent Proxy - Service mesh visualization updates [[GH-1947](https://github.com/hashicorp/consul/issues/1947)]
* helm: Transparent Proxy - Service mesh visualization updates [[GH-1947](https://github.com/hashicorp/consul/issues/1947)]
  1. I ran make prepare-release and confirmed that it adds the changes with the correct version and date to CHANGELOG.MD

How I expect reviewers to test this PR:

馃憖

Checklist:

  • [n/a] Tests added
  • [n/a] CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

@wilkermichael wilkermichael force-pushed the add-go-changelog branch 3 times, most recently from 0ccd45d to ba13e72 Compare February 23, 2023 19:58
@wilkermichael wilkermichael added the pr/no-changelog PR does not need a corresponding .changelog entry label Feb 23, 2023
@wilkermichael wilkermichael requested review from a team, curtbushko, hashi-derek, david-yu and thisisnotashwin and removed request for a team and curtbushko February 23, 2023 20:07
@wilkermichael wilkermichael marked this pull request as ready for review February 23, 2023 20:08
@wilkermichael wilkermichael changed the title Added some go changelog automations Added support for go-changelog automations Feb 23, 2023
@wilkermichael wilkermichael added backport/0.49.x 0.49.x release branches backport/1.0.x backport/1.1.x Backport to release/1.1.x branch labels Feb 23, 2023
@wilkermichael
Copy link
Contributor Author

Regardless of state, I won't merge this until 1.1 is released

Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

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

this looks great. we should undo the indexing change in markdown though

CONTRIBUTING.md Outdated
@@ -17,13 +17,14 @@
1. [Updating consul-helm](#updating-consul-helm)
1. [Testing a new CRD](#testing-a-new-crd)
1. [Update Consul K8s acceptance tests](#update-consul-k8s-acceptance-tests)
1. [Adding a new ACL Token](#adding-a-new-acl-token)
1. [Testing the Helm chart](#testing-the-helm-chart)
3. [Adding a new ACL Token](#adding-a-new-acl-token)
Copy link
Contributor

Choose a reason for hiding this comment

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

we should keep these as is. markdown does the right things with the indexing if you keep them all at "1"

Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

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

馃挜

- added templates for go-changelog, pretty much copied from Consul
- added a checker for missing changelog entries
- Prepare release now requires an additional LAST_RELEASE_GIT_TAG environment variable required by go-changelog
- removed adding the unreleased tag to the Changelog as we will no longer be doing that. All changelog entries will be added at the time of release by the go-changelog tool
@wilkermichael
Copy link
Contributor Author

I'm merging this in without waiting for the tests to pass, nothing I've done touches production code

@wilkermichael wilkermichael merged commit 1ab2cac into main Feb 28, 2023
@wilkermichael wilkermichael deleted the add-go-changelog branch February 28, 2023 19:26
wilkermichael added a commit that referenced this pull request Feb 28, 2023
* Added some go-changelog automations
- added templates for go-changelog, pretty much copied from Consul
- added a checker for missing changelog entries

* added contributing doc information on new changelog

* update prepare release to update the changelog
- Prepare release now requires an additional LAST_RELEASE_GIT_TAG environment variable required by go-changelog
- removed adding the unreleased tag to the Changelog as we will no longer be doing that. All changelog entries will be added at the time of release by the go-changelog tool
absolutelightning pushed a commit that referenced this pull request Aug 4, 2023
* Added some go-changelog automations
- added templates for go-changelog, pretty much copied from Consul
- added a checker for missing changelog entries

* added contributing doc information on new changelog

* update prepare release to update the changelog
- Prepare release now requires an additional LAST_RELEASE_GIT_TAG environment variable required by go-changelog
- removed adding the unreleased tag to the Changelog as we will no longer be doing that. All changelog entries will be added at the time of release by the go-changelog tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/0.49.x 0.49.x release branches backport/1.0.x backport/1.1.x Backport to release/1.1.x branch pr/no-changelog PR does not need a corresponding .changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants