-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: add install method to plugin CLIManager #364
Conversation
Signed-off-by: Patrick Zheng <[email protected]>
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #364 +/- ##
==========================================
- Coverage 74.33% 73.34% -0.99%
==========================================
Files 24 27 +3
Lines 2260 2480 +220
==========================================
+ Hits 1680 1819 +139
- Misses 459 522 +63
- Partials 121 139 +18 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Patrick Zheng <[email protected]>
Signed-off-by: Patrick Zheng <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds the
Install
method toplugin.CLIManager
.As suggested by @shizhMSFT:
when plugin path is a dir which contains a plugin executable file and extra files such as lib files and LICENSE files, all these files will be installed. A dir is considered a valid input if and only if
it contains one and only one valid plugin executable file named with format notaiton-{plugin-name}
.Note: only regular files under the dir will be installed, sub-directories are ignored.
If the input plugin path is just a single executable file, this file will be installed.
When plugin already exists:
overwrite
is set, version check is skipped. If the existing plugin is malfunctioning, directly overwrite it. If the existing plugin is valid, its plugin metadata is also returned for callers to consume.overwrite
is not set, existing plugin MUST be valid, version check requires new plugin version MUST be higher than existing plugin version.When plugin does not exist: