celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

feat(cmd): match upcoming node version with API

Open vgonkivs opened this issue 1 year ago • 14 comments

Resolves https://github.com/celestiaorg/celestia-node/issues/2549

docgen cmd moved to the root celestia cmd folder, so it will be a part of the c-node binary to get the correct Semantic version.

vgonkivs avatar Apr 18 '24 14:04 vgonkivs

Снимок экрана 2024-04-18 в 17 42 48

vgonkivs avatar Apr 18 '24 14:04 vgonkivs

will this PR make it possible to generate the spec json file on releases? to be stored as artifacts on the release as suggested in https://github.com/celestiaorg/celestia-node/issues/2611?

jcstein avatar Apr 18 '24 20:04 jcstein

imagefromabove

it looks like this just outputs the version info? but not the actual api specs? am i missing something here?

jcstein avatar Apr 18 '24 20:04 jcstein

flagging that I do not think this PR should be merged. it (1) makes it impossible to generate rpc docs, which is counterproductive (2) introduces celestia docgen which outputs the description of the docs with the api version, which is sort of productive, except for all the missing api docs that should come along with this spec generation

jcstein avatar Apr 18 '24 20:04 jcstein

Let me fix the spec generation. Sorry, did not test it properly

vgonkivs avatar Apr 18 '24 20:04 vgonkivs

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 44.77%. Comparing base (2469e7a) to head (b886feb). Report is 42 commits behind head on main.

Files Patch % Lines
cmd/celestia/docgen.go 0.00% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3318      +/-   ##
==========================================
- Coverage   44.83%   44.77%   -0.06%     
==========================================
  Files         265      273       +8     
  Lines       14620    15253     +633     
==========================================
+ Hits         6555     6830     +275     
- Misses       7313     7628     +315     
- Partials      752      795      +43     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 19 '24 10:04 codecov-commenter

has this been tested?

jcstein avatar Apr 19 '24 15:04 jcstein

Yeap. I have tested it and it worked for me

vgonkivs avatar Apr 19 '24 15:04 vgonkivs

will this PR make it possible to generate the spec json file on releases? to be stored as artifacts on the release as suggested in https://github.com/celestiaorg/celestia-node/issues/2611?

thank you, and does this help accomplish generation of specs for releases in #2611 ?

jcstein avatar Apr 19 '24 15:04 jcstein

it works for me. but why do we need 2 commands to generate the spec? shouldn't celestia docgen handle this for us?

also, in the output I get when testing make openrpc-gen, there is still --> Generating OpenRPC spec which will need to be filtered out to handle #2611

jcstein avatar Apr 19 '24 15:04 jcstein

will this PR make it possible to generate the spec json file on releases? to be stored as artifacts on the release as suggested in #2611?

thank you, and does this help accomplish generation of specs for releases in #2611 ?

I will do that next in a separate PR @jcstein

ramin avatar Apr 19 '24 15:04 ramin

I understand that. I'm trying to understand if it helps accomplish that goal, or of it is going to add more work, that is all

jcstein avatar Apr 19 '24 15:04 jcstein

my only feedback would be that the celestia docgen command is a little misleading, as it doesn't actually generate the docs. the command to do that is make openrpc-gen which AFAIU uses celestia docgen?

jcstein avatar Apr 25 '24 20:04 jcstein

my only feedback would be that the celestia docgen command is a little misleading, as it doesn't actually generate the docs. the command to do that is make openrpc-gen which AFAIU uses celestia docgen?

make openrpc-gen calls docgen under the hood, passing all available modules. so to make it work, you should call celestia docgen da fraud share etc....

But I'd remove the parameters and generate docs for all modules.

wdyt @jcstein @distractedm1nd , @renaynay, @Wondertan

vgonkivs avatar Apr 29 '24 13:04 vgonkivs