Project

General

Profile

Bug #9220

Bridge fails if max disk limitation is 0

Added by Ilja Zakharov 11 months ago. Updated 11 months ago.

Status:
Closed
Priority:
Immediate
Category:
Bridge
Target version:
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'>

History

#1

Updated by Evgeny Novikov 11 months ago

  • Priority changed from Urgent to Immediate

This is one more unpleasant regression.

#2

Updated by Vladimir Gratinskiy 11 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved

Fixed in "bridge-1.1".

#3

Updated by Evgeny Novikov 11 months 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.

Also available in: Atom PDF