{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/che/pulls/comments/210244374","pull_request_review_id":146416343,"id":210244374,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDI0NDM3NA==","diff_hunk":"@@ -116,14 +121,25 @@ void addRamLimitAttribute(\n         machineConfig = new InternalMachineConfig();\n         machines.put(entry.getKey(), machineConfig);\n       }\n+      Long memLimit = entry.getValue().getMemLimit();\n+      Long memRequest = entry.getValue().getMemRequest();\n+      // if both properties are not defined\n+      if ((memLimit == null || memLimit <= 0) && (memRequest == null || memRequest <= 0)) {","path":"infrastructures/docker/environment/src/main/java/org/eclipse/che/workspace/infrastructure/docker/environment/compose/ComposeEnvironmentFactory.java","position":67,"original_position":67,"commit_id":"0e64a562efcd8382372a6c8e3b0cbf94cfd2bb87","original_commit_id":"0e64a562efcd8382372a6c8e3b0cbf94cfd2bb87","user":{"login":"i300543","id":11046606,"node_id":"MDQ6VXNlcjExMDQ2NjA2","avatar_url":"https://avatars2.githubusercontent.com/u/11046606?v=4","gravatar_id":"","url":"https://api.github.com/users/i300543","html_url":"https://github.com/i300543","followers_url":"https://api.github.com/users/i300543/followers","following_url":"https://api.github.com/users/i300543/following{/other_user}","gists_url":"https://api.github.com/users/i300543/gists{/gist_id}","starred_url":"https://api.github.com/users/i300543/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i300543/subscriptions","organizations_url":"https://api.github.com/users/i300543/orgs","repos_url":"https://api.github.com/users/i300543/repos","events_url":"https://api.github.com/users/i300543/events{/privacy}","received_events_url":"https://api.github.com/users/i300543/received_events","type":"User","site_admin":false},"body":"you are talking about DockerImageEnvironmentFactory and DockerfileEnvironmentFactory right ?\r\nthe logic there currently only sets values if they are not defined in machineConfig.\r\nso the values in the machine config at that point are the values requested by the user right ?\r\nand they might not be valid correct ?","created_at":"2018-08-15T11:51:40Z","updated_at":"2018-08-15T11:51:40Z","html_url":"https://github.com/eclipse/che/pull/10673#discussion_r210244374","pull_request_url":"https://api.github.com/repos/eclipse/che/pulls/10673","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eclipse/che/pulls/comments/210244374"},"html":{"href":"https://github.com/eclipse/che/pull/10673#discussion_r210244374"},"pull_request":{"href":"https://api.github.com/repos/eclipse/che/pulls/10673"}},"in_reply_to_id":210210615},"pull_request":{"url":"https://api.github.com/repos/eclipse/che/pulls/10673","id":206322639,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MzIyNjM5","html_url":"https://github.com/eclipse/che/pull/10673","diff_url":"https://github.com/eclipse/che/pull/10673.diff","patch_url":"https://github.com/eclipse/che/pull/10673.patch","issue_url":"https://api.github.com/repos/eclipse/che/issues/10673","number":10673,"state":"open","locked":false,"title":"Make Resource memory request configurable for k8s and OpenShift","user":{"login":"i300543","id":11046606,"node_id":"MDQ6VXNlcjExMDQ2NjA2","avatar_url":"https://avatars2.githubusercontent.com/u/11046606?v=4","gravatar_id":"","url":"https://api.github.com/users/i300543","html_url":"https://github.com/i300543","followers_url":"https://api.github.com/users/i300543/followers","following_url":"https://api.github.com/users/i300543/following{/other_user}","gists_url":"https://api.github.com/users/i300543/gists{/gist_id}","starred_url":"https://api.github.com/users/i300543/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i300543/subscriptions","organizations_url":"https://api.github.com/users/i300543/orgs","repos_url":"https://api.github.com/users/i300543/repos","events_url":"https://api.github.com/users/i300543/events{/privacy}","received_events_url":"https://api.github.com/users/i300543/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Sergey Kuperman <sergey.kuperman@sap.com>\r\n\r\n### What does this PR do?\r\nDefines memory request parameter when provisioning user workspaces for k8s and openshift, which would define memory reserved on creation, and not only the limit for max workspace memory.\r\nwithout this reserved memory = limit memory which would not allow to create workspaces greedily \r\n(if workspacesCount*memoryLimit > availableMemory -> workspace creation fails, or containers are destroyed to free up memory)\r\n\r\n#### Release notes\r\nAdding additional attribute when creating workspace : \r\n      'memoryRequestBytes' - which will define memory requested to allocate on creation for the \r\n      workspace\r\n      similarly to attribute 'memoryLimitBytes' which will define maximum memory workspace restriction\r\nThose attributes can be passed to create workspace payload call (wsmaster endpoint (POST) /workspace)\r\nIf only the limit is present, requested memory = limit.\r\n\r\n#### Changelog\r\n - rename che.workspace.default_memory_mb property to che.workspace.default_memory_limit_mb\r\n - add che.workspace.default_memory_request_mb property\r\n - fix all references to the limit property, add usage of the request property in all relevant places (hopefully)\r\n - did not touch the dashboard project or EnvironmentRamCalculator class\r\n\r\n\r\n#### Docs PR\r\n will add later\r\n","created_at":"2018-08-06T08:21:37Z","updated_at":"2018-08-15T11:51:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9545bc37e2e2610e893db9700462e11031fb157","assignee":null,"assignees":[],"requested_reviewers":[{"login":"benoitf","id":436777,"node_id":"MDQ6VXNlcjQzNjc3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/436777?v=4","gravatar_id":"","url":"https://api.github.com/users/benoitf","html_url":"https://github.com/benoitf","followers_url":"https://api.github.com/users/benoitf/followers","following_url":"https://api.github.com/users/benoitf/following{/other_user}","gists_url":"https://api.github.com/users/benoitf/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitf/subscriptions","organizations_url":"https://api.github.com/users/benoitf/orgs","repos_url":"https://api.github.com/users/benoitf/repos","events_url":"https://api.github.com/users/benoitf/events{/privacy}","received_events_url":"https://api.github.com/users/benoitf/received_events","type":"User","site_admin":false},{"login":"riuvshin","id":1636732,"node_id":"MDQ6VXNlcjE2MzY3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1636732?v=4","gravatar_id":"","url":"https://api.github.com/users/riuvshin","html_url":"https://github.com/riuvshin","followers_url":"https://api.github.com/users/riuvshin/followers","following_url":"https://api.github.com/users/riuvshin/following{/other_user}","gists_url":"https://api.github.com/users/riuvshin/gists{/gist_id}","starred_url":"https://api.github.com/users/riuvshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riuvshin/subscriptions","organizations_url":"https://api.github.com/users/riuvshin/orgs","repos_url":"https://api.github.com/users/riuvshin/repos","events_url":"https://api.github.com/users/riuvshin/events{/privacy}","received_events_url":"https://api.github.com/users/riuvshin/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":345100523,"node_id":"MDU6TGFiZWwzNDUxMDA1MjM=","url":"https://api.github.com/repos/eclipse/che/labels/status/code-review","name":"status/code-review","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/che/pulls/10673/commits","review_comments_url":"https://api.github.com/repos/eclipse/che/pulls/10673/comments","review_comment_url":"https://api.github.com/repos/eclipse/che/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/che/issues/10673/comments","statuses_url":"https://api.github.com/repos/eclipse/che/statuses/0e64a562efcd8382372a6c8e3b0cbf94cfd2bb87","head":{"label":"i300543:memoryRequestPR","ref":"memoryRequestPR","sha":"0e64a562efcd8382372a6c8e3b0cbf94cfd2bb87","user":{"login":"i300543","id":11046606,"node_id":"MDQ6VXNlcjExMDQ2NjA2","avatar_url":"https://avatars2.githubusercontent.com/u/11046606?v=4","gravatar_id":"","url":"https://api.github.com/users/i300543","html_url":"https://github.com/i300543","followers_url":"https://api.github.com/users/i300543/followers","following_url":"https://api.github.com/users/i300543/following{/other_user}","gists_url":"https://api.github.com/users/i300543/gists{/gist_id}","starred_url":"https://api.github.com/users/i300543/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i300543/subscriptions","organizations_url":"https://api.github.com/users/i300543/orgs","repos_url":"https://api.github.com/users/i300543/repos","events_url":"https://api.github.com/users/i300543/events{/privacy}","received_events_url":"https://api.github.com/users/i300543/received_events","type":"User","site_admin":false},"repo":{"id":142008843,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIwMDg4NDM=","name":"che","full_name":"i300543/che","owner":{"login":"i300543","id":11046606,"node_id":"MDQ6VXNlcjExMDQ2NjA2","avatar_url":"https://avatars2.githubusercontent.com/u/11046606?v=4","gravatar_id":"","url":"https://api.github.com/users/i300543","html_url":"https://github.com/i300543","followers_url":"https://api.github.com/users/i300543/followers","following_url":"https://api.github.com/users/i300543/following{/other_user}","gists_url":"https://api.github.com/users/i300543/gists{/gist_id}","starred_url":"https://api.github.com/users/i300543/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i300543/subscriptions","organizations_url":"https://api.github.com/users/i300543/orgs","repos_url":"https://api.github.com/users/i300543/repos","events_url":"https://api.github.com/users/i300543/events{/privacy}","received_events_url":"https://api.github.com/users/i300543/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/i300543/che","description":"Eclipse Che: Next-generation Eclipse IDE.  Open source workspace server and cloud IDE.","fork":true,"url":"https://api.github.com/repos/i300543/che","forks_url":"https://api.github.com/repos/i300543/che/forks","keys_url":"https://api.github.com/repos/i300543/che/keys{/key_id}","collaborators_url":"https://api.github.com/repos/i300543/che/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/i300543/che/teams","hooks_url":"https://api.github.com/repos/i300543/che/hooks","issue_events_url":"https://api.github.com/repos/i300543/che/issues/events{/number}","events_url":"https://api.github.com/repos/i300543/che/events","assignees_url":"https://api.github.com/repos/i300543/che/assignees{/user}","branches_url":"https://api.github.com/repos/i300543/che/branches{/branch}","tags_url":"https://api.github.com/repos/i300543/che/tags","blobs_url":"https://api.github.com/repos/i300543/che/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/i300543/che/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/i300543/che/git/refs{/sha}","trees_url":"https://api.github.com/repos/i300543/che/git/trees{/sha}","statuses_url":"https://api.github.com/repos/i300543/che/statuses/{sha}","languages_url":"https://api.github.com/repos/i300543/che/languages","stargazers_url":"https://api.github.com/repos/i300543/che/stargazers","contributors_url":"https://api.github.com/repos/i300543/che/contributors","subscribers_url":"https://api.github.com/repos/i300543/che/subscribers","subscription_url":"https://api.github.com/repos/i300543/che/subscription","commits_url":"https://api.github.com/repos/i300543/che/commits{/sha}","git_commits_url":"https://api.github.com/repos/i300543/che/git/commits{/sha}","comments_url":"https://api.github.com/repos/i300543/che/comments{/number}","issue_comment_url":"https://api.github.com/repos/i300543/che/issues/comments{/number}","contents_url":"https://api.github.com/repos/i300543/che/contents/{+path}","compare_url":"https://api.github.com/repos/i300543/che/compare/{base}...{head}","merges_url":"https://api.github.com/repos/i300543/che/merges","archive_url":"https://api.github.com/repos/i300543/che/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/i300543/che/downloads","issues_url":"https://api.github.com/repos/i300543/che/issues{/number}","pulls_url":"https://api.github.com/repos/i300543/che/pulls{/number}","milestones_url":"https://api.github.com/repos/i300543/che/milestones{/number}","notifications_url":"https://api.github.com/repos/i300543/che/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/i300543/che/labels{/name}","releases_url":"https://api.github.com/repos/i300543/che/releases{/id}","deployments_url":"https://api.github.com/repos/i300543/che/deployments","created_at":"2018-07-23T12:06:53Z","updated_at":"2018-08-14T11:36:09Z","pushed_at":"2018-08-14T11:36:06Z","git_url":"git://github.com/i300543/che.git","ssh_url":"git@github.com:i300543/che.git","clone_url":"https://github.com/i300543/che.git","svn_url":"https://github.com/i300543/che","homepage":"http://eclipse.org/che","size":93642,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"epl-2.0","name":"Eclipse Public License 2.0","spdx_id":"EPL-2.0","url":"https://api.github.com/licenses/epl-2.0","node_id":"MDc6TGljZW5zZTMy"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"5d26cafed488bb19e9a1897ab8008e7ecc46a868","user":{"login":"eclipse","id":56974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":32935745,"node_id":"MDEwOlJlcG9zaXRvcnkzMjkzNTc0NQ==","name":"che","full_name":"eclipse/che","owner":{"login":"eclipse","id":56974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/che","description":"Eclipse Che: Next-generation Eclipse IDE.  Open source workspace server and cloud IDE.","fork":false,"url":"https://api.github.com/repos/eclipse/che","forks_url":"https://api.github.com/repos/eclipse/che/forks","keys_url":"https://api.github.com/repos/eclipse/che/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/che/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/che/teams","hooks_url":"https://api.github.com/repos/eclipse/che/hooks","issue_events_url":"https://api.github.com/repos/eclipse/che/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/che/events","assignees_url":"https://api.github.com/repos/eclipse/che/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/che/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/che/tags","blobs_url":"https://api.github.com/repos/eclipse/che/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/che/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/che/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/che/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/che/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/che/languages","stargazers_url":"https://api.github.com/repos/eclipse/che/stargazers","contributors_url":"https://api.github.com/repos/eclipse/che/contributors","subscribers_url":"https://api.github.com/repos/eclipse/che/subscribers","subscription_url":"https://api.github.com/repos/eclipse/che/subscription","commits_url":"https://api.github.com/repos/eclipse/che/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/che/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/che/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/che/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/che/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/che/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/che/merges","archive_url":"https://api.github.com/repos/eclipse/che/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/che/downloads","issues_url":"https://api.github.com/repos/eclipse/che/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/che/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/che/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/che/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/che/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/che/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/che/deployments","created_at":"2015-03-26T15:31:01Z","updated_at":"2018-08-15T10:20:01Z","pushed_at":"2018-08-15T11:19:12Z","git_url":"git://github.com/eclipse/che.git","ssh_url":"git@github.com:eclipse/che.git","clone_url":"https://github.com/eclipse/che.git","svn_url":"https://github.com/eclipse/che","homepage":"http://eclipse.org/che","size":96744,"stargazers_count":4971,"watchers_count":4971,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":899,"mirror_url":null,"archived":false,"open_issues_count":895,"license":{"key":"epl-2.0","name":"Eclipse Public License 2.0","spdx_id":"EPL-2.0","url":"https://api.github.com/licenses/epl-2.0","node_id":"MDc6TGljZW5zZTMy"},"forks":899,"open_issues":895,"watchers":4971,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/che/pulls/10673"},"html":{"href":"https://github.com/eclipse/che/pull/10673"},"issue":{"href":"https://api.github.com/repos/eclipse/che/issues/10673"},"comments":{"href":"https://api.github.com/repos/eclipse/che/issues/10673/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/che/pulls/10673/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/che/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/che/pulls/10673/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/che/statuses/0e64a562efcd8382372a6c8e3b0cbf94cfd2bb87"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"i300543"}}