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: remove upgrade prefix from upgrade event attributes #5603

Merged

Conversation

crodriguezvega
Copy link
Contributor

Description

I will open a PR to hermes to do the changes there as well. I expect upgrade e2e tests might fail in the meantime.

closes: #3666

Commit Message / Changelog Entry

type: commit message

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@@ -0,0 +1,35 @@
---
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this doc to drop a note of API breaking changes that this PR might include. I will also add later on some other notes for other API-breaking changes that have already been merged to main.

Copy link
Member

Choose a reason for hiding this comment

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

Can unbreak the event key changes in the backport! :)

AttributeKeyPortID = "port_id"
AttributeKeyChannelID = "channel_id"
AttributeKeyChannelState = "channel_state"
AttributeVersion = "version"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed this one to stay consistent with the format of starting with AttributeKey.

Copy link
Contributor

@DimitrisJim DimitrisJim Jan 15, 2024

Choose a reason for hiding this comment

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

was this added in channel upgradability? Can't remember 😅 If not, wouldn't this be API breaking and as such should not be backported to 8.1?

Copy link
Contributor Author

@crodriguezvega crodriguezvega Jan 15, 2024

Choose a reason for hiding this comment

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

It's already used in emitChannelOpenIntEvent and emitChannelOpenTryEvent, so yes, it would be API breaking. That's why I added a note to the migration docs.

AttributeKeyTimeout = "timeout"

// upgrade specific keys
AttributeKeyUpgradeSequence = "sequence"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept this as ...UpgradeSequence because we already use AttributeKeySequence below for packet_sequence. I can renamed that one to AttributeKeyPacketSequence is people like that. Although then I should probably rename all the packet even attribute to start with AttributeKeyPacket....

modules/core/04-channel/types/events.go Outdated Show resolved Hide resolved
@crodriguezvega crodriguezvega marked this pull request as ready for review January 15, 2024 12:57
@crodriguezvega crodriguezvega added the priority PRs that need prompt reviews label Jan 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (5d77221) 81.22% compared to head (4272e00) 81.22%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5603   +/-   ##
=======================================
  Coverage   81.22%   81.22%           
=======================================
  Files         197      197           
  Lines       15258    15258           
=======================================
  Hits        12394    12394           
  Misses       2399     2399           
  Partials      465      465           
Files Coverage Δ
modules/core/04-channel/keeper/events.go 94.72% <85.71%> (ø)

Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

minor doc fix and a another quick Q

docs/docs/05-migrations/12-v8-to-v9.md Outdated Show resolved Hide resolved
AttributeKeyPortID = "port_id"
AttributeKeyChannelID = "channel_id"
AttributeKeyChannelState = "channel_state"
AttributeVersion = "version"
Copy link
Contributor

@DimitrisJim DimitrisJim Jan 15, 2024

Choose a reason for hiding this comment

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

was this added in channel upgradability? Can't remember 😅 If not, wouldn't this be API breaking and as such should not be backported to 8.1?

crodriguezvega and others added 2 commits January 15, 2024 15:51
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

LGTM!! 🚀

modules/core/04-channel/types/events.go Outdated Show resolved Hide resolved
@@ -0,0 +1,35 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

Can unbreak the event key changes in the backport! :)

…tribute-keys

# Conflicts:
#	modules/core/04-channel/keeper/events.go
#	modules/core/04-channel/types/events.go
#	modules/core/keeper/msg_server_test.go
@crodriguezvega crodriguezvega merged commit f3c76cd into main Jan 16, 2024
63 of 64 checks passed
@crodriguezvega crodriguezvega deleted the carlos/3666-remove-upgrade-specific-event-attribute-keys branch January 16, 2024 14:32
mergify bot pushed a commit that referenced this pull request Jan 16, 2024
* chore: remove upgrade prefix from upgrade event attributes

* add migration docs for v9

* Update docs/docs/05-migrations/12-v8-to-v9.md

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>

* rename attribute string

---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
(cherry picked from commit f3c76cd)
crodriguezvega added a commit that referenced this pull request Jan 16, 2024
…#5603) (#5627)

* chore: remove `upgrade` prefix from upgrade event attributes (#5603)

* chore: remove upgrade prefix from upgrade event attributes

* add migration docs for v9

* Update docs/docs/05-migrations/12-v8-to-v9.md

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>

* rename attribute string

---------

Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
(cherry picked from commit f3c76cd)

* chore: rm unnecessary migration doc

* revert API breaking change

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
channel-upgradability Channel upgradability feature priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove upgrade specific event attribute keys
4 participants