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-1812 Add ability to use -1 in the amount of resources #2174

Merged
merged 2 commits into from
May 12, 2017

Conversation

sleshchenko
Copy link
Contributor

What does this PR do?

Adds ability to use -1 in the amount of resources while setting resources limits via external configurations or via free resources service.

What issues does this PR fix or reference?

#1812

Changelog

Added ability to use -1 in the amount of resources.

Release Notes

N/A

Docs PR

N/A

@ashumilova ashumilova added this to the 5.11.0 milestone May 11, 2017
@@ -105,7 +105,7 @@ export class RamInfoController {
let ram = this.lodash.find(resources, (resource: any) => {
return resource.type === CodenvyResourceLimits.RAM;
});
return ram ? (ram.amount / 1024) : 0;
return (ram && ram.amount > -1) ? (ram.amount / 1024) : -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be instead of > -1 or > 0 (or != -1)

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed

Sergii Leschenko and others added 2 commits May 12, 2017 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants