mikelangelo-project / capstan

Capstan, a tool for packaging and running your application on OSv.
http://osv.io/capstan/
Other
19 stars 7 forks source link

Refactor logic that picks optimal flavor #16

Closed miha-plesko closed 7 years ago

miha-plesko commented 7 years ago

When fixing minor bug in function PickFlavor it turned out that logic inside is overcomplicated because it assumes that it picks flavor from the list of all available flavors, while it actually only picks optimal flavor from a list of all matching flavors. (By 'matching flavors' we denote all those flavors that apply to given disk and RAM criteria). Fixed - the function is now utterly simplified yet it still picks optimal flavor.

miha-plesko commented 7 years ago

@gberginc that's a good find, thanks! I've applied the comment and repushed. Please take a look.