Skip to content

Update plugin meta.yaml spec documentation#150

Merged
amisevsk merged 3 commits intoeclipse-che:masterfrom
amisevsk:meta-yaml-docs
May 29, 2019
Merged

Update plugin meta.yaml spec documentation#150
amisevsk merged 3 commits intoeclipse-che:masterfrom
amisevsk:meta-yaml-docs

Conversation

@amisevsk
Copy link
Contributor

What does this PR do?

Updates the documentation around what we expect for meta.yamls in the registry, to clarify issues around latest changes.

@l0rd Please double check I got the current spec correct.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
@amisevsk amisevsk added the enhancement New feature or request label May 16, 2019
@amisevsk amisevsk requested review from ibuziuk and l0rd May 16, 2019 20:03
README.md Outdated
Here is an overview of all fields that can be present in plugin meta YAML files. This document represents the current `v3` version.

```yaml
apiVersion: # v2; v1 supported for backwards compatability
Copy link
Contributor

Choose a reason for hiding this comment

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

What about V3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no v3. If you are thinking about the v3 path on the registry side, that is a separate version (and relates to registry design).

Copy link
Contributor

Choose a reason for hiding this comment

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

How about describing this as "Version of the meta.yml file format" to prevent others from thinking the same as me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great point -- I've addressed a few of these comments elsewhere already.

Will do :)

README.md Outdated
apiVersion: # v2; v1 supported for backwards compatability
publisher: # publisher name
name: # plugin name
version: # plugin version
Copy link
Contributor

Choose a reason for hiding this comment

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

The combination of publisher, name, version make up the id. Must they be globally unique?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Semantically, a publisher cannot have two plugins with the same name and version, I don't believe this requires explicit documentation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, the fact that publisher/name/version is makes up the unique identifier is not obvious to a noob.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Similarly though, I would not expect a user be surprised when releasing two identical plugins does not work. Are there any marketplaces/registries that allow this?

README.md Outdated
apiVersion: # v2; v1 supported for backwards compatability
publisher: # publisher name
name: # plugin name
version: # plugin version
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the format of the version string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Anything you want, currently. We're currently moving to support latest as an alias to the newest version released.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the explanation, put it in the doc :-)

README.md Outdated

```yaml
apiVersion: # v2; v1 supported for backwards compatability
publisher: # publisher name
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there restrictions on the what can be contained here? Can the publisher contain stuff like '/'? Is there escaping when constructing the plugin id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add explicit documentation here. I believe the requirement is alphanumeric + ., -, and _.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added regexes for these; to close the loop: publisher and name are alphanumeric plus '-', version can additionally contain '.'

type: # plugin type; e.g. "Theia plugin", "Che Editor"
displayName: # name shown in user dashboard
title: # plugin title
description: # short description of plugin's purpose
Copy link
Contributor

Choose a reason for hiding this comment

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

How long, what should it contain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should contain a description of what the plugin does; I don't think we have a limit on length.

secure: # use secure version of protocol above
discoverable: # if false, no service is created for this endpoint
cookiesAuthEnabled:
type:
Copy link
Contributor

Choose a reason for hiding this comment

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

Possible values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The meaning of this one is lost to time immemorial. Perhaps @sleshchenko can answer?

discoverable: # if false, no service is created for this endpoint
cookiesAuthEnabled:
type:
path:
Copy link
Contributor

Choose a reason for hiding this comment

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

Path of what?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be API path but I can't track how it's used across the infrastructure backend.

env: # list of env vars to set in sidecar
- name:
value:
volumes: # volumes required by plugin
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this create volumes? How does it play with the volumes defined in a workspace config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea.

README.md Outdated
volumes: # volumes required by plugin
- mountPath:
name:
ports: # ports exposed by plugin
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the relationship between "ports" and "endpoints"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ports are exposed on a container; endpoints are exposed separately. The analogue is container ports and service ports -- should be familiar to people using k8s/openshift.

Copy link
Contributor

Choose a reason for hiding this comment

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

"analogue" as in "will map to"? That would be useful info.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point; will do.

workspaceEnv: # optional; env vars for the workspace
- name:
value:
extensions: # optional; required for VS Code/Theia plugins; list of urls to plugin artifacts (.vsix/.theia files) -- examples follow
Copy link
Contributor

Choose a reason for hiding this comment

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

This is input to the plugin broker, right? How can the user find out which plugin file formats are supported? Shouldn't we mention the restriction on downloading from the vs code marketplace here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There aren't currently many restrictions here; the broker will download whatever you give it.

I hesitate to codify the VS Code marketplace limitation here but can add it if it is important.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
@amisevsk
Copy link
Contributor Author

@tsmaeder Your review brings up a lot of great questions about the current meta.yaml spec (ones I'm not capable of answering entirely right now). I've created issue https://github.com/eclipse/che-plugin-registry/issues/152 to track additional documentation that needs to occur.

Additionally make it clear that ports in containers refer to the
Kubernetes concept.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants