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

Add Camel WSDl2Rest VS Code Extension (#120) #124

Conversation

bfitzpat
Copy link
Contributor

Signed-off-by: Brian Fitzpatrick bfitzpat@redhat.com

create Pull request to check if tests are passing.

How and where to create automated test checking that the plugin is working correctly in Che?

What does this PR do?

this PR is adding the Camel WSDL2Rest extension to the list of extensions in Che

@bfitzpat bfitzpat changed the title Add Apche Camel VS Code Extension (#120) Add Camel WSDl2Rest VS Code Extension (#120) Apr 23, 2019
@bfitzpat bfitzpat force-pushed the 120-AddVSCodeWSDL2RestVSCodeExtension branch from 75338e7 to 76561a0 Compare April 23, 2019 18:19
@bfitzpat
Copy link
Contributor Author

bfitzpat commented Apr 23, 2019

I suspect it has failed "Error: Failed to run the workspace: "Unrecoverable event occurred: 'FailedCreate', 'Error creating: pods "workspaceeqctcf9ese0j13ta.che-jwtproxy-678cf9db96-t6hwq" is forbidden: exceeded quota: compute-resources, requested: limits.cpu=292m,limits.memory=157286400, used: limits.cpu=5737m,limits.memory=3081601024, limited: limits.cpu=6,limits.memory=3Gi', 'workspaceeqctcf9ese0j13ta.che-jwtproxy-678cf9db96'"

My guess is that is due to the size issues for the plug-in bringing in the wsdl2rest jars

Edit: I was wrong - included wrong version when I tried to set this up initially. Should have been 0.0.7 not 0.0.8. Revised PR and tried again - got further this time.

@bfitzpat
Copy link
Contributor Author

bfitzpat commented Apr 23, 2019

I think we're definitely hitting size issues now...

Press F5 or click here to try again.

Cleaning /plugins dir

Starting Init Plugin Broker

Unified Che Plugin Broker

List of plugins and editors to install
- che-machine-exec-plugin:0.0.1 - Che Plug-in with che-machine-exec service to provide creation terminal or tasks for Eclipse CHE workspace machines.
- camel-tooling.vscode-apache-camel:0.0.14 - This VS Code extension provides support for Apache Camel.
- camel-tooling.vscode-wsdl2rest:0.0.7 - A VS Code extension supporting wsdl2rest via Camel Rest DSL.
- org.eclipse.che.editor.theia:1.0.0 - Eclipse Theia

Starting Che common plugins processing

Starting Theia plugins processing

Starting VS Code plugins processing

Downloading VS Code extension for plugin 'camel-tooling.vscode-apache-camel:0.0.14'

Downloading VS Code extension for plugin 'camel-tooling.vscode-wsdl2rest:0.0.7'

All plugins have been successfully processed

pulling image "eclipse/che-unified-plugin-broker:v0.15.1"

Successfully pulled image "eclipse/che-unified-plugin-broker:v0.15.1"

Created container

Started container

Starting Che common plugins processing

List of plugins and editors to install
- che-machine-exec-plugin:0.0.1 - Che Plug-in with che-machine-exec service to provide creation terminal or tasks for Eclipse CHE workspace machines.
- camel-tooling.vscode-apache-camel:0.0.14 - This VS Code extension provides support for Apache Camel.
- camel-tooling.vscode-wsdl2rest:0.0.7 - A VS Code extension supporting wsdl2rest via Camel Rest DSL.
- org.eclipse.che.editor.theia:1.0.0 - Eclipse Theia

Unified Che Plugin Broker

Starting Theia plugins processing

Starting VS Code plugins processing

Downloading VS Code extension for plugin 'camel-tooling.vscode-apache-camel:0.0.14'

Downloading VS Code extension for plugin 'camel-tooling.vscode-wsdl2rest:0.0.7'

All plugins have been successfully processed

pulling image "eclipse/che-dev:nightly"

Successfully pulled image "eclipse/che-dev:nightly"

Created container

Started container

pulling image "eclipse/che-machine-exec"

Successfully pulled image "eclipse/che-machine-exec"

Created container

Started container

pulling image "eclipse/che-theia:latest"

Successfully pulled image "eclipse/che-theia:latest"

Created container

Started container

pulling image "eclipse/che-remote-plugin-runner-java8:next"

Successfully pulled image "eclipse/che-remote-plugin-runner-java8:next"

Created container

Started container

pulling image "eclipse/che-remote-plugin-runner-java8:next"

Successfully pulled image "eclipse/che-remote-plugin-runner-java8:next"

Created container

Started container

Error: Failed to run the workspace: "Unrecoverable event occurred: 'FailedCreate', 'Error creating: pods "workspaceeqctcf9ese0j13ta.che-jwtproxy-678cf9db96-rrmc4" is forbidden: exceeded quota: compute-resources, requested: limits.cpu=292m,limits.memory=157286400, used: limits.cpu=5737m,limits.memory=3081601024, limited: limits.cpu=6,limits.memory=3Gi', 'workspaceeqctcf9ese0j13ta.che-jwtproxy-678cf9db96'"

@apupier
Copy link
Contributor

apupier commented Apr 24, 2019

the workspace creation is working fine for me:

image

I'm using

 "attributes": {
    "plugins": "che-machine-exec-plugin:0.0.1,https://raw.githubusercontent.com/bfitzpat/che-plugin-registry/120-AddVSCodeWSDL2RestVSCodeExtension/plugins/camel-tooling.vscode-wsdl2rest:0.0.7",
    "persistVolumes": "false",
    "editor": "org.eclipse.che.editor.theia:1.0.0"
  },

The error of reaching the size limit seems more related to the fact that you have several plugins activated (based on log there is also camel-tooling.vscode-apache-camel:0.0.14 ). Then I suspect more this kind of issue to happen: eclipse-che/che#13146 (comment)

@apupier
Copy link
Contributor

apupier commented Apr 24, 2019

the Travis Ci error seems unrelated to this PR:

Step 8/12 : FROM registry.centos.org/centos/httpd-24-centos7
Get https://registry.centos.org/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
The command "docker build . --no-cache" exited with 1.

@bfitzpat bfitzpat force-pushed the 120-AddVSCodeWSDL2RestVSCodeExtension branch from 24e681e to 2bf5e6c Compare April 24, 2019 13:07
@bfitzpat
Copy link
Contributor Author

We now are able to bring up the extension in Che, but ran into an issue with the file dialog. See eclipse-che/che#13232

@garagatyi
Copy link

Please note that I added CircleCI and Eclipse sign off check to required checks for PRs.
Since this PR was created before CircleCI was configured in the repository you have to commit something to this PR to initiate CircleCI build that is required to proceed with merging the PR.
Sorry for the inconvenience.

@bfitzpat
Copy link
Contributor Author

@ibuziuk Change triggered, but build failed with "No configuration was found in your project. Please refer to https://circleci.com/docs/2.0/ to get started with your configuration." Any ideas?

@apupier
Copy link
Contributor

apupier commented Apr 25, 2019

@ibuziuk Change triggered, but build failed with "No configuration was found in your project. Please refer to https://circleci.com/docs/2.0/ to get started with your configuration." Any ideas?

you need to rebase on master

Signed-off-by: Brian Fitzpatrick <bfitzpat@redhat.com>
…gistry

Signed-off-by: Brian Fitzpatrick <bfitzpat@redhat.com>
…: Brian Fitzpatrick <bfitzpat@redhat.com>

Signed-off-by: Brian Fitzpatrick <bfitzpat@redhat.com>
Signed-off-by: Brian Fitzpatrick <bfitzpat@redhat.com>
@bfitzpat bfitzpat force-pushed the 120-AddVSCodeWSDL2RestVSCodeExtension branch from 3642bc5 to 60b3d92 Compare April 25, 2019 12:46
@bfitzpat
Copy link
Contributor Author

@ibuziuk - seems there are some issues with a few of the scripts, which are unchanged by this PR


find . -type f -name '*.sh' | wc -l
find . -type f -name '*.sh' | xargs shellcheck --external-sources

11

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 ./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 ./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_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 ./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 ./check_plugins_location_v2.sh line 15:
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_location_v2.sh line 18:
    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 ./index_v2.sh line 19:
    evaluate_plugin_id $1
                       ^-- SC2086: Double quote to prevent globbing and word splitting.


In ./index_v2.sh line 28:
    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 41:
        plugin_id=$(getId $i)
                          ^-- SC2086: Double quote to prevent globbing and word splitting.


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


In ./index_v2.sh line 46:
            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 62:
        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

@garagatyi
Copy link

@bfitzpat that CI check is not required. Do not pay attention to it at the moment

@bfitzpat
Copy link
Contributor Author

bfitzpat commented May 2, 2019

Replaced by #136

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.

4 participants