-
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
CODENVY-1506 Rework workspace manager methods to optionally return runtime info #3714
Conversation
Conflicts: wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/jpa/JpaWorkspaceDao.java
requireNonNull(namespace, "Required non-null namespace"); | ||
final List<WorkspaceImpl> workspaces = workspaceDao.getByNamespace(namespace); | ||
for (WorkspaceImpl workspace : workspaces) { | ||
normalizeState(workspace); | ||
if (includeRuntimes) { |
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.
Would be logic the same if you rewrite code as
for (WorkspaceImpl workspace : workspaces) {
normalizeState(workspace, includeRuntimes);
}
?
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.
+1
requireNonNull(user, "Required non-null user id"); | ||
final List<WorkspaceImpl> workspaces = workspaceDao.getWorkspaces(user); | ||
for (WorkspaceImpl workspace : workspaces) { | ||
workspace.setStatus(runtimes.getStatus(workspace.getId())); | ||
if (includeRuntimes) { |
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.
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/1616/ |
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/1640/ |
Build # 1644 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1644/ to view the results. |
What does this PR do?
Methods getWorkspaces and getByNamespace now have boolead parameter which indicates whether to fetch runtimes or not
What issues does this PR fix or reference?
codenvy/codenvy#1506