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

feat: add NewErrorAcknowledgementWithCodespace to allow codespaces in ack errors #5788

Merged
merged 7 commits into from
Feb 14, 2024

Conversation

DimitrisJim
Copy link
Contributor

@DimitrisJim DimitrisJim commented Jan 31, 2024

Description

closes: #5736

Commit Message / Changelog Entry

feat: add NewErrorAcknowledgementWithCodespace to allow codespaces in ack errors

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.

This new constructor comes with an implicit requirement that people do not change a given err's codespace between patch/non-state machine breaking versions.
The codespace is inserted into the returned error to assist in debugging since the error code on its own is insufficient to debug the source of the error.
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 for quickly solving this one, @DimitrisJim.

@DimitrisJim
Copy link
Contributor Author

would be nice to backport this to at least the v8 line? I see that's where wasmd currently is.

@crodriguezvega
Copy link
Contributor

would be nice to backport this to at least the v8 line? I see that's where wasmd currently is.

Yes, we can. But this change is state-machine breaking, right? So we would need a new minor release branch.

@DimitrisJim
Copy link
Contributor Author

But this change is state-machine breaking, right?

shouldn't be for ibc-go considering we don't use it anywhere atm, yea? This just introduces a function. Maybe we should use it in order to output ibc in the error but that can be left for another discussion and would def be state machine breaking.

Would assume anyone using it would be cognizant that changing from NewAck to NewAckWithCodespace would be state machine breaking, though. (Its docstring definitely implies that, maybe we can emphasize it elsewhere?)

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Nice one!

@colin-axner
Copy link
Contributor

colin-axner commented Feb 12, 2024

Backport to v8.2 since it has an api addition. Also if it is used, then it becomes state machine breaking

@DimitrisJim
Copy link
Contributor Author

as we also discussed in call, looked into semver and API additions do indeed require a minor bump (see summary for MINOR here. Don't think our docs require updating since they explicitly mention we follow semver with modifications to accommodate state machine breaking changes.

@DimitrisJim DimitrisJim merged commit e42d0d2 into main Feb 14, 2024
66 checks passed
@DimitrisJim DimitrisJim deleted the jim/5736-new-error-ack branch February 14, 2024 13:43
mergify bot pushed a commit that referenced this pull request Feb 14, 2024
This new constructor comes with an implicit requirement that people do not change a given err's codespace between patch/non-state machine breaking versions.
The codespace is inserted into the returned error to assist in debugging since the error code on its own is insufficient to debug the source of the error.

Co-authored-by: Cian Hatton <[email protected]>
(cherry picked from commit e42d0d2)
crodriguezvega added a commit that referenced this pull request Feb 14, 2024
… ack errors (backport #5788) (#5842)

* feat: Add NewErrorAcknowledgementWithCodespace. (#5788)

This new constructor comes with an implicit requirement that people do not change a given err's codespace between patch/non-state machine breaking versions.
The codespace is inserted into the returned error to assist in debugging since the error code on its own is insufficient to debug the source of the error.

Co-authored-by: Cian Hatton <[email protected]>
(cherry picked from commit e42d0d2)

* add changelog

---------

Co-authored-by: DimitrisJim <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
mergify bot pushed a commit that referenced this pull request Apr 8, 2024
This new constructor comes with an implicit requirement that people do not change a given err's codespace between patch/non-state machine breaking versions.
The codespace is inserted into the returned error to assist in debugging since the error code on its own is insufficient to debug the source of the error.

Co-authored-by: Cian Hatton <[email protected]>
(cherry picked from commit e42d0d2)
damiannolan added a commit that referenced this pull request Apr 8, 2024
This new constructor comes with an implicit requirement that people do not change a given err's codespace between patch/non-state machine breaking versions.
The codespace is inserted into the returned error to assist in debugging since the error code on its own is insufficient to debug the source of the error.

Co-authored-by: Cian Hatton <[email protected]>
(cherry picked from commit e42d0d2)

Co-authored-by: DimitrisJim <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add codespace to NewErrorAcknowledgement
4 participants