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

Implement remote plugin runtime injection #14333

Closed
wants to merge 2 commits into from

Conversation

AndrienkoAleksandr
Copy link
Contributor

What does this PR do?

Implement remote plugin runtime injection :
Inject remote plugin injection with help of init container and changing plugin container command and arguments

What issues does this PR fix or reference?

redhat-developer/rh-che#1449
Needed for #13387

DEPENDS ON RP:
eclipse-che/che-plugin-broker#71

Signed-off-by: Oleksandr Andriienko oandriie@redhat.com

Inject remote plugin injection with help of init container and changing plugin container command and arguments

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Aug 26, 2019

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

@che-bot che-bot added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/enhancement A feature request - must adhere to the feature request template. labels Aug 26, 2019
@che-bot
Copy link
Contributor

che-bot commented Aug 26, 2019

E2E tests of Eclipse Che Multiuser on OCP has been successful:

Copy link
Contributor

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

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

Generally LGTM, I'd like to test the changes before approval.

Please consider test cases for patching.

throws InternalInfrastructureException {
return chePlugins
.stream()
.filter(chePlugin -> "che editor".equals(chePlugin.getType().toLowerCase()))
Copy link
Contributor

Choose a reason for hiding this comment

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

"che editor" should be extracted to a Constant.

.orElseThrow(
() ->
new InternalInfrastructureException(
"Workspace should has defined at least one editor"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Workspace should has defined at least one editor"));
"Workspace should have at least one editor defined"));


boolean pluginIsMatched = pluginIsMatchedToPatch(pluginType, pluginPatcher);

if (pluginIsMatched) {
Copy link
Contributor

Choose a reason for hiding this comment

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

No reason to use the intermediate variable, we could just do if (pluginIsMatchedToPatch(pluginType, pluginPatcher)

Container k8sContainer = toK8sContainer(container, emptyList());

k8sContainer.setCommand(container.getCommand());
k8sContainer.setArgs(container.getArgs());
Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT about adding args and command to k8sContainerResolver instead of doing it manually?

@@ -651,6 +651,7 @@ private ChePlugin createChePlugin(String name, CheContainer... containers) {
ChePlugin plugin = new ChePlugin();
plugin.setName(name);
plugin.setPublisher(publisher);
plugin.setType("Che editor");
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have test cases for the patching process.

Copy link
Contributor

@davidfestal davidfestal left a comment

Choose a reason for hiding this comment

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

It seems to me that we might need to have a bit more discussion on the underlying meta.yaml and plugin model changes before merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants