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

List command of plugin #335

Merged
merged 3 commits into from
Dec 26, 2022
Merged

List command of plugin #335

merged 3 commits into from
Dec 26, 2022

Conversation

rootwarp
Copy link
Member

@rootwarp rootwarp commented Dec 9, 2022

1. Type of change

Please delete options that are not relevant.

  • New feature
  • Enhancement
  • Bug/fix (non-breaking change which fixes an issue)
  • others (anything other than above)

2. Summary

Please include a summary of the changes and which issue is fixed or solved.

Related: # (issue)

close #320

Summary

List command of plugin that are installed on local machine.

~$ ./vatz plugin install https://github.com/dsrvlabs/vatz-plugin-cosmoshub/plugins/node_active_status cosmos-status

~$ vatz plugin list

3. Comments

Please, leave a comments if there's further action that requires.

@rootwarp rootwarp self-assigned this Dec 9, 2022
@rootwarp rootwarp added Vatz Project Name area:svc Anything related to Vatz Service. type:feature-development Any development regarding Vatz service/plugin, etc. labels Dec 9, 2022
@rootwarp rootwarp requested a review from xellos00 December 9, 2022 10:14
@rootwarp
Copy link
Member Author

rootwarp commented Dec 9, 2022

@xellos00 Please take look at this before merging #317.
I'll rebase this after #317 merged.

@xellos00
Copy link
Member

@xellos00 Please take look at this before merging #317. I'll rebase this after #317 merged.

so review this first, before merge #317 right?

@rootwarp
Copy link
Member Author

@xellos00 Please take look at this before merging #317. I'll rebase this after #317 merged.

so review this first, before merge #317 right?

@xellos00
Yes. Due to the previous PR being delayed to merging, I implemented this feature based on previous PR in advance. I just hope that you can inspect this code in detail and get more feedback for new feature.

@xellos00
Copy link
Member

@xellos00 Please take look at this before merging #317. I'll rebase this after #317 merged.

so review this first, before merge #317 right?

@xellos00 Yes. Due to the previous PR being delayed to merging, I implemented this feature based on previous PR in advance. I just hope that you can inspect this code in detail and get more feedback for new feature.

got it!!

@xellos00
Copy link
Member

xellos00 commented Dec 12, 2022

Okay for Coverage

 dongyookang DK ⚡️   ~/ffplay/GolandProjects/dsrvlabs/vatz   list
 make coverage
fatal: No names found, cannot describe anything.
echo "Test Coverage script will be here"
Test Coverage script will be here
# github.com/dsrvlabs/vatz/manager/plugin.test
ld: warning: -no_pie is deprecated when targeting new OS versions
?   	github.com/dsrvlabs/vatz	[no test files]
# github.com/dsrvlabs/vatz/cmd.test
ld: warning: -no_pie is deprecated when targeting new OS versions
ok  	github.com/dsrvlabs/vatz/cmd	2.711s	coverage: 17.1% of statements
ok  	github.com/dsrvlabs/vatz/manager/api	0.378s	coverage: 0.0% of statements [no tests to run]
ok  	github.com/dsrvlabs/vatz/manager/config	0.444s	coverage: 91.2% of statements
ok  	github.com/dsrvlabs/vatz/manager/dispatcher	0.464s	coverage: 7.3% of statements
ok  	github.com/dsrvlabs/vatz/manager/executor	0.557s	coverage: 68.9% of statements
ok  	github.com/dsrvlabs/vatz/manager/healthcheck	0.672s	coverage: 46.3% of statements
ok  	github.com/dsrvlabs/vatz/manager/plugin	2.877s	coverage: 68.0% of statements
?   	github.com/dsrvlabs/vatz/manager/types	[no test files]
?   	github.com/dsrvlabs/vatz/mocks	[no test files]
ok  	github.com/dsrvlabs/vatz/rpc	1.792s	coverage: 67.2% of statements
ok  	github.com/dsrvlabs/vatz/utils	0.163s	coverage: 50.0% of statements
 dongyookang DK ⚡️   ~/ffplay/GolandProjects/dsrvlabs/vatz   list

Plugin List test

 ./vatz plugin list
2022-12-12T13:17:12-06:00 INF List plugins module=plugin
2022-12-12T13:17:12-06:00 INF List module=plugin
2022-12-12T13:17:12-06:00 INF newReader /Users/dongyookang/.vatz/vatz.db module=db
2022-12-12T13:17:12-06:00 INF Create DB Instance module=db
2022-12-12T13:17:12-06:00 INF List Plugin module=db
+---------------+---------------------+------------------------------------------------------------------------------+---------+
| NAME          | INSTALL DATA        | REPOSITORY                                                                   | VERSION |
+---------------+---------------------+------------------------------------------------------------------------------+---------+
| cosmos-status | 2022-12-01 21:52:44 | https://github.com/dsrvlabs/vatz-plugin-cosmoshub/plugins/node_active_status | latest  |
| cpu-monitor   | 2022-12-01 22:11:05 | https://github.com/dsrvlabs/vatz-plugin-sysutil/plugins/cpu_monitor          | latest  |
+---------------+---------------------+------------------------------------------------------------------------------+---------+

@rootwarp
Can you Check up followings?

  1. Column name typo
    • INSTALL DATA => INSTALLATION DATE
  2. Column Order
    • Name, REPOSITORY, VERSION, INSTALLATION DATE
  3. Get rid of following lines?
    Or is this intentionally printed out?
 ./vatz plugin list
2022-12-12T13:17:12-06:00 INF List plugins module=plugin
2022-12-12T13:17:12-06:00 INF List module=plugin
2022-12-12T13:17:12-06:00 INF newReader /Users/dongyookang/.vatz/vatz.db module=db
2022-12-12T13:17:12-06:00 INF Create DB Instance module=db
2022-12-12T13:17:12-06:00 INF List Plugin module=db

@rootwarp
Copy link
Member Author

@xellos00 Responses.

@rootwarp Can you Check up followings?

  1. Column name typo

    • INSTALL DATA => INSTALLATION DATE

I'll change it.

  1. Column Order

    • Name, REPOSITORY, VERSION, INSTALLATION DATE

Also I'll change it.

  1. Get rid of following lines?
    Or is this intentionally printed out?
 ./vatz plugin list
2022-12-12T13:17:12-06:00 INF List plugins module=plugin
2022-12-12T13:17:12-06:00 INF List module=plugin
2022-12-12T13:17:12-06:00 INF newReader /Users/dongyookang/.vatz/vatz.db module=db
2022-12-12T13:17:12-06:00 INF Create DB Instance module=db
2022-12-12T13:17:12-06:00 INF List Plugin module=db

Regarding this, I thought few hours before implementing this and I think we need to discuss and decide policies for logs.

As you can see, this problem is caused because the output channels for the log and the result are identical.

We may remove the logging code or disable log outputs for some command lines
and these could be the item that we have to discuss.
Before we discuss this, I think it could be better to keep log messages that will help implementation.

@xellos00
Copy link
Member

@xellos00 Responses.

@rootwarp Can you Check up followings?

  1. Column name typo

    • INSTALL DATA => INSTALLATION DATE

I'll change it.

  1. Column Order

    • Name, REPOSITORY, VERSION, INSTALLATION DATE

Also I'll change it.

  1. Get rid of following lines?
    Or is this intentionally printed out?
 ./vatz plugin list
2022-12-12T13:17:12-06:00 INF List plugins module=plugin
2022-12-12T13:17:12-06:00 INF List module=plugin
2022-12-12T13:17:12-06:00 INF newReader /Users/dongyookang/.vatz/vatz.db module=db
2022-12-12T13:17:12-06:00 INF Create DB Instance module=db
2022-12-12T13:17:12-06:00 INF List Plugin module=db

Regarding this, I thought few hours before implementing this and I think we need to discuss and decide policies for logs.

As you can see, this problem is caused because the output channels for the log and the result are identical.

We may remove the logging code or disable log outputs for some command lines and these could be the item that we have to discuss. Before we discuss this, I think it could be better to keep log messages that will help implementation.

Let's separate log issue from this.
I will create another issue to discuss for this problem.

@xellos00 xellos00 mentioned this pull request Dec 13, 2022
4 tasks
Copy link
Member

@meetrick meetrick left a comment

Choose a reason for hiding this comment

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

I haven't tested it yet, but there seems to be no problem with the operation.
But please check typo error comment.

cmd/plugin.go Outdated Show resolved Hide resolved
manager/plugin/db.go Outdated Show resolved Hide resolved
Copy link
Member

@heejin-github heejin-github left a comment

Choose a reason for hiding this comment

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

LGTM!

@xellos00 xellos00 merged commit 9c72df3 into dsrvlabs:main Dec 26, 2022
@rootwarp rootwarp deleted the list branch January 4, 2023 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:svc Anything related to Vatz Service. type:feature-development Any development regarding Vatz service/plugin, etc. Vatz Project Name
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List plugin
5 participants