Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat!: support debug trace QueryResult (backport #9576) #11148

Merged

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Feb 9, 2022

Description

backport #9576


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@@ -95,8 +95,8 @@ func ResponseDeliverTxWithEvents(err error, gw, gu uint64, events []abci.Event,

// QueryResult returns a ResponseQuery from an error. It will try to parse ABCI
// info from the error.
func QueryResult(err error) abci.ResponseQuery {
space, code, log := ABCIInfo(err, false)
func QueryResult(err error, debug bool) abci.ResponseQuery {
Copy link
Contributor

Choose a reason for hiding this comment

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

We cannot backport this function, because it's API-breaking.

What we can do is create a new function QueryResultWithDebug, does that work for you @yihuang ?

Copy link
Contributor

Choose a reason for hiding this comment

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

ACK -- create a QueryResultWithDebug 👍

Copy link
Collaborator Author

@yihuang yihuang Feb 10, 2022

Choose a reason for hiding this comment

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

thanks for the suggestions, it's changed now.

@yihuang yihuang force-pushed the v0.45.1-debug-query-result branch from 9681d0e to 7345f7e Compare February 10, 2022 01:27
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

LGTM

Update types/errors/abci.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
@yihuang yihuang force-pushed the v0.45.1-debug-query-result branch from 6a1fdf9 to 2cdb638 Compare February 14, 2022 14:33
Copy link
Contributor

@likhita-809 likhita-809 left a comment

Choose a reason for hiding this comment

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

lgtm

@yihuang
Copy link
Collaborator Author

yihuang commented Feb 18, 2022

shall we merge this to 0.45.x?

@tac0turtle tac0turtle merged commit 7f949c0 into cosmos:release/v0.45.x Feb 18, 2022
@yihuang yihuang deleted the v0.45.1-debug-query-result branch February 18, 2022 08:59
@faddat faddat mentioned this pull request Feb 28, 2022
8 tasks
zakir-code pushed a commit to PundiAI/cosmos-sdk that referenced this pull request Apr 14, 2022
Update types/errors/abci.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
JimLarson pushed a commit to agoric-labs/cosmos-sdk that referenced this pull request Jul 7, 2022
Update types/errors/abci.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
randy75828 pushed a commit to Switcheo/cosmos-sdk that referenced this pull request Aug 10, 2022
Update types/errors/abci.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
randy75828 pushed a commit to Switcheo/cosmos-sdk that referenced this pull request Aug 10, 2022
Update types/errors/abci.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
p0mvn pushed a commit to osmosis-labs/cosmos-sdk that referenced this pull request Oct 12, 2022
p0mvn added a commit to osmosis-labs/cosmos-sdk that referenced this pull request Oct 13, 2022
Co-authored-by: yihuang <huang@crypto.com>
mergify bot pushed a commit to osmosis-labs/cosmos-sdk that referenced this pull request Oct 13, 2022
Co-authored-by: yihuang <huang@crypto.com>
(cherry picked from commit 4b35574)
p0mvn added a commit to osmosis-labs/cosmos-sdk that referenced this pull request Oct 13, 2022
Co-authored-by: yihuang <huang@crypto.com>
(cherry picked from commit 4b35574)

Co-authored-by: Roman <roman@osmosis.team>
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this pull request Sep 28, 2024
Update types/errors/abci.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants