-
Notifications
You must be signed in to change notification settings - Fork 19
capacityConstaint will throw exception on empty domain, should it? #73
Comments
Thanks for the bug report @reith
I agree that this should not be a generic
Could you expand on this? Is it the case that you'd like to control which tables/views
It does catch I had another branch where I triggered pre-emption if the initial placement attempt fails, but that's the kind of logic you'd want to execute when catching |
…eption on empty domains (#73) Signed-off-by: Lalith Suresh <lsuresh@vmware.com>
Also worth asking given the last point: Would you like tooling to help diagnose why a |
Great! thanks.
I meant to ensure
Yes, you are right. I was just looking for checked exceptions and method signature and scopes.
Throwing more specific exceptions is certainly useful and I think it's the prime reason exceptions can be useful to be part of API, otherwise they are not more expressive than return values. In my case it wasn't hard to find out which constraint is failing but having more contextual data in exceptions would be nice. I close this one, thanks for the fix. |
…ption from model creation (#73) Signed-off-by: Lalith Suresh <lsuresh@vmware.com>
…ption from model creation (#73) Signed-off-by: Lalith Suresh <lsuresh@vmware.com>
Currently
model.solve()
with or-tools backend will throw a runtime exception if there is acapacityConstraint
being evaluated on empty domain set. Is it necessary? For now library users can check domain by querying table or view thatcapacityConstraint
applies on but they should also synchronize models data-cache and database query execution until there is an API to query from model's cached data (is it?).Also, k8s-scheduler implementations assumes
mode.solve()
does not throw exceptions (otherwise scheduler execution loop will be terminated). Maybe it's better to make sure operations never throw exception or maybe just checked exceptions?The text was updated successfully, but these errors were encountered: