Feature #8733
closedAllow creating marks for unknowns with particular attributes
100%
Description
To establish regression testing we need to describe all possible validation and test jobs results. It is possible currently to create and attach marks for safes and unsafes by attributes but all created unknown marks always applied to all suitable unknown which is inconvenient in the case.
It is proposed to allow the creation of an unknown mark with the same attribute filter which is available for safe marks. Also such marks should be possible to store at presets.
Files
Updated by Ilja Zakharov almost 7 years ago
- Blocks Feature #8084: Add marks for testing and validation sets added
Updated by Ilja Zakharov almost 7 years ago
- Blocks Feature #8080: Clarify validation set added
Updated by Evgeny Novikov almost 7 years ago
As far as I understand, there is quite a great work from the point of implementation (many changes will be necessary in models and views). Vladimir, how much time will it take (keep in mind 2-3 iterations with various fixes)?
Updated by Vladimir Gratinskiy almost 7 years ago
Evgeny Novikov wrote:
As far as I understand, there is quite a great work from the point of implementation (many changes will be necessary in models and views). Vladimir, how much time will it take (keep in mind 2-3 iterations with various fixes)?
One week.
Updated by Ilja Zakharov over 6 years ago
What status does the feature have currently? Is it ready or postponed for some reason?
Updated by Vladimir Gratinskiy over 6 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Implemented in "new-report-data".
Updated by Ilja Zakharov over 6 years ago
- File Job-bf93c5d0f6.zip Job-bf93c5d0f6.zip added
- Status changed from Feedback to Open
Currently I can create unknown marks and it works nicely. However, I cannot assign the same problem for newly created marks even when they have matching by particular attributes turned on. Is it possible to somehow fix it? I avoid the issue using regex groups in pattern and problem fields but marks in presets look ugly.
To finish 8084 I am trying to create a preset with safe, unsafe, unknown marks and required tags. Seems that current version of Bridge still contains some bugs because:
1) I cannot populate base and got the following exception:
duplicate key value violates unique constraint "attr_name_name_key"
DETAIL: Key (name)=(Klever Core version) already exists.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
psycopg2.IntegrityError: duplicate key value violates unique constraint "attr_name_name_key"
DETAIL: Key (name)=(Klever Core version) already exists.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/work/zakharov/src/klever/bridge/bridge/views.py", line 63, in population
(service_username, request.POST.get('service_password'))
File "/work/zakharov/src/klever/bridge/bridge/populate.py", line 74, in init
self.__population()
File "/work/zakharov/src/klever/bridge/bridge/populate.py", line 86, in population
self.__populate_unsafe_marks()
File "/work/zakharov/src/klever/bridge/bridge/populate.py", line 257, in _populate_unsafe_marks
res = UnsafeUtils.PopulateMarks(self.manager)
File "/work/zakharov/src/klever/bridge/marks/UnsafeUtils.py", line 688, in __init
self._get_attrnames()
File "/work/zakharov/src/klever/bridge/marks/UnsafeUtils.py", line 724, in get_attrnames
a['attr'] = AttrName.objects.create(name=a['attr']).id
File "/usr/local/lib/python3.6/dist-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/django/db/models/query.py", line 417, in create
obj.save(force_insert=True, using=self.db)
File "/usr/local/lib/python3.6/dist-packages/django/db/models/base.py", line 729, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python3.6/dist-packages/django/db/models/base.py", line 759, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python3.6/dist-packages/django/db/models/base.py", line 842, in save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/local/lib/python3.6/dist-packages/django/db/models/base.py", line 880, in _do_insert
using=using, raw=raw)
File "/usr/local/lib/python3.6/dist-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/django/db/models/query.py", line 1125, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python3.6/dist-packages/django/db/models/sql/compiler.py", line 1283, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.6/dist-packages/django/db/backends/utils.py", line 100, in execute
return super().execute(sql, params)
File "/work/zakharov/src/klever/bridge/bridge/_init.py", line 39, in execute_wrapper
return original(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/local/lib/python3.6/dist-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/local/lib/python3.6/dist-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.6/dist-packages/django/db/utils.py", line 89, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.6/dist-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: duplicate key value violates unique constraint "attr_name_name_key"
DETAIL: Key (name)=(Klever Core version) already exists.
2) If I am able to populate the base from the second try some marks just are not applied to relevant reports. For instance in branch 8084-marks-presets I manually created marks for a validation run, downloaded them and used as a preset. If I clean DB, populate it, upload the validation run some marks become applied and some not. You can try it with an attached archive and marks from presets in 8084-marks-presets branch.
Updated by Evgeny Novikov over 6 years ago
Ilja Zakharov wrote:
Currently I can create unknown marks and it works nicely. However, I cannot assign the same problem for newly created marks even when they have matching by particular attributes turned on. Is it possible to somehow fix it? I avoid the issue using regex groups in pattern and problem fields but marks in presets look ugly.
Let's enable the same problem for preset unknowns, but not in other cases.
Updated by Vladimir Gratinskiy over 6 years ago
- File proof1.png proof1.png added
- File proof2.png proof2.png added
I've fixed population bugs and enabled same preset unknown marks. For the second problem I got following results (in attached screenshots).
Updated by Ilja Zakharov over 6 years ago
Marks are applied correctly for both safe, unsafe and unknowns. Thank you.
However, now I noticed that trying to save an unknown mark with additional attributes set I still get a json file without tag "attrs" inside.
Updated by Vladimir Gratinskiy over 6 years ago
Ilja Zakharov wrote:
Marks are applied correctly for both safe, unsafe and unknowns. Thank you.
However, now I noticed that trying to save an unknown mark with additional attributes set I still get a json file without tag "attrs" inside.
Fixed.
Updated by Ilja Zakharov over 6 years ago
Another portion of exceptions:
Postgres:
2018-06-04 11:24:58.035 MSK [1646] LOG: database system is ready to accept connections
2018-06-04 11:24:58.622 MSK [1995] [unknown]@[unknown] LOG: incomplete startup packet
2018-06-04 17:37:51.787 MSK [14339] postgres@kleverdb ERROR: duplicate key value violates unique constraint "attr_name_name_key"
2018-06-04 17:37:51.787 MSK [14339] postgres@kleverdb DETAIL: Key (name)=(Klever Core version) already exists.
2018-06-04 17:37:51.787 MSK [14339] postgres@kleverdb STATEMENT: INSERT INTO "attr_name" ("name") VALUES ('Klever Core version') RETURNING "attr_name"."id"
2018-06-04 17:41:10.104 MSK [15778] postgres@kleverdb ERROR: duplicate key value violates unique constraint "attr_name_name_key"
2018-06-04 17:41:10.104 MSK [15778] postgres@kleverdb DETAIL: Key (name)=(Klever Core version) already exists.
2018-06-04 17:41:10.104 MSK [15778] postgres@kleverdb STATEMENT: INSERT INTO "attr_name" ("name") VALUES ('Klever Core version') RETURNING "attr_name"."id"
2018-06-04 18:07:16.603 MSK [29611] postgres@kleverdb ERROR: duplicate key value violates unique constraint "attr_name_name_key"
2018-06-04 18:07:16.603 MSK [29611] postgres@kleverdb DETAIL: Key (name)=(Klever Core version) already exists.
2018-06-04 18:07:16.603 MSK [29611] postgres@kleverdb STATEMENT: INSERT INTO "attr_name" ("name") VALUES ('Klever Core version') RETURNING "attr_name"."id"
2018-06-04 18:11:08.626 MSK [31352] postgres@postgres ERROR: database "kleverdb" already exists
2018-06-04 18:11:08.626 MSK [31352] postgres@postgres STATEMENT: CREATE DATABASE kleverdb OWNER postgres ENCODING 'utf8' TEMPLATE template0;
2018-06-04 18:11:19.185 MSK [31376] postgres@postgres ERROR: database "kleverdb" already exists
2018-06-04 18:11:19.185 MSK [31376] postgres@postgres STATEMENT: CREATE DATABASE kleverdb OWNER postgres ENCODING 'utf8' TEMPLATE template0;
2018-06-04 18:12:18.012 MSK [31826] postgres@kleverdb ERROR: duplicate key value violates unique constraint "attr_name_name_key"
2018-06-04 18:12:18.012 MSK [31826] postgres@kleverdb DETAIL: Key (name)=(Klever Core version) already exists.
2018-06-04 18:12:18.012 MSK [31826] postgres@kleverdb STATEMENT: INSERT INTO "attr_name" ("name") VALUES ('Klever Core version') RETURNING "attr_name"."id"
2018-06-04 18:21:34.099 MSK [4056] postgres@kleverdb ERROR: duplicate key value violates unique constraint "attr_name_name_key"
2018-06-04 18:21:34.099 MSK [4056] postgres@kleverdb DETAIL: Key (name)=(Klever Core version) already exists.
2018-06-04 18:21:34.099 MSK [4056] postgres@kleverdb STATEMENT: INSERT INTO "attr_name" ("name") VALUES ('Klever Core version') RETURNING "attr_name"."id"
2018-06-04 18:25:35.050 MSK [6082] postgres@kleverdb ERROR: duplicate key value violates unique constraint "attr_name_name_key"
2018-06-04 18:25:35.050 MSK [6082] postgres@kleverdb DETAIL: Key (name)=(Klever Core version) already exists.
2018-06-04 18:25:35.050 MSK [6082] postgres@kleverdb STATEMENT: INSERT INTO "attr_name" ("name") VALUES ('Klever Core version') RETURNING "attr_name"."id"
And in Bridge:
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 43800)
Traceback (most recent call last):
File "/usr/lib/python3.6/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.6/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.6/wsgiref/handlers.py", line 279, in write
self._write(data)
File "/usr/lib/python3.6/wsgiref/handlers.py", line 453, in _write
result = self.stdout.write(data)
File "/usr/lib/python3.6/socketserver.py", line 775, in write
self._sock.sendall(b)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/wsgiref/handlers.py", line 141, in run
self.handle_error()
File "/usr/local/lib/python3.6/dist-packages/django/core/servers/basehttp.py", line 86, in handle_error
super().handle_error()
File "/usr/lib/python3.6/wsgiref/handlers.py", line 368, in handle_error
self.finish_response()
File "/usr/lib/python3.6/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.6/wsgiref/handlers.py", line 274, in write
self.send_headers()
File "/usr/lib/python3.6/wsgiref/handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "/usr/lib/python3.6/wsgiref/handlers.py", line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/socketserver.py", line 639, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.6/socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.6/socketserver.py", line 696, in init
self.handle()
File "/usr/local/lib/python3.6/dist-packages/django/core/servers/basehttp.py", line 154, in handle
handler.run(self.server.get_app())
File "/usr/lib/python3.6/wsgiref/handlers.py", line 144, in run
self.close()
File "/usr/lib/python3.6/wsgiref/simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
----------------------------------------
Updated by Evgeny Novikov over 6 years ago
- Status changed from Resolved to Closed
I merged the branch to master in 4339da97 as a part of branch core-new-formats.