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
cli-plugins: include plugin metadata in User-Agent
Add support to the `cli/command` package to accept a custom User
Agent to pass to the underlying client.
Use said support to automatically append CLI plugin-specific info
(vendor, name, version) to the `User-Agent` value.
For example, for a hypothetical CLI plugin from `vendor` named
`plugin` with version `1.0.0` would have a user agent of something
like:
```
Docker-Client/25.0.0 (darwin) vendor-plugin/1.0.0
```
Plugins must provide their name via the metadata by populating the
field and raising their schema version from 0.1.0 to 0.2.0.
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
{name: "empty schemaversion", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{}`}, invalid: `plugin SchemaVersion "" is not valid`},
69
-
{name: "invalid schemaversion", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{"SchemaVersion": "xyzzy"}`}, invalid: `plugin SchemaVersion "xyzzy" is not valid`},
70
-
{name: "no vendor", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{"SchemaVersion": "0.1.0"}`}, invalid: "plugin metadata does not define a vendor"},
71
-
{name: "empty vendor", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{"SchemaVersion": "0.1.0", "Vendor": ""}`}, invalid: "plugin metadata does not define a vendor"},
68
+
{name: "empty schemaversion", c: &fakeCandidate{path: goodPluginPath, exec: true, meta: `{}`}, invalid: `plugin metadata failed validation: "SchemaVersion" field is required`},
0 commit comments