Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Implement remote plugin resources retrieving #430

Merged
merged 1 commit into from
Sep 10, 2019
Merged

Implement remote plugin resources retrieving #430

merged 1 commit into from
Sep 10, 2019

Conversation

mmorhun
Copy link
Contributor

@mmorhun mmorhun commented Sep 6, 2019

Signed-off-by: Mykola Morhun mmorhun@redhat.com

What does this PR do?

Adds PluginReaderExtension class which handles case when requested resource is not found locally and in such cases sends request to corresponding sidecar where plugin resources are actually stored.

This PR does not handle resources for remote plugin webview because they are handles in a different way than usual plugin resources. Created issue for that problem: eclipse-che/che#14444

Changelog

Added support for remote plugins resources on Che Theia frontend side.

Release Notes

Added support for remote plugins resources on Che Theia frontend side.

Screenshots

Two remote plugins are loaded: Kubernetes plugins and Git UI Tools plugin (last two items in left sidebar)

remote-plugins
gut-ui-tools-remote-resources

Fixes eclipse-che/che#13750
Depends on: eclipse-theia/theia#6126

@che-bot
Copy link
Contributor

che-bot commented Sep 6, 2019

E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:

@@ -214,6 +221,32 @@ to pick-up automatically a free port`));
return;
}

// asked to send plugin resource
if (jsonParsed.internal.method === 'getResource') {
Copy link
Contributor

@AndrienkoAleksandr AndrienkoAleksandr Sep 6, 2019

Choose a reason for hiding this comment

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

Sorry, for stop method we have one more check:
jsonParsed.internal.method && jsonParsed.internal.method === 'stop'
Maybe you need to apply jsonParsed.internal.method to your code too?
=> if (jsonParsed.internal.method && jsonParsed.internal.method === 'getResource') {

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 don't think so. We are sure that jsonParsed.internal is present. Then we need to check jsonParsed.internal.method field. Of course, we can firstly check for undefined and then compare to method name, but I see no point because we may just check equality. If method field is undefined it is definitely not equal to getResource.

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Sep 9, 2019

E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:

@mmorhun
Copy link
Contributor Author

mmorhun commented Sep 9, 2019

crw-ci-test

@eclipse-che eclipse-che deleted a comment from che-bot Sep 9, 2019
@che-bot
Copy link
Contributor

che-bot commented Sep 9, 2019

E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:

@che-bot
Copy link
Contributor

che-bot commented Sep 9, 2019

E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has failed:

'pluginId': pluginId,
'path': resourcePath
}
}));
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to call resolve() somewhere in the promise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have to call resolve, but not here. It is called here.

@mmorhun
Copy link
Contributor Author

mmorhun commented Sep 10, 2019

crw-ci-test

@che-bot
Copy link
Contributor

che-bot commented Sep 10, 2019

E2E Happy path tests of Eclipse Che Single User on K8S (minikube v1.1.1) has been successful:

@mmorhun mmorhun merged commit eaaf7db into master Sep 10, 2019
@mmorhun mmorhun deleted the CHE-13750-2 branch September 10, 2019 14:41
dmytro-ndp pushed a commit that referenced this pull request Sep 11, 2019
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
vinokurig pushed a commit that referenced this pull request Apr 6, 2021
…430)

* CRW-653 support optional extra processing to check backup registries; tweak console output to report digest and source image when passing, and which image failed if skipping

Change-Id: Ieee4cca1344b2dd4f86c10b9e4ceae2eb02dcdd8
Signed-off-by: nickboldt <nboldt@redhat.com>

* disable shellcheck SC1091

Change-Id: I1f0a4139ae2aad3359f3fc9c30fa08dc328d893a
Signed-off-by: nickboldt <nboldt@redhat.com>

* shellcheck disable SC1090 too

Change-Id: I798d8146e67bdb1619242f1c1d2c803b05dde3ee
Signed-off-by: nickboldt <nboldt@redhat.com>

* externalize SCRIPT_DIR and make shellcheck happy too

Change-Id: I3e8cfb96e79de1b8dd441075a6f56e8fa9a604fc
Signed-off-by: nickboldt <nboldt@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icons aren't displayed on a contributed view container
6 participants