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

Update plugin brokers to v3.4.0 and enable plugin merging #17785

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

amisevsk
Copy link
Contributor

@amisevsk amisevsk commented Sep 3, 2020

What does this PR do?

Update plugin brokers to v3.4.0 to pick up changes from eclipse-che/che-plugin-broker#111 and enable merging plugins.

Note: This PR depends on eclipse-che/che-operator#429. If a Che server with these changes is deployed, workspace start will fail unless the v3.4.0 brokers are used (as the commandline argument is not recognized)

What issues does this PR fix or reference?

Required for #15373

Release Notes

The plugin broker, which downloads Theia plugins while workspaces are starting up, now has the capability to merge plugins that run in the same sidecar container.

Docs PR

eclipse-che/che-docs#1576

@amisevsk
Copy link
Contributor Author

amisevsk commented Sep 3, 2020

To test the changes, the following workspaces will result in plugins being merged:

devfiles/apache-camel-k/devfile.yaml
devfiles/apache-camel-springboot/devfile.yaml
devfiles/dotnet-asp.net/devfile.yaml
devfiles/dotnet/devfile.yaml
devfiles/nodejs/devfile.yaml
devfiles/nodejs-mongo/devfile.yaml
devfiles/php-laravel/devfile.yaml
devfiles/php-mysql/devfile.yaml
devfiles/php-symfony/devfile.yaml
devfiles/php-web-simple/devfile.yaml

@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 Sep 3, 2020
@che-bot
Copy link
Contributor

che-bot commented Sep 3, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@sleshchenko
Copy link
Member

Just rebased against master to fix happy path test.

@che-bot
Copy link
Contributor

che-bot commented Sep 7, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@sleshchenko
Copy link
Member

There is some issue with used plugin broker:

Failed to start Kubernetes runtime of workspace workspacexba1p6wioqv734up. Cause: Plugins installation process timed out

Manual testing is needed to retrieve plugin broker logs

@sleshchenko sleshchenko self-requested a review September 7, 2020 07:09
@amisevsk
Copy link
Contributor Author

amisevsk commented Sep 8, 2020

I suspect the happy path tests are failing because the Che instance is installing with brokers v3.3.0 set in the configmap. They are always overridden in the operator; this should be addressed by eclipse-che/che-operator#429

@che-bot
Copy link
Contributor

che-bot commented Sep 8, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@sleshchenko
Copy link
Member

[crw-ci-test]

Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

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

I think che-operator changes should be pulled into happy path test and hope the latest run will pass

@che-bot
Copy link
Contributor

che-bot commented Sep 9, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@amisevsk
Copy link
Contributor Author

@sleshchenko I've added a property + devfile attribute to control merging, PTAL. I set the default behavior for merging plugins to disabled for now, since the next release is coming so soon. We should enable it by default in the next snapshot.

@che-bot
Copy link
Contributor

che-bot commented Sep 11, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@amisevsk
Copy link
Contributor Author

Added docs PR eclipse-che/che-docs#1576

Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

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

👍

* This attribute enables or disables merging plugins while provisioning a workspace. When
* enabled, the plugin broker will be configured to attempt to merge plugins where possible (when
* two or more plugins share the same image and do not have conflicting settings). Should be
* set/read from {@link WorkspaceConfig#getAttributes}.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* set/read from {@link WorkspaceConfig#getAttributes}.
* set/read from {@link Devfile#getAttributes}.

?

Copy link
Member

Choose a reason for hiding this comment

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

P.S. I'm Ok with leaving as is as well just to be consistent in that file... But eventually, all these WorkspaceConfig#getAttributes should be changed to Devfile#getAttributes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, except for WORKSPACE_TOOLING_EDITOR_ATTRIBUTE which seems to be a legacy attribute.

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 also noticed the editorFree attribute is in org.eclipse.che.api.workspace.server.devfile.Constants instead of this file, which I think is maybe a mistake?

Copy link
Member

Choose a reason for hiding this comment

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

I may be wrong but there was some time when Devfile lived in a separate maven module and workspace was not aware of that. So, I assume that now editorFree can be moved here but it's not the purpose of this PR...

Copy link
Contributor

@metlos metlos left a comment

Choose a reason for hiding this comment

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

LGTM apart from 1 comment.

# If set to true, the plugin brokers will attempt to merge plugins when possible (i.e. they run in
# the same sidecar image and do not have conflicting settings). This value is the default setting
# used when the devfile does not specify otherwise, via the "mergePlugins" attribute.
che.workspace.plugin_broker.default_merge_plugins=false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this set to false by default because of minimizing the possible changes in the behavior? If I understood the changes in the plugin broker, it should be fairly conservative about when it actually does merge the plugins or not.

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 set it to false because the intention was to merge this for the coming release -- I didn't want to risk introducing a regression with no time to fix it. My basic plan was

  • 7.19.0: merging available, can be enabled by setting attribute in devfile
  • 7.20.0: merging available and default, can be disabled by setting attribute in devfile

I generally try to get changes that can impact the default flow + workspace startup in earlier in a sprint so we can catch any unforeseen issues before releasing, so this is kind of a workaround.

@che-bot
Copy link
Contributor

che-bot commented Sep 14, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

Add attribute 'mergePlugins' to devfile to manually enable/disable plugin
merging in the plugin broker. Default value when no property is present
is controlled by property che.workspace.plugin_broker.default_merge_plugins

Add a small note to the plugin broker images config lines in
che.properties to make it clear that the Che Operator overrides the
properties by default.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
@amisevsk amisevsk force-pushed the update-broker-v3.4.0 branch from ba5c321 to 0d0bd0b Compare September 15, 2020 13:55
@amisevsk
Copy link
Contributor Author

Merged #17870 and squashed + rebased this PR on master.

@che-bot
Copy link
Contributor

che-bot commented Sep 15, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@amisevsk
Copy link
Contributor Author

[crw-ci-test]

@che-bot
Copy link
Contributor

che-bot commented Sep 15, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@amisevsk
Copy link
Contributor Author

[crw-ci-test]

@che-bot
Copy link
Contributor

che-bot commented Sep 15, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@amisevsk amisevsk merged commit cf7e314 into eclipse-che:master Sep 16, 2020
@che-bot che-bot removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Sep 16, 2020
@che-bot che-bot added this to the 7.19 milestone Sep 16, 2020
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants