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

CODENVY-1506 Rework workspace manager methods to optionally return runtime info #3714

Merged
merged 7 commits into from
Jan 16, 2017

Conversation

mkuznyetsov
Copy link
Contributor

@mkuznyetsov mkuznyetsov commented Jan 13, 2017

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

Mihail Kuznyetsov added 3 commits January 12, 2017 18:08
Conflicts:
	wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/jpa/JpaWorkspaceDao.java
@mkuznyetsov mkuznyetsov changed the title Rework workspace manager methods to optionally return runtime info CODENVY-1506 Rework workspace manager methods to optionally return runtime info Jan 13, 2017
requireNonNull(namespace, "Required non-null namespace");
final List<WorkspaceImpl> workspaces = workspaceDao.getByNamespace(namespace);
for (WorkspaceImpl workspace : workspaces) {
normalizeState(workspace);
if (includeRuntimes) {
Copy link
Member

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);
}

?

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) {

Choose a reason for hiding this comment

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

@codenvy-ci
Copy link

@codenvy-ci
Copy link

@codenvy-ci
Copy link

Build # 1644 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1644/ to view the results.

@mkuznyetsov mkuznyetsov merged commit 57c47d1 into master Jan 16, 2017
@mkuznyetsov mkuznyetsov deleted the che-3082 branch January 16, 2017 15:00
@slemeur slemeur added this to the 5.1.0 milestone Jan 17, 2017
@slemeur slemeur added the kind/bug Outline of a bug - must adhere to the bug report template. label Jan 17, 2017
@JamesDrummond JamesDrummond mentioned this pull request Jan 31, 2017
9 tasks
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants