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: start using unclog #2605

Merged
merged 5 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this something you have to write manually for every module or is it a one-off configuration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we want to use components, we need to add this for every entry. We can decide to not use that though. I think that we don't have so many modules for this to be a pain point.

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.
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))
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 @@ -547,6 +521,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`,
Copy link
Contributor

Choose a reason for hiding this comment

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

What if you have an API breaking improvement? Where does it go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both. Create two entries.

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