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(gnodev): skip failing tx instead of raising an error #1456

Merged
merged 6 commits into from
Jan 9, 2024

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Dec 18, 2023

fix #1447

Skip failing TX instead of raising an error.
Also adjust/add some comments in dev node package for better understanding and readability

cc @harry-hov

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>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Copy link
Contributor

@deelawn deelawn left a comment

Choose a reason for hiding this comment

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

Makes sense to me 👍

contribs/gnodev/main.go Show resolved Hide resolved
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b525e8b) 56.08% compared to head (e4606c6) 56.10%.
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1456      +/-   ##
==========================================
+ Coverage   56.08%   56.10%   +0.02%     
==========================================
  Files         432      432              
  Lines       66000    66727     +727     
==========================================
+ Hits        37016    37440     +424     
- Misses      26095    26366     +271     
- Partials     2889     2921      +32     
Flag Coverage Δ
go-1.21.x ∅ <ø> (∅)
misc ∅ <ø> (∅)
misc-_test.genstd ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@harry-hov harry-hov self-requested a review January 8, 2024 15:52
Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

The changes look good so approving.

I'm wondering though: should an end-user not clearly be able to see any error publishing the specific packages they're publishing?

I get what Hariom is saying in the issue, however if I'm working on a realm and I introduce a bug, I would want gnodev to prominently and clearly tell me what the generated error/panic while publishing the package is.

@harry-hov
Copy link
Contributor

harry-hov commented Jan 9, 2024

Not sure if my expectations are realistic or not, but I expect output something like:

Case 1: When p/helloworld does not imports avl

$ ~/De/w/gno/examples ❯ gnodev gno.land/r/demo/helloworld
Node            | Listener: tcp://0.0.0.0:36657
[...]
Node            | Loading packages...
Node            | Failed to load `gno.land/p/demo/avl`...
                       - cannot use 0 (untyped int constant) as *Tree value in return statement
Node            | Successfully loaded `gno.land/r/demo/helloworld`...      
Node            | [DONE - with 1 error]

In this case, I can continue working on r/helloworld without need to worry about fixing p/avl

Case 1: When p/helloworld imports avl

$ ~/De/w/gno/examples ❯ gnodev gno.land/r/demo/helloworld
Node            | Listener: tcp://0.0.0.0:36657
[...]
Node            | Loading packages...
Node            | Failed to load `gno.land/p/demo/avl`...
                       - cannot use 0 (untyped int constant) as *Tree value in return statement
Node            | Failed to load `gno.land/r/demo/helloworld`...    
                       - Missing package gno.land/p/demo/avl
Node            | [DONE - with 2 errors]

In this case, since i imports p/avl i need to fix it first before continue working on r/helloworld.


We should also add -verbose incase someone wants to see the detailed error msg.

@thehowl thehowl changed the title fix(gnodev): skip failing tx instead of rising an error fix(gnodev): skip failing tx instead of raising an error Jan 9, 2024
Co-authored-by: Hariom Verma <hariom18599@gmail.com>
@gfanton
Copy link
Member Author

gfanton commented Jan 9, 2024

@harry-hov @thehowl it should be possible, I have an idea on how we can implement this. but I will do this in another PR

@gfanton gfanton merged commit 568a087 into gnolang:master Jan 9, 2024
183 checks passed
@gfanton gfanton deleted the fix/dev-skip-failing-tx branch January 9, 2024 11:50
gfanton added a commit to moul/gno that referenced this pull request Jan 18, 2024
Co-authored-by: Hariom Verma <hariom18599@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

contribs/gnodev: start node even if the package fails to publish
4 participants