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

fix: improve error message output in integration tests #1349

Merged
merged 6 commits into from
Nov 16, 2023

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Nov 9, 2023

This PR improves error output in integration tests by using more verbose format.

gnokey will now display the full stack trace log, including the underlying error, when an error occurs, instead of only presenting the top-level error.

This enhancement will assist in better debugging what's happening without the need to delve directly into gnoland logs.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton changed the title fix: improve gnokey error fix: improve gnokey error message Nov 9, 2023
@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Nov 9, 2023
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7d66398) 55.94% compared to head (3b22cd9) 55.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1349      +/-   ##
==========================================
- Coverage   55.94%   55.59%   -0.35%     
==========================================
  Files         420      420              
  Lines       65415    65413       -2     
==========================================
- Hits        36596    36369     -227     
- Misses      25961    26197     +236     
+ Partials     2858     2847      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@moul
Copy link
Member

moul commented Nov 9, 2023

I prefer the new output 👍

Can you check how much we could improve the package/errors instead of avoiding using it?

@gfanton
Copy link
Member Author

gfanton commented Nov 10, 2023

@moul sure ! Let me check

…ead of wrap"

This reverts commit ce31780.

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@github-actions github-actions bot added 📦 ⛰️ gno.land Issues or PRs gno.land package related and removed 📦 🌐 tendermint v2 Issues or PRs tm2 related labels Nov 14, 2023
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Nov 15, 2023
@gfanton gfanton marked this pull request as ready for review November 15, 2023 10:01
@gfanton gfanton requested a review from a team as a code owner November 15, 2023 10:01
@gfanton
Copy link
Member Author

gfanton commented Nov 15, 2023

I've reverted my changes and will simply use "%+v" instead of "%v" for the integration tests. It took me a while to notice that we are using a custom format for our errors. For now, this change is sufficient as my main goal was to improve the error output of the gnokey command within the integration tests.

That said, I believe there is room for improvement in error handling, as we should not need to use this kind of format to obtain the source error. Do you think we can update our errors package to use a more recent format, wrapping %w, to improve error readability? (in a separate pull request)

@gfanton gfanton changed the title fix: improve gnokey error message fix: improve error message output in integration tests Nov 15, 2023
@thehowl thehowl merged commit 1126d9f into gnolang:master Nov 16, 2023
187 of 188 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: No status
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants