Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/developer/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ warning: ipam is deprecated: ipam moved to the Milo catalog.
```

If the replacement's catalog is already registered, the notice shows only the
`plugin install` line. Installs and upgrades still proceed. Plugins installed
directly from GitHub have no catalog entry and get no notice.
`plugin install` line. When an allow-list disables that catalog, the notice
says the catalog is disabled and prints no commands. Installs and upgrades
still proceed. Plugins installed directly from GitHub have no catalog entry and
get no notice.

When both a deprecated plugin and a replacement with the same name are
available, a bare-name install such as `datumctl plugin install ipam` picks the
Expand Down
3 changes: 2 additions & 1 deletion internal/cmd/plugin/browse.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func browseCmd() *cobra.Command {
Type to filter, inspect a plugin's description, version, source catalog, and
trust badge ("official" for Datum's curated datum catalog, "third-party" for
catalogs you added), and install the selected plugin in place. Use --index to
scope the browser to a single catalog.`),
scope the browser to a single catalog. Deprecated plugins are tagged
"(deprecated)", and their details show the deprecation warning.`),
Example: templates.Examples(`
# Browse all catalogs
datumctl plugin browse
Expand Down
3 changes: 2 additions & 1 deletion internal/cmd/plugin/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ func indexValidateCmd() *cobra.Command {
Long: templates.LongDesc(`
Lint a catalog manifest before you publish it. The validator reports
missing plugin names or versions, missing or non-HTTPS download URIs,
missing checksums, and invalid platform selectors.
missing checksums, invalid platform selectors, and an incomplete
deprecated block (no message or no replacement.catalog).

The source may be a local path, an HTTPS URL, or a GitHub owner/repo.`),
Example: templates.Examples(`
Expand Down
7 changes: 6 additions & 1 deletion internal/cmd/plugin/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func installCmd(_ *client.DatumCloudFactory) *cobra.Command {
With no arguments, restores all previously installed plugins to their recorded
versions. Use this to reproduce a plugin set on a new machine.

Installing or restoring a deprecated plugin prints a deprecation warning and,
when the catalog names a replacement, how to switch to it. A bare name prefers
a deprecated plugin's replacement when both are available.

With a plugin name argument, installs from a registered catalog:
- name resolves against the official datum catalog first, then
any other registered catalog; a name found in more than
Expand All @@ -49,7 +53,8 @@ alone. A plugin of the same name installed from another catalog or from GitHub
is skipped, not replaced. One failed plugin does not stop the others; failures
are listed at the end and the command exits non-zero. A third-party catalog
asks for confirmation first, listing the plugins it would install; pass --yes
to confirm without the prompt.
to confirm without the prompt. Deprecated plugins that are not installed are
skipped.

The plugin binary is written to the managed plugins directory
(~/.datumctl/plugins/ by default).`,
Expand Down
3 changes: 2 additions & 1 deletion internal/cmd/plugin/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func listCmd() *cobra.Command {
Status column indicators:
ok Plugin is installed and compatible with this datumctl.
update A newer version is available in its catalog.
deprecated Its catalog marks the plugin deprecated.
deprecated Its catalog marks the plugin deprecated. A warning is printed
after the table for every deprecated plugin, even if shown as ! or ?.
! Built for a different datumctl version.
? Version info unavailable.

Expand Down
4 changes: 3 additions & 1 deletion internal/cmd/plugin/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ func searchCmd() *cobra.Command {
Run 'datumctl plugin install <name>' to install a plugin listed here.

Use -o json for machine-readable output, or -o name for one plugin name
per line.`),
per line. Deprecated plugins are tagged [deprecated]; table output prints a
warning with the replacement after the table, and -o json adds a
"deprecated" field to them.`),
Example: templates.Examples(`
# List all available plugins across catalogs
datumctl plugin search
Expand Down
4 changes: 3 additions & 1 deletion internal/cmd/plugin/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ func upgradeCmd(_ *client.DatumCloudFactory) *cobra.Command {
originally installed from, using the same flow as 'datumctl plugin
install': SHA256 verification, manifest check, and compatibility
validation. A plugin that is already at its latest version is left
untouched.
untouched. A deprecated plugin still upgrades; the command prints a
deprecation warning and, when the catalog names a replacement, how to
switch to it.

With --all, a plugin that fails to upgrade does not stop the others; the
failures are listed together once every plugin has been attempted.`),
Expand Down
Loading