Skip to content

Commit

Permalink
chore: start using unclog (#2605)
Browse files Browse the repository at this point in the history
* add unrelease changelog entries to .changelog

* run unclog build -a

* rename changelog categories

* add tests as a component

* update workflow doc
  • Loading branch information
mpoke authored and sainoe committed Jun 23, 2023
1 parent 947842a commit 79d813c
Show file tree
Hide file tree
Showing 11 changed files with 664 additions and 49 deletions.
20 changes: 20 additions & 0 deletions .changelog/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
project_url = "https://github.com/cosmos/gaia"

# Settings related to components/sub-modules. Only relevant if you make use of
# components/sub-modules.
[components]

# The title to use for the section of entries not relating to a specific
# component.
general_entries_title = "General"

# The number of spaces to inject before each component-related entry.
entry_indent = 2

# The components themselves. Each component has a name (used when rendered
# to Markdown) and a path relative to the project folder (i.e. relative to
# the parent of the `.changelog` folder).
[components.all]
globalfee = { name = "GlobalFee", path = "x/globalfee" }
tests = { name = "Tests", path = "tests" }
docs = { name = "Documentation", path = "docs" }
556 changes: 556 additions & 0 deletions .changelog/epilogue.md

Large diffs are not rendered by default.

Empty file added .changelog/unreleased/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions .changelog/unreleased/api-breaking/globalfee/2424-params.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Add `bypass-min-fee-msg-types` and `maxTotalBypassMinFeeMsgGagUsage` to
globalfee params ([\#2424](https://github.com/cosmos/gaia/pull/2424))
3 changes: 3 additions & 0 deletions .changelog/unreleased/dependencies/2554-bump-ibc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Bump [ibc-go](https://github.com/cosmos/ibc-go) to
[v4.4.2](https://github.com/cosmos/ibc-go/releases/tag/v4.4.2)
([\#2554](https://github.com/cosmos/gaia/pull/2554))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Create the upgrade handler and params migration for the new Gloabal Fee module
parameters introduced in [#2424](https://github.com/cosmos/gaia/pull/2424)
([\#2352](https://github.com/cosmos/gaia/pull/2352))
2 changes: 2 additions & 0 deletions .changelog/unreleased/state-breaking/globalfee/2424-params.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Add `bypass-min-fee-msg-types` and `maxTotalBypassMinFeeMsgGagUsage` to
globalfee params ([\#2424](https://github.com/cosmos/gaia/pull/2424))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Update Global Fee's AnteHandler to check tx fees against the network min gas
prices in DeliverTx mode ([\#2447](https://github.com/cosmos/gaia/pull/2447))
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE/production.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
The production pull request template is for types feat, fix, or refactor.
The production pull request template is for types feat, fix, deps, or refactor.
-->

## Description
Expand All @@ -26,7 +26,7 @@ I have...
* [ ] Provided a link to the relevant issue or specification
* [ ] Followed the guidelines for [building SDK modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules)
* [ ] Included the necessary unit and integration [tests](https://github.com/cosmos/gaia/blob/main/CONTRIBUTING.md#testing)
* [ ] Added a changelog entry to `CHANGELOG.md`
* [ ] Added a changelog entry in `.changelog` (for details, see [contributing guidelines](../../CONTRIBUTING.md#changelog))
* [ ] Included comments for [documenting Go code](https://blog.golang.org/godoc)
* [ ] Updated the relevant documentation or specification
* [ ] Reviewed "Files changed" and left comments if necessary <!-- relevant if the changes are not obvious -->
Expand Down
65 changes: 20 additions & 45 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,29 @@
<!--
Guiding Principles:
# CHANGELOG

Changelogs are for humans, not machines.
There should be an entry for every single version.
The same types of changes should be grouped.
Versions and sections should be linkable.
The latest version comes first.
The release date of each version is displayed.
Mention whether you follow Semantic Versioning.
## Unreleased

Usage:
### API BREAKING

Change log entries are to be added to the Unreleased section under the
appropriate stanza (see below). Each entry should ideally include a tag and
the Github issue reference in the following format:
- [GlobalFee](x/globalfee)
- Add `bypass-min-fee-msg-types` and `maxTotalBypassMinFeeMsgGagUsage` to
globalfee params ([\#2424](https://github.com/cosmos/gaia/pull/2424))

* (<tag>) \#<issue-number> message
### DEPENDENCIES

The issue numbers will later be link-ified during the release process so you do
not have to worry about including a link manually, but you can if you wish.
- Bump [ibc-go](https://github.com/cosmos/ibc-go) to
[v4.4.2](https://github.com/cosmos/ibc-go/releases/tag/v4.4.2)
([\#2554](https://github.com/cosmos/gaia/pull/2554))

Types of changes (Stanzas):
### STATE BREAKING

"Features" for new features.
"Improvements" for changes in existing functionality.
"Deprecated" for soon-to-be removed features.
"Bug Fixes" for any bug fixes.
"Client Breaking" for breaking CLI commands and REST routes.
"State Machine Breaking" for breaking the AppState
Ref: https://keepachangelog.com/en/1.0.0/
-->

# Changelog

## [Unreleased]

* (docs) [#2599](https://github.com/cosmos/gaia/pull/2599) Updating the quickstart, joining mainnet & upgrade docs for v10
* (docs) [#2560](https://github.com/cosmos/gaia/pull/2560) Updates for v9.1.1 and re-arranging roadmap docs
* (deps) [#2554](https://github.com/cosmos/gaia/pull/2554) Bump [ibc-go](https://github.com/cosmos/ibc-go) to [v4.4.2](https://github.com/cosmos/ibc-go/releases/tag/v4.4.2).

### Improvements
* (test) [#2440](https://github.com/cosmos/gaia/pull/2440) Add vulncheck to nightly builds
* (gaia) [#2442](https://github.com/cosmos/gaia/pull/2442) Bump [Interchain-Security](https://github.com/cosmos/interchain-security) to [v1.1.1](https://github.com/cosmos/interchain-security/tree/v1.1.1).

### State Machine Breaking

* (feat!) [#2424](https://github.com/cosmos/gaia/pull/2424) Add `bypass-min-fee-msg-types` and `maxTotalBypassMinFeeMsgGagUsage` to globalfee params. Note that this change is both state breaking and API breaking. The previous API endpoint was "/gaia/globalfee/v1beta1/minimum_gas_prices," and the new API endpoint is "/gaia/globalfee/v1beta1/params."
* (feat!) [#2352](https://github.com/cosmos/gaia/pull/2352) Create the upgrade handler and params migration for the new Gloabal Fee module parameters introduced in [#2424](https://github.com/cosmos/gaia/pull/2424).
Update the CI upgrade tests from v9 to the v10 and check that the parameters are successfully migrated.
* (feat!) [#2447](https://github.com/cosmos/gaia/pull/2447) Update Global Fee's AnteHandler to check tx fees against the network min gas prices in DeliverTx mode.
- [GlobalFee](x/globalfee)
- Create the upgrade handler and params migration for the new Gloabal Fee module
parameters introduced in [#2424](https://github.com/cosmos/gaia/pull/2424)
([\#2352](https://github.com/cosmos/gaia/pull/2352))
- Add `bypass-min-fee-msg-types` and `maxTotalBypassMinFeeMsgGagUsage` to
globalfee params ([\#2424](https://github.com/cosmos/gaia/pull/2424))
- Update Global Fee's AnteHandler to check tx fees against the network min gas
prices in DeliverTx mode ([\#2447](https://github.com/cosmos/gaia/pull/2447))

## [v10.0.1] 2023-05-25

Expand Down Expand Up @@ -550,6 +524,7 @@ See the [Tendermint v0.34.7 SDK changelog](https://github.com/tendermint/tenderm

<!-- Release links -->

[v10.0.1]: https://github.com/cosmos/gaia/releases/tag/v10.0.1
[v10.0.0]: https://github.com/cosmos/gaia/releases/tag/v10.0.0
[v9.1.1]: https://github.com/cosmos/gaia/releases/tag/v9.1.1
[v9.1.0]: https://github.com/cosmos/gaia/releases/tag/v9.1.0
Expand Down
56 changes: 54 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [Pull Request Templates](#pull-request-templates)
- [Requesting Reviews](#requesting-reviews)
- [Updating Documentation](#updating-documentation)
- [Changelog](#changelog)
- [Dependencies](#dependencies)
- [Protobuf](#protobuf)
- [Branching Model and Release](#branching-model-and-release)
Expand Down Expand Up @@ -173,7 +174,6 @@ Then:
Draft PRs also help the stewarding team provide early feedback and ensure the work is in the right direction.
2. When the code is complete, change your PR from `Draft` to `Ready for Review`.
3. Go through the actions for each checkbox present in the PR template description. The PR actions are automatically provided for each new PR.
4. Be sure to include a relevant changelog entry in the `Unreleased` section of `CHANGELOG.md` (see file for log format). The entry should be on top of all others changes in the section.
PRs must have a category prefix that is based on the type of changes being made (for example, `fix`, `feat`,
`refactor`, `docs`, and so on). The [type](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
Expand All @@ -190,7 +190,7 @@ Pull requests are merged automatically using [`A:automerge` action](https://merg
There are three PR templates. The [default template](./.github/PULL_REQUEST_TEMPLATE.md) contains links to the three templates. Please go the the `Preview` tab and select the appropriate sub-template:
- The [production template](./.github/PULL_REQUEST_TEMPLATE/production.md) is for types `fix`, `feat`, and `refactor`.
- The [production template](./.github/PULL_REQUEST_TEMPLATE/production.md) is for types `fix`, `feat`, `deps`, and `refactor`.
- The [docs template](./.github/PULL_REQUEST_TEMPLATE/docs.md) is for documentation changes.
- The [other template](./.github/PULL_REQUEST_TEMPLATE/other.md) is for changes that do not affect production code.
Expand Down Expand Up @@ -224,6 +224,58 @@ items. In addition, use the following review explanations:
If you open a PR in Gaia, it is mandatory to update the relevant documentation in `/docs`.
### Changelog
To manage and generate our changelog, we currently use [unclog](https://github.com/informalsystems/unclog).
Every PR with types `fix`, `feat`, `deps`, and `refactor` should include a file
`.changelog/unreleased/${section}/[${component}/]${pr-number}-${short-description}.md`,
where:
- `section` is one of
`dependencies`, `improvements`, `features`, `bug-fixes`, `state-breaking`, `api-breaking`,
and _**if multiple apply, create multiple files**_;
- `pr-number` is the PR number;
- `short-description` is a short (4 to 6 word), hyphen separated description of the change;
- `component` is used for changes that affect one of the components defined in the [config](.changelog/config.toml), e.g., `tests`, `globalfee`.
For examples, see the [.changelog](.changelog) folder.
Use `unclog` to add a changelog entry in `.changelog` (check the [requirements](https://github.com/informalsystems/unclog#requirements) first):
```bash
# add a general entry
unclog add
-i "${pr-number}-${short-description}"
-p "${pr-number}"
-s "${section}"
-m "${description}"

# add a entry to a component
unclog add
-i "${pr-number}-${short-description}"
-p "${pr-number}"
-c "${component}"
-s "${section}"
-m "${description}"
```
where `${description}` is a detailed description of the changelog entry.
For example,
```bash
# add an entry for bumping IBC to v4.4.2
unclog add -i "2554-bump-ibc" -p 2554 -s "dependencies" -m "Bump [ibc-go](https://github.com/cosmos/ibc-go) to [v4.4.2](https://github.com/cosmos/ibc-go/releases/tag/v4.4.2)"

# add an entry for changing the global fee module;
# note that the entry is added to both state-breaking and api-breaking sections
unclog add -i "2424-params" -p 2424 -c globalfee -s "state-breaking" -m "Add \`bypass-min-fee-msg-types\` and \`maxTotalBypassMinFeeMsgGagUsage\` to globalfee params"
unclog add -i "2424-params" -p 2424 -c globalfee -s "api-breaking" -m "Add \`bypass-min-fee-msg-types\` and \`maxTotalBypassMinFeeMsgGagUsage\` to globalfee params"
```
**Note:** Changelog entries should answer the question: "what is important about this
change for users to know?" or "what problem does this solve for users?". It
should not simply be a reiteration of the title of the associated PR, unless the
title of the PR _very_ clearly explains the benefit of a change to a user.
## Dependencies
We use [Go Modules](https://github.com/golang/go/wiki/Modules) to manage
Expand Down

0 comments on commit 79d813c

Please sign in to comment.