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

Added attributes field to workspace config object #10721

Merged
merged 4 commits into from
Aug 13, 2018

Conversation

sleshchenko
Copy link
Member

What does this PR do?

Adds attributes field to workspace config object.

Fetches Che plugins from WorkspaceConfig's attributes instead of Workspace's ones. It allows using Che plugins in stacks and factories.

What issues does this PR fix or reference?

#10368

Release Notes

Docs PR

@sleshchenko
Copy link
Member Author

ci-test

@benoitf benoitf added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. labels Aug 10, 2018
@@ -111,6 +117,14 @@ public String getDefaultEnv() {
return environments;
}

@Override
public Map<String, String> getAttributes() {
if (attributes == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Attrs are initialized in constructor, so they probably shouldn't be null

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not actually true.
Attributes are initialized in constructor only if the corresponding constructor parameter is not null. Also, there is a setter method that may receive null and set it into the attributes field.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see no setter here

Copy link
Member Author

Choose a reason for hiding this comment

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

@mshaposhnik You're right =) It though it is WorkspaceConfigImpl from workspace-api module.
BTW Comment about constructor parameter is actual for ide workspace config impl too.


--Workspace config attributes ---------------------------------------------------------
CREATE TABLE che_workspace_cfg_attributes (
workspace_id VARCHAR(255),
Copy link
Contributor

Choose a reason for hiding this comment

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

we need index for this field workspace_id

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

@@ -0,0 +1,20 @@
--
-- Copyright (c) 2012-2018 Red Hat, Inc.
-- All rights reserved. This program and the accompanying materials
Copy link
Contributor

Choose a reason for hiding this comment

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

EPL2

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@@ -57,4 +57,9 @@
* least 1 default environment and may contain N environments.
*/
Map<String, ? extends Environment> getEnvironments();

/**
* Returns workspace config attributes. Workspace attributes must not contain null keys or values.
Copy link
Contributor

@mshaposhnik mshaposhnik Aug 10, 2018

Choose a reason for hiding this comment

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

Pls rephrase 2nd sentence to be clear that it is talking about config attributes

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Thanks

@sleshchenko sleshchenko changed the title Ws config attributes Added attributes field to workspace config object Aug 10, 2018
@sleshchenko sleshchenko self-assigned this Aug 10, 2018
@riuvshin
Copy link
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10721
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@sleshchenko
Copy link
Member Author

ci-test

@riuvshin
Copy link
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10721
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@sleshchenko sleshchenko merged commit 74cde67 into eclipse-che:master Aug 13, 2018
@sleshchenko sleshchenko deleted the wsConfigAttributes branch August 13, 2018 07:47
@benoitf benoitf added this to the 6.10.0 milestone Aug 13, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Aug 13, 2018
skabashnyuk pushed a commit that referenced this pull request Jan 3, 2020
Removed duplicated declaration of che-core-api-core dependency
Added attributes field to workspace config object
Fetch Che plugins from WorkspaceConfig's attributes instead of Workspace's ones
Remove duplicated declarations in pom file of postgresql-tck module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants