You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
There are a few spots in the code that have not been updated for the context aware plugin handling. One of those is the tanzu generate-all-docs command. Running this command removes all references to subcommands from the generated CLI docs because it doesn't find any plugins.
The places in the code where this had previously been called that are still working have been updated to have something like:
But other places, like the generate-all-docs code, just call ListPlugins to get the set of installed plugins. That fails to find any because it looks like the plugin cache has been changed from being ~/.local/share/tanzu-cli/[set of binaries] to be ~/.local/share/tanzu-cli/[plugin_name]/[version_named_binary].
The ListPlugins code explicitly checks if the first level under ~/.local/share/tanzu-cli/ is a directory, and if so ignores it and continues:
Since it appears this can now contain multiple versions per plugin directory, special handling would need to be added to look for the most recent binary version.
Some of the places where there is no conditional handling for context aware plugins:
Bug description
There are a few spots in the code that have not been updated for the context aware plugin handling. One of those is the
tanzu generate-all-docs
command. Running this command removes all references to subcommands from the generated CLI docs because it doesn't find any plugins.The places in the code where this had previously been called that are still working have been updated to have something like:
But other places, like the generate-all-docs code, just call
ListPlugins
to get the set of installed plugins. That fails to find any because it looks like the plugin cache has been changed from being~/.local/share/tanzu-cli/[set of binaries]
to be~/.local/share/tanzu-cli/[plugin_name]/[version_named_binary]
.The
ListPlugins
code explicitly checks if the first level under~/.local/share/tanzu-cli/
is a directory, and if so ignores it and continues:tanzu-framework/pkg/v1/cli/catalog.go
Line 244 in 3ad462f
Since it appears this can now contain multiple versions per plugin directory, special handling would need to be added to look for the most recent binary version.
Some of the places where there is no conditional handling for context aware plugins:
tanzu-framework/cmd/cli/plugin-admin/test/main.go
Line 39 in 7120a04
tanzu-framework/pkg/v1/cli/command/core/doc.go
Line 42 in 7120a04
tanzu-framework/pkg/v1/cli/catalog.go
Line 552 in 7120a04
tanzu-framework/pkg/v1/cli/command/core/config.go
Line 235 in 7120a04
tanzu-framework/pkg/v1/cli/command/core/plugin_manager.go
Line 106 in 7120a04
tanzu-framework/pkg/v1/cli/command/core/update.go
Line 44 in 7120a04
Affected product area (please put an X in all that apply)
Expected behavior
Non-context aware plugins get returned for any instance of
ListPlugins
and thattanzu generate-all-docs
generates the docs for all CLI commands.The text was updated successfully, but these errors were encountered: