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 fluvio update update plugins as well as CLI #865

Merged
merged 6 commits into from
Mar 16, 2021

Conversation

nicholastmosher
Copy link
Contributor

Closes #672

This updates the fluvio update command to behave as follows:

  • fluvio update with no parameters will update the CLI and any plugins that support being updated* to the latest stable version
  • fluvio update <pluginA> <pluginB> will update any of the named plugins to the latest stable version
  • fluvio update with a --develop flag with update the targets to the latest prerelease (rather than stable)

*Plugin Update Mechanism

In order to be compatible with auto-updating, each plugin must now provide a new field of metadata called package, which identifies the plugin on packages.fluvio.io. For example, the fluvio-cloud plugin would provide a package field containing fluvio/fluvio-cloud. This is delivered via the already-existing metadata mechanism, where any plugin executed with a metadata argument is expected to return a FluvioExtensionMetadata, e.g.

$ fluvio-cloud metadata
{
  "title": "Fluvio Cloud CLI",
  "package": "fluvio/fluvio-cloud",
  "description": "A tool for interacting with Fluvio Cloud",
  "version": "0.1.4"
}

In the JSON above, the package field is new, and allows the plugin to tell the CLI where to search for its updates. Older plugins that do not provide the package field will not be auto-updated with fluvio update (with no arguments), but updates will still work fine if the plugin to update is named, e.g. fluvio update fluvio-cloud.

Example:

image

Copy link
Contributor

@simlay simlay left a comment

Choose a reason for hiding this comment

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

I think I'm okay with this.

@nicholastmosher nicholastmosher merged commit 80b7fbb into infinyon:master Mar 16, 2021
@nicholastmosher nicholastmosher deleted the fluvio-update-all branch March 16, 2021 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: fluvio update should also update all extensions
2 participants