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

Wrap error returned from upgrade ACK application callbacks #5695

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Jan 23, 2024

Description

closes: #5694

This feels a bit dirty due to having the fetch the channel just for the upgrade sequence.

An alternative that would technically work is wrapping the error in a non upgrade error. As the direct cast would fail and it would default to using the current channel upgrade sequence. But this feels a bit worse.


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.

Copy link
Member

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Think getting the channel is better than the alternative as well.

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

Thanks, @chatton! If you thinks it's worth, maybe we could add a test where the callback returns an UpgradeError with a crazy upgrade sequence and then we verify that the error receipt written contains the channel's sequence.

@chatton
Copy link
Contributor Author

chatton commented Jan 24, 2024

Great suggestion @crodriguezvega , added a test case

@chatton chatton merged commit b59f6b0 into main Jan 24, 2024
60 of 62 checks passed
@chatton chatton deleted the cian/issue#5694-wrap-error-returned-from-ack-application-callbacks branch January 24, 2024 09:54
mergify bot pushed a commit that referenced this pull request Jan 24, 2024
damiannolan added a commit that referenced this pull request Jan 24, 2024
…5699)

(cherry picked from commit b59f6b0)

Co-authored-by: Cian Hatton <cian@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap error returned from ACK application callbacks
3 participants