Actions
Bug #9220
closedBridge fails if max disk limitation is 0
Start date:
08/13/2018
Due date:
% Done:
100%
Estimated time:
Detected in build:
svn
Platform:
Published in build:
Description
If is set max disk limitation to 0 (to disable it) I get the exception:
Positive float expected, got value "0.0" of type <class 'float'>
Traceback (most recent call last):
File "/work/zakharov/src/klever/bridge/bridge/CustomViews.py", line 61, in dispatch
return getattr(super(), 'dispatch')(request, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/django/views/generic/base.py", line 89, in dispatch
return handler(request, *args, **kwargs)
File "/work/zakharov/src/klever/bridge/bridge/CustomViews.py", line 94, in post
return JsonResponse(self.get_context_data())
File "/work/zakharov/src/klever/bridge/jobs/views.py", line 481, in get_context_data
StartJobDecision(self.request.user, self.kwargs['job_id'], GetConfiguration(**getconf_kwargs).configuration)
File "/work/zakharov/src/klever/bridge/jobs/configuration.py", line 383, in __init__
self.configuration = Configuration(*conf_args)
File "/work/zakharov/src/klever/bridge/jobs/configuration.py", line 288, in __init__
self.resources = self.__get_resources(*resources)
File "/work/zakharov/src/klever/bridge/jobs/configuration.py", line 335, in __get_resources
self.__float_value(max_disk),
File "/work/zakharov/src/klever/bridge/jobs/configuration.py", line 314, in __float_value
.format('Positive float' if positive else 'Float', value, type(value)))
ValueError: Positive float expected, got value "0.0" of type <class 'float'>
Updated by Evgeny Novikov over 6 years ago
- Priority changed from Urgent to Immediate
This is one more unpleasant regression.
Updated by Vladimir Gratinskiy over 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Fixed in "bridge-1.1".
Updated by Evgeny Novikov about 6 years ago
- Status changed from Resolved to Closed
As both automatic and manual tests passed, I merged the branch to master in 1c078402e. Don't forget to recalculate caches for unsafe marks through the manager tools.
Actions