-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added attributes field to workspace config object #10721
Conversation
ci-test |
@@ -111,6 +117,14 @@ public String getDefaultEnv() { | |||
return environments; | |||
} | |||
|
|||
@Override | |||
public Map<String, String> getAttributes() { | |||
if (attributes == null) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EPL2
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Thanks
ci-test build report: |
ci-test |
704f877
to
7e1ad81
Compare
ci-test build report: |
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
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