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

Make output node information and format consistent across ockam node create | show | list commands #3042

Closed
mrinalwadhwa opened this issue Jul 27, 2022 · 3 comments

Comments

@mrinalwadhwa
Copy link
Member

mrinalwadhwa commented Jul 27, 2022

Current behavior:

» ockam node create
Node: 1c399708, Status: [✓], Worker count: 17, Pid: 77790, Transport count: 1
» ockam node show 1c399708
Node: 1c399708, Status: [✓], Worker count: 17, Pid: 77790, Transport count: 1
» ockam node list
Checking state for node '1c399708'
Checking state for node '207f75d1'
+-----------+----------+------------------+-----------------------------------------------------------------------------------------+
| Node name | API port | Running          | Log path                                                                                |
+-----------+----------+------------------+-----------------------------------------------------------------------------------------+
| 1c399708  |    62526 | Yes (pid: 77790) | /Users/mrinal/Library/Application Support/io.ockam.ockam-cli/node-1c399708/1c399708.log |
+-----------+----------+------------------+-----------------------------------------------------------------------------------------+
| 207f75d1  |     4001 | Yes (pid: 80602) | /Users/mrinal/Library/Application Support/io.ockam.ockam-cli/node-207f75d1/207f75d1.log |
+-----------+----------+------------------+-----------------------------------------------------------------------------------------+

Desired Plain Output:

» ockam node create

Node Created!

Node:
  Name: 1c399708
  Status: Running
  API Address: 127.0.0.1:62526
  Pid: 77790
  Worker count: 17
  Transport count: 1
  Log Path: "/Users/mrinal/Library/Application Support/io.ockam.ockam-cli/node-1c399708/1c399708.log"
» ockam node show 1c399708

Node:
  Name: 1c399708
  Status: Running
  API Address: 127.0.0.1:62526
  Pid: 77790
  Worker count: 17
  Transport count: 1
  Log Path: "/Users/mrinal/Library/Application Support/io.ockam.ockam-cli/node-1c399708/1c399708.log"

» ockam node list

Node:
  Name: 1c399708
  Status: Running
  API Address: 127.0.0.1:62526
  Pid: 77790
  Worker count: 17
  Transport count: 1
  Log Path: "/Users/mrinal/Library/Application Support/io.ockam.ockam-cli/node-1c399708/1c399708.log"

Node:
  Name: 207f75d1
  Status: Running
  API Address: 127.0.0.1:4001
  Pid: 80602
  Worker count: 17
  Transport count: 1
  Log Path: "/Users/mrinal/Library/Application Support/io.ockam.ockam-cli/node-207f75d1/207f75d1.log"

Table rendering is brittle on many terminal setups. If we support it, maybe we won't make it the default, or maybe we'll have the above vertical output as a fallback. Something we can consider later.

The code for the node commands is here
https://github.com/build-trust/ockam/tree/develop/implementations/rust/ockam/ockam_command/src/node


We love helping new contributors!
If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion.
If you're looking for other issues to contribute to, checkout issues labeled - good first issue or help wanted

@kpagacz
Copy link

kpagacz commented Jul 28, 2022

If you do not mind, I will have a crack at this issue. Looks simple enough to finish over the weekend :)

@mrinalwadhwa
Copy link
Member Author

@kpagacz awesome thank you for picking it up!

@mrinalwadhwa
Copy link
Member Author

Closed in #3090 by @leonzchang. Thank you.

@kpagacz if you would like to pick a different issue, I would love to help you find one. good first issue . Please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants