Bug #9028
closedUsing production decision configuration file does not work
Added by Evgeny Novikov over 6 years ago. Updated over 6 years ago.
100%
Description
When I downloaded a production decision configuration file and later try to use it to decide another job, I see that formatters are blank that forbids starting a job decision. I am not sure that this bug existed before recent changes, so perhaps this is a regression. May be you changed a logic somehow or added some additional checks.
Files
job-6d5dc.conf (1.56 KB) job-6d5dc.conf | Evgeny Novikov, 06/28/2018 12:37 PM | ||
job-decision-conf.json (420 Bytes) job-decision-conf.json | Evgeny Novikov, 06/28/2018 06:54 PM |
Updated by Vladimir Gratinskiy over 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
The problem was in console start job decision. There were no checks if logger formatters are empty strings (it was in javascript only). I'v added new checks in fix_9028.
Updated by Evgeny Novikov over 6 years ago
After your changes I got the following issue:
'NoneType' object is not subscriptable Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python3.6/site-packages/django/views/generic/base.py", line 69, in view return self.dispatch(request, *args, **kwargs) File "/home/novikov/work/klever/bridge/tools/profiling.py", line 185, in dispatch response = getattr(super(), 'dispatch')(request, *args, **kwargs) File "/usr/lib/python3.6/site-packages/django/views/generic/base.py", line 89, in dispatch return handler(request, *args, **kwargs) File "/usr/lib/python3.6/site-packages/django/views/generic/detail.py", line 106, in get context = self.get_context_data(object=self.object) File "/home/novikov/work/klever/bridge/jobs/views.py", line 445, in get_context_data 'data': jobs.utils.StartDecisionData(self.request.user, configuration) File "/home/novikov/work/klever/bridge/jobs/utils.py", line 1078, in __init__ self.schedulers = self.__get_schedulers() File "/home/novikov/work/klever/bridge/jobs/utils.py", line 1114, in __get_schedulers elif self.default[0][1] == SCHEDULER_TYPE[1][0]: TypeError: 'NoneType' object is not subscriptable
So, I can't even go to the page to start up a job decision.
Updated by Evgeny Novikov over 6 years ago
- Status changed from Open to Closed
Now it works, so, I merged the branch to master in 4a72a3d4.
Updated by Evgeny Novikov over 6 years ago
- File job-decision-conf.json job-decision-conf.json added
- Status changed from Closed to Open
Now I get another exception when starting a job decision through a command-line interface:
[28.Jun.2018 15:45:26] 'NoneType' object is not subscriptable Traceback (most recent call last): File "/var/www/klever-bridge/bridge/CustomViews.py", line 61, in dispatch return getattr(super(), 'dispatch')(request, *args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/django/views/generic/base.py", line 89, in dispatch return handler(request, *args, **kwargs) File "/var/www/klever-bridge/bridge/CustomViews.py", line 94, in post return JsonResponse(self.get_context_data()) File "/var/www/klever-bridge/jobs/views.py", line 502, in get_context_data self.request.user, self.kwargs['job_id'], jobs.utils.GetConfiguration(**getconf_args).configuration File "/var/www/klever-bridge/service/utils.py", line 815, in __init__ self.job_scheduler = self.__get_scheduler() File "/var/www/klever-bridge/service/utils.py", line 895, in __get_scheduler return Scheduler.objects.get(type=self.data[0][1]) TypeError: 'NoneType' object is not subscriptabl
The command to run is:
./src/utils/bin/start-solution.py --rundata job-decision-conf.json "Testing environment model specifications" --host localhost:8998 --username manager --password manager
Also, I attached job-decision-conf.json.
Updated by Evgeny Novikov over 6 years ago
I am not sure that the attached decision configuration file is valid, but Bridge definitely does a wrong thing.
Updated by Vladimir Gratinskiy over 6 years ago
Evgeny Novikov wrote:
I am not sure that the attached decision configuration file is valid, but Bridge definitely does a wrong thing.
I wanted to do some small fixes. But more and more bugs are found with console start so I'll refactor configuration format everywhere where it is used.
Updated by Evgeny Novikov over 6 years ago
- Priority changed from Immediate to Urgent
- Target version changed from 1.0 to 2.0
As far as you are planning large changes, we can't include them into Klever 1.0. So, let's just live with a small issue.
Updated by Evgeny Novikov over 6 years ago
- Target version changed from 2.0 to 1.1
This issue is not strictly bound with purposes of 2.0 that targets verification of C software.
Updated by Vladimir Gratinskiy over 6 years ago
- Status changed from Open to Resolved
Done in branch "fix_9028". Now it's much easier to track what is wrong in configuration. Error logs are clearer.
Updated by Evgeny Novikov over 6 years ago
I tested the bug fix manually. It works. But due to migrations it would be better to postpone this branch merging until the end of the merge window.
Updated by Evgeny Novikov over 6 years ago
- Status changed from Resolved to Closed
Tests passed, so, I merged the branch to master in 1d74aff6f.
Please, do not forget to migrate your local databases!