Project

General

Profile

Actions

Feature #8147

closed

Add support for preset unsafe and safe marks

Added by Evgeny Novikov about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Urgent
Category:
Bridge
Target version:
-
Start date:
04/24/2017
Due date:
05/03/2017
% Done:

100%

Estimated time:
Published in build:

Description

Marks are extremely valuable for testing and validation. So we need Bridge to support preset unsafe/safe marks.


Related issues 1 (0 open1 closed)

Blocks Klever - Feature #8084: Add marks for testing and validation setsClosedIlja Zakharov04/18/2017

Actions
Actions #1

Updated by Evgeny Novikov about 7 years ago

  • Priority changed from Urgent to Immediate

Increase the issue priority since it blocks the high priority issue.

Actions #2

Updated by Evgeny Novikov almost 7 years ago

  • Priority changed from Immediate to Urgent

This was the only immediate feature request. Let's use immediate just for crucial bugs.

Actions #3

Updated by Vladimir Gratinskiy almost 7 years ago

  • Due date set to 05/03/2017
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Implemented in feature_8147.

Actions #4

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Resolved to Open

I met the following exception when I tried to edit an existing unsafe mark:

Error while saving/creating mark: get() returned more than one MarkUnsafeHistory -- it returned 21!
Traceback (most recent call last):
  File "/home/novikov/work/klever/bridge/marks/views.py", line 225, in save_mark
    res = mutils.NewMark(request.user, savedata)
  File "/home/novikov/work/klever/bridge/marks/utils.py", line 149, in __init__
    self.mark = self.__new_mark()
  File "/home/novikov/work/klever/bridge/marks/utils.py", line 195, in __new_mark
    mark = res.change_mark(self._inst)
  File "/home/novikov/work/klever/bridge/marks/UnsafeUtils.py", line 131, in change_mark
    last_v = MarkUnsafeHistory.objects.get(version=F('mark__version'))
  File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/novikov/.pyenv/versions/virtual-env-3.6.1/lib/python3.6/site-packages/django/db/models/query.py", line 383, in get
    (self.model._meta.object_name, num)
marks.models.MultipleObjectsReturned: get() returned more than one MarkUnsafeHistory -- it returned 21!

Actions #5

Updated by Evgeny Novikov almost 7 years ago

Also I suggest to specify error trace patterns within unsafe marks themselves rather than within dedicated files since they won't be likely reused and they are quite compact.

Actions #6

Updated by Vladimir Gratinskiy almost 7 years ago

  • Status changed from Open to Resolved

Evgeny Novikov wrote:

Also I suggest to specify error trace patterns within unsafe marks themselves rather than within dedicated files since they won't be likely reused and they are quite compact.

Done. Also the exception was fixed.

Actions #7

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Resolved to Open

When I created a new mark its source is "Created". When I populated a new mark its source is "Preset". When I edited a populated mark its source is still "Preset". I suppose to change the latter to, say, "Edited preset".

Actions #8

Updated by Vladimir Gratinskiy almost 7 years ago

Evgeny Novikov wrote:

When I created a new mark its source is "Created". When I populated a new mark its source is "Preset". When I edited a populated mark its source is still "Preset". I suppose to change the latter to, say, "Edited preset".

Let's add statuses "Edited just tags preset", "Edited just description preset", "Edited tags and status preset", "Edited tags created", "Edited tags, but revert changes uploaded" then? Why not?

Actions #9

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Open to Resolved

Vladimir Gratinskiy wrote:

Evgeny Novikov wrote:

When I created a new mark its source is "Created". When I populated a new mark its source is "Preset". When I edited a populated mark its source is still "Preset". I suppose to change the latter to, say, "Edited preset".

Let's add statuses "Edited just tags preset", "Edited just description preset", "Edited tags and status preset", "Edited tags created", "Edited tags, but revert changes uploaded" then? Why not?

Okay, let's think about such aspects of preset entities comprehensively next time. Indeed they are almost unused now (just created once during an initial population) like marks before, so there are much more questions that weren't asked yet. When we will use them more, we will encounter a lot of various problems.

Actions #10

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Resolved to Closed

I merged the branch to master in 679f7706. Don't forget to migrate databases!

Now a way to keep not only validation and test tasks but also corresponding marks is open.

Actions

Also available in: Atom PDF