GithubHelp home page GithubHelp logo

eclipse-che / che-plugin-registry Goto Github PK

View Code? Open in Web Editor NEW
40.0 40.0 145.0 24.7 MB

License: Eclipse Public License 2.0

Dockerfile 8.05% Shell 38.29% JavaScript 2.98% TypeScript 49.46% Python 1.08% Smarty 0.14%

che-plugin-registry's People

Contributors

amisevsk avatar andrienkoaleksandr avatar apupier avatar azatsarynnyy avatar benoitf avatar bfitzpat avatar che-bot avatar dependabot[bot] avatar ericwill avatar filipkroupa avatar gattytto avatar ibuziuk avatar johnsteele avatar jpinkney avatar l0rd avatar mkuznyetsov avatar monaka avatar mshaposhnik avatar nickboldt avatar ohrimenko1988 avatar sideeffffect avatar skabashnyuk avatar sunix avatar svor avatar tolusha avatar tsmaeder avatar vinokurig avatar vitaliy-guliy avatar vparfonov avatar vzhukovs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

che-plugin-registry's Issues

How to install a plugin in an existing registry on kubernetes ?

Hello,
we succeeded installing Eclipse che on our k8s using chectl.

chectl server:start --platform=k8s --installer=helm --multiuser --domain=${MAAP_DOMAIN} --k8spodwaittimeout=400000 --postgres-pvc-storage-class-name="sata-iac-0b" --workspace-pvc-storage-class-name="sata-iac-0b" --templates=$TEMPLATE_PATH

Based on the default Jupyter plugin provided by default in the plugin repository:
dockerfile: https://github.com/ws-skeleton/che-editor-jupyter
plugin meta: https://github.com/eclipse/che-plugin-registry/blob/master/v3/plugins/ws-skeleton/jupyter/5.7.0/meta.yaml

we built a new one with Jupyter notebook and more pythons plugins https://hub.docker.com/repository/docker/kosted/maap-jupyter

We are trying now to add this new plugin in the default registry.
We created in the che-plugin-registry the folder esa in put inside it our new meta file following the default convention:
cat v3/plugins/esa/maap-jupyter/latest/meta.yaml

apiVersion: v2
publisher: ws-skeleton
name: jupyter
version: 5.7.0
type: Che Editor
displayName: Jupyter Notebook
title: Jupyter Notebook as Editor for Eclipse Che
description: Jupyter Notebook as Editor for Eclipse Che
icon: https://jupyter.org/assets/main-logo.svg
category: Editor
repository: https://gitlab.com/esa/maap-editor-jupyter/
firstPublicationDate: "2019-02-05"
spec:
  endpoints:
   -  name: "jupyter"
      public: true
      targetPort: 8888
      attributes:
        protocol: http
        type: ide
  containers:
   - name: jupyter-notebook
     image: " kosted/maap-jupyter:latest"
     env:
         - name: JUPYTER_NOTEBOOK_DIR
           value: /projects
     mountSources: true
     ports:
         - exposedPort: 8888
     memoryLimit: "512M"

The only command in the che plugin registry doc about kubernetes we have is this one:
https://github.com/eclipse/che-plugin-registry#run-eclipse-che-plugin-registry-on-kubernetes

so when we runs the command:

NAMESPACE="che"
DOMAIN="dev.esa-maap.org"
helm upgrade --install che-plugin-registry \
    --debug \
    --namespace ${NAMESPACE} \
    --set global.ingressDomain=${DOMAIN} \
    ./deploy/kubernetes/che-plugin-registry/

We have this error:

 helm upgrade --install che-plugin-registry \
>     --debug \
>     --namespace ${NAMESPACE} \
>     --set global.ingressDomain=${DOMAIN} \
>     ./deploy/kubernetes/che-plugin-registry/
[debug] Created tunnel using local port: '44446'

[debug] SERVER: "127.0.0.1:44446"

Error: UPGRADE FAILED: configmaps is forbidden: User "system:serviceaccount:kube-system:tiller" cannot list resource "configmaps" in API group "" in the namespace "kube-system"

How could we use chectl or another way to easily add this new plugin ?

Where is the valid location for `index.json` ?

Referring to https://github.com/eclipse/che-plugin-registry/blame/11cf2e16c2851056c35fcf0d2ef365e26b7c507c/README.md#L60 .

curl  "http://localhost:8080/index.json"

But there is no index.json on openshift.io.

curl https://che-plugin-registry.openshift.io/index.json
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /index.json was not found on this server.</p>
</body></html>

curl https://che-plugin-registry.openshift.io/plugins/index.json works.

Which should be fixed, README.md or code ?

Registry doesn't support plugins with several versions

When some plugin or editor has 2 versions in registry index build check fails

Sending build context to Docker daemon  267.8kB
Step 1/10 : FROM mikefarah/yq
 ---> 28dd2998f056
Step 2/10 : RUN apk add --no-cache bash
 ---> Using cache
 ---> e2017954fdbb
Step 3/10 : COPY /plugins /test/plugins
 ---> Using cache
 ---> 45991a42fa51
Step 4/10 : COPY check_plugins_location.sh /test/check_plugins_location.sh
 ---> 32c202c5fcdc
Step 5/10 : RUN cd /test/ && ./check_plugins_location.sh
 ---> Running in 1370d8fd82dc
./check_plugins_location.sh: line 18: cd: too many arguments
11:32:04 main [ERRO] open meta.yaml: no such file or directory
!!! ID mismatch in plugin 'org.eclipse.che.editor.theia/1.0.0/
!!!   id in meta.yaml: 'Error: open meta.yaml: no such file or directory
Usage:
  yq read [yaml_file] [path] [flags]

Aliases:
  read, r

Examples:

yq read things.yaml a.b.c
yq r - a.b.c (reads from stdin)
yq r things.yaml a.*.c
yq r -d1 things.yaml a.array[0].blah
yq r things.yaml a.array[*].blah
      

Flags:
  -d, --doc string   process document index number (0 based, * for all documents) (default "0")
  -h, --help         help for read
  -j, --tojson       output as json

Global Flags:
  -t, --trim      trim yaml output (default true)
  -v, --verbose   verbose mode'
!!!   id directory name: 'org.eclipse.che.editor.theia' 
11:32:04 main [ERRO] open meta.yaml: no such file or directory
!!! Version mismatch in plugin 'org.eclipse.che.editor.theia/1.0.0/
1.0.1':
!!!   version in meta.yaml: 'Error: open meta.yaml: no such file or directory
Usage:
  yq read [yaml_file] [path] [flags]

Aliases:
  read, r

Examples:

yq read things.yaml a.b.c
yq r - a.b.c (reads from stdin)
yq r things.yaml a.*.c
yq r -d1 things.yaml a.array[0].blah
yq r things.yaml a.array[*].blah
      

Flags:
  -d, --doc string   process document index number (0 based, * for all documents) (default "0")
  -h, --help         help for read
  -j, --tojson       output as json

Global Flags:
  -t, --trim      trim yaml output (default true)
  -v, --verbose   verbose mode'
!!!   version directory name: '1.0.0/
1.0.1' 
The command '/bin/sh -c cd /test/ && ./check_plugins_location.sh' returned a non-zero code: 1

[Security] Workflow next-build.yml is using vulnerable action actions/checkout

The workflow next-build.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

Naming convention

There is no proper naming convention for Che plugins yet. This is issue is to propose one. The goal is to make something simple but still powerful, more similar to the VS Code extensions naming convention than Java packages.

  • A plugin should be identified by 3 fields:
    • publisher-id: usually matches the github organisation or user
    • plugin-id: usually matches the github repository
    • version: in the form MAJOR.MINOR.PATCH and using the Semantic Versioning
  • publisher-id and plugin-id should be lowercase and less than 64 chars (each). Only letters, digits and hyphen are allowed (LDH rule).
  • A plugin should be go in the folder: plugins/publisher_id/plugin_id/version/

Handle more metadatas for the plugin viewer

Goal

The plugin viewer allows to display a lot of metadatas about the plugins. We need the plugin-registry to allow a plugin contributor to provide those metadatas so they can be exposed by the api and displayed to the end-user is the plugin viewer.

Visual mockups of the Plugin Viewer

https://redhat.invisionapp.com/share/J8PGG7D7TFP#/screens

Metadata needed

Each plugin will need to provide the following information

Property Description
Title Title of the plugin
Publisher Name of the author of the plugin
Category Category of the pluginName of the author of the plugin
Icon Plugin icon (in svg)
Short-Description Short description of the plugin
Preview Link to a repository with a devfile, show casing the plugin for a particular sample project
 Repository Link to the repository of the plugin
 First Publication Date Date of the first publication of the plugin in the registry
 Latest Updated Date of the latest update of the plugin registry
Tags A list of key words related to the plugin
Media-img A list of links pointing to screenshoots of the plugins
Media-video A list of links pointing to videos of the plugins

We should have a define set of categories:

  • Editor
  • Debugger
  • Formatter
  • Language
  • Linter
  • Snippet
  • Theme
  • Other

[Security] Workflow build-jobs.yml is using vulnerable action actions/checkout

The workflow build-jobs.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

Avoid extra /*.json to API calls / more REST friendly

Today to get list of plug-ins, the remote call is
http://localhost:8080/index.json

it would be nice to cut the /index.json path to be more REST friendly

http://localhost:8080/plugins would list all the plug-ins

Also http://localhost:8080/ could display the README.

And to grab data for a specific plug-in:
today we have:

http://localhost:8080/plugins/org.eclipse.che.editor.theia/1.0.0/meta.yaml

it would be nice to have

http://localhost:8080/plugins/org.eclipse.che.editor.theia/1.0.0 ?

(<plugin-id>/<plugin-version>)

and call to

http://localhost:8080/plugins/org.eclipse.che.editor.theia

would list all versions

Fix shellcheck error

it is causing all PRs to be marked as red which makes it hard to know if the PR is correct or not.

#!/bin/sh -eo pipefail
find . -type f -name '*.sh' | wc -l
find . -type f -name '*.sh' | xargs shellcheck --external-sources
12

In ./check_plugins_location_v2.sh line 19:
declare -a arr=(`find "$1" -name "meta.yaml"`)
                ^---------------------------^ SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                ^---------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./check_plugins_location_v2.sh line 22:
    plugin_id=$(evaluate_plugin_id $i)
                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./check_plugins_location_v1.sh line 15:
declare -a arr=(`find plugins -name "meta.yaml"`)
                ^-- SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./set_plugin_dates.sh line 17:
  if [ $? -ne 0 ]; then
       ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In ./set_plugin_dates.sh line 27:
declare -a arr=(`find . -name "meta.yaml"`)
                ^------------------------^ SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                ^------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./check_plugins_viewer_mandatory_fields_v3.sh line 47:
declare -a arr=(`find v3 -name "meta.yaml"`)
                ^-------------------------^ SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                ^-------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./check_plugins_viewer_mandatory_fields_v3.sh line 50:
    plugin_id=$(evaluate_plugin_id $i)
                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./check_plugins_viewer_mandatory_fields_v3.sh line 58:
      VALUE=$(yq r $i "$FIELD")
                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./check_plugins_viewer_mandatory_fields_v1.sh line 45:
declare -a arr=(`find plugins -name "meta.yaml"`)
                ^-- SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./check_plugins_viewer_mandatory_fields_v1.sh line 58:
      VALUE=$(yq r $i "$FIELD")
                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./cico_build.sh line 53:
  docker tag ${IMAGE} $TARGET
             ^------^ SC2086: Double quote to prevent globbing and word splitting.
                      ^-----^ SC2086: Double quote to prevent globbing and word splitting.


In ./cico_build.sh line 54:
  docker push $TARGET
              ^-----^ SC2086: Double quote to prevent globbing and word splitting.


In ./cico_build.sh line 61:
  if [ $TARGET == "rhel" ]; then
       ^-----^ SC2086: Double quote to prevent globbing and word splitting.


In ./cico_build.sh line 69:
  if [ -n "${QUAY_USERNAME}" -a -n "${QUAY_PASSWORD}" ]; then
                             ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.


In ./cico_build.sh line 70:
    docker login -u ${QUAY_USERNAME} -p ${QUAY_PASSWORD} ${REGISTRY}
                    ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                        ^--------------^ SC2086: Double quote to prevent globbing and word splitting.


In ./cico_build.sh line 78:
  TAG=$(echo $GIT_COMMIT | cut -c1-${DEVSHIFT_TAG_LEN})
             ^---------^ SC2086: Double quote to prevent globbing and word splitting.
                                   ^-----------------^ SC2086: Double quote to prevent globbing and word splitting.


In ./cico_build.sh line 80:
  tag_push ${REGISTRY}/openshiftio/$IMAGE:$TAG
                                          ^--^ SC2086: Double quote to prevent globbing and word splitting.


In ./check_plugins_images.sh line 16:
declare -a arr=(`find . -name "meta.yaml"`)
                ^------------------------^ SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                ^------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./check_plugins_images.sh line 19:
    ICON=$(yq r $i icon | sed 's/^"\(.*\)"$/\1/')
                ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./check_plugins_images.sh line 22:
      plugin_id=$(evaluate_plugin_id $i)
                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./check_plugins_viewer_mandatory_fields_v2.sh line 45:
declare -a arr=(`find v2 -name "meta.yaml"`)
                ^-------------------------^ SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                ^-------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./check_plugins_viewer_mandatory_fields_v2.sh line 48:
    plugin_id=$(evaluate_plugin_id $i)
                                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./check_plugins_viewer_mandatory_fields_v2.sh line 56:
      VALUE=$(yq r $i "$FIELD")
                   ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./index.sh line 29:
    declare -a arr=(`find "$1" -name "meta.yaml"`)
                    ^---------------------------^ SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                    ^---------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./index.sh line 42:
        plugin_id=$(getId $i)
                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./index.sh line 45:
        for field in ${fields[@]}
                     ^----------^ SC2068: Double quote array expansions to avoid re-splitting elements.


In ./index.sh line 47:
            echo "  \"$field\":\""$(yq r "$i" "$field" | sed 's/^"\(.*\)"$/\1/')"\","
                                  ^-- SC2027: The surrounding quotes actually unquote this. Remove or escape them.
                                  ^-- SC2046: Quote this to prevent word splitting.


In ./index.sh line 63:
        echo "  \"links\": {\"self\":\"/$(echo $i)\" }"
                                        ^--------^ SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
                                               ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./index_v2.sh line 23:
    evaluate_plugin_id $1
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./index_v2.sh line 32:
    declare -a arr=(`find "$1" -name "meta.yaml"`)
                    ^---------------------------^ SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                    ^---------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.


In ./index_v2.sh line 45:
        plugin_id=$(getId $i)
                          ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./index_v2.sh line 48:
        for field in ${fields[@]}
                     ^----------^ SC2068: Double quote array expansions to avoid re-splitting elements.


In ./index_v2.sh line 50:
            echo "  \"$field\":\""$(yq r "$i" "$field" | sed 's/^"\(.*\)"$/\1/')"\","
                                  ^-- SC2027: The surrounding quotes actually unquote this. Remove or escape them.
                                  ^-- SC2046: Quote this to prevent word splitting.


In ./index_v2.sh line 66:
        echo "  \"links\": {\"self\":\"/$(echo $i|sed 's/\/meta.yaml$//g')\" }"
                                               ^-- SC2086: Double quote to prevent globbing and word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
  https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
Exited with code 123

Why plugin go-1.10.7 located in the folder 0.9.2? It's confusing...

Why plugin go-1.10.7 located in the folder 0.9.2? It's confusing... I think we should have two folders and plugins: older 0.9.2 and 1.10.7 newer, or only one with latest version. Or maybe we need to have folder next... But save all previous old version for history...

Unable to do local build of che-plugin-registry

I am trying to build che-plugin-registry from 7.28.X branch. For instance I am not changing anything just trying to build as-is and i am getting error as either of below errors.

I can see that the plugin is downloadable from browser and it does have package.json. So what can be the issue here.

stack=Error: end of central directory record signature not found

or

UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/tmp/che-plugin-registry/unpack-folder/vscode.typescript-language-features-1.49.3.vsix/extension/package.json'

New Plugins are not displayed in index list

I tried to add a meta.yml for the vscode extension in v3/plugins/{publisher}/{plugin-name}/{version}/ directory... but, it is not showing up in the index list. What am I doing wrong?

Following is the meta.yaml

publisher: GabrielBB
apiVersion: v3
version: 0.9.9
type: VS Code extension
name: vscode-lombok
displayName: Lombok 
title: Lombok Annotations.
description: TA lightweight extension to support Lombok annotations processing in Visual Studio Code.
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg
category: Language
repository: https://github.com/GabrielBB/vscode-lombok
firstPublicationDate: '2018-03-11'
spec:
  extensions:
    - vscode:extension/GabrielBB.vscode-lombok
latestUpdateDate: "2019-09-14"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.