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

[cli]命令优化相关的建议 #547

Open
1 of 4 tasks
YiRuiLiher opened this issue Dec 15, 2022 · 9 comments
Open
1 of 4 tasks

[cli]命令优化相关的建议 #547

YiRuiLiher opened this issue Dec 15, 2022 · 9 comments
Labels
C-cli Category: cli C-triage Category: need triage community issues from community members enhancement New feature or request needs more information needs more information P2 Medium - we should get to this soon vsmgr vsmgr related issue

Comments

@YiRuiLiher
Copy link
Contributor

模块 / Components

  • venus-sector-manager
  • venus-worker
  • 工具链 / toolchains
  • 文档 / docs

版本 / Version

v0.5.0

描述 / Describe the Bug

  1. 目前的vsm中cli的一级命令仅有3个,3个中仅有util是使用频率最高的
  2. util中包含了所有的查询命令,这导致util下级的子命令太多
  3. 建议分类整理一下,部分常用的命令可以提升为一级或二级命令

日志 / Logging Information

NAME:
   venus-sector-manager - A new cli application

USAGE:
   venus-sector-manager [global options] command [command options] [arguments...]

VERSION:
   v0.5.0-beta3-prod-git.7f215b3.dirty

COMMANDS:
   mock
   daemon
   util
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --home value   (default: "~/.venus-sector-manager")
   --net value    (default: "mainnet")
   --version, -v  print the version (default: false)

重现步骤 / Repo Steps

No response

@YiRuiLiher YiRuiLiher added the bug Something isn't working label Dec 15, 2022
@0x5459 0x5459 added enhancement New feature or request C-cli Category: cli and removed bug Something isn't working labels Dec 15, 2022
@Fatman13 Fatman13 added community issues from community members C-triage Category: need triage labels Dec 19, 2022
@Fatman13 Fatman13 removed the C-triage Category: need triage label Dec 19, 2022
@Fatman13 Fatman13 added the C-triage Category: need triage label Jan 3, 2023
@Fatman13
Copy link
Contributor

Fatman13 commented Jan 3, 2023

这个 @diwufeiwen 大佬评估看看?

@diwufeiwen
Copy link
Contributor

目前的命令虽然嵌套比较深,但是逻辑层次还是清晰的,建议想法具体化,比如那个命令需要怎么改?不然建议保持现状

@Fatman13
Copy link
Contributor

Fatman13 commented Jan 3, 2023

确实,刚网上搜了一下,好像也没有这方面的最佳实践。好像比较偏经验化。

@diwufeiwen
Copy link
Contributor

现在的分类逻辑是: 运行服务属于第一层。(daemon/mock),其他命令是第二层,或更低层,这个逻辑是说得通,因为其他命令都是基于服务启动后才能运行的。

@diwufeiwen
Copy link
Contributor

感觉util的命令可以分为两类:(1)依赖于venus-sector-manager服务的, (2)不依赖的,如创建矿工,查询消息,查询链数据等。 按照这个分类?或者按照功能分类(参考lotus-miner?)总之提需求的可以根据自己运维的经验给一些具体改动的参考,笼统的话改了也不一定比现在好用

@diwufeiwen
Copy link
Contributor

(2)不依赖的venus-sector-manager的命令也分两类:一类是支持vsm业务的,比如查询消息状态,Proving中的wdpost窗口周期等; 另一类是vsm启动的前置命令,如创建矿工。总之,这个需要更加具体的建议,如果确实能够使使用方面,层次清晰,我们再改,目前暂时维持现状,可以持续收集建议

@diwufeiwen diwufeiwen removed their assignment Jan 3, 2023
@diwufeiwen diwufeiwen added breaking change This PR or issue contains breaking changes needs more information needs more information vsmgr vsmgr related issue and removed breaking change This PR or issue contains breaking changes labels Jan 3, 2023
@0x5459
Copy link
Collaborator

0x5459 commented Jan 30, 2023

把 venus-sector-manager 分成两个二进制程序。类似与 dockerd 与 docker(cli) 的关系。

  1. vsmd - the venus-sector-manager daemon
  2. vsm - the venus-sector-manager cli

vsmd 是守护进程, vsm 包含原来的 util 下的那些命令,通过 rpc 与 vsmd 通信并完成命令功能。
这样可能也比较麻烦

@diwufeiwen

@Fatman13
Copy link
Contributor

部分不常用cli考虑迁移给ssm(venus-tools)?

@0x5459
Copy link
Collaborator

0x5459 commented Jan 30, 2023

部分不常用cli考虑迁移给ssm(venus-tools)?

可以

@elvin-du elvin-du added this to the v0.8.0 milestone Jun 16, 2023
@elvin-du elvin-du added the P2 Medium - we should get to this soon label Jun 16, 2023
@0x5459 0x5459 removed this from the v0.8.0 milestone Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cli Category: cli C-triage Category: need triage community issues from community members enhancement New feature or request needs more information needs more information P2 Medium - we should get to this soon vsmgr vsmgr related issue
Projects
Status: No status
Status: No status
Development

No branches or pull requests

5 participants