Project

General

Profile

Actions

action #15192

closed

[tools]DB exception popup while trying to add Test Suite with same name

Added by asmorodskyi about 8 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Feature requests
Target version:
Start date:
2016-12-01
Due date:
% Done:

0%

Estimated time:

Description

observation

you will get DB exception ( see attached screenshot )

steps to reproduce

  • Try to add same Test Suite to Job Group second type
  • you will get DB exception ( see attached screenshot )

suggestion

UI should block this attempt by :

  1. disable Test Suites that already added
  2. filter out Test Suites which already added from the list

workaround

Don't add same test cases


Files

Screenshot_20161201_132224.png (135 KB) Screenshot_20161201_132224.png asmorodskyi, 2016-12-01 12:51

Related issues 3 (0 open3 closed)

Related to openQA Project (public) - action #14964: openQA WebUI - Join Medium to Group got error messageRejected2016-11-23

Actions
Related to openQA Project (public) - action #57143: [YAML] Editor does not check if same combination of test suite/arch/flavor/version already used in different job groupResolvedlivdywan2019-09-20

Actions
Has duplicate openQA Project (public) - action #17600: Adding same scenario in multiple job groups failsClosed2017-03-08

Actions
Actions #1

Updated by mkittler about 8 years ago

  • Assignee set to mkittler
  • Priority changed from Normal to Low

I'm aware of this. I didn't put any effort in it as I didn't find this very important (there is an error message, just not a very good one). There are some other places in openQA where constraints are not checked before, too.

Actions #3

Updated by okurz about 8 years ago

  • Related to action #14964: openQA WebUI - Join Medium to Group got error message added
Actions #4

Updated by okurz almost 8 years ago

  • Category set to Feature requests
Actions #5

Updated by RBrownSUSE almost 8 years ago

  • Subject changed from DB exception popup while trying to add Test Suite with same name to [tools]DB exception popup while trying to add Test Suite with same name
Actions #6

Updated by mkittler over 7 years ago

  • Status changed from New to In Progress
Actions #7

Updated by coolo over 7 years ago

I would recommend to add some basic tests to this route - as it's so seldomly used we discover regressions only late otherwise

Actions #9

Updated by okurz over 7 years ago

Apparently https://github.com/os-autoinst/openQA/pull/1318 broke something.

observation

Trying to add zdup_13.2_cryptlvm@uefi in Jobs for openSUSE Leap 42.3 in opensuse-42.3-DVD on https://openqa.opensuse.org/admin/job_templates/28 fails with "wrong parameter: machine_id". Checking the POST request I can see that the parameter is not set at all. It looks like this is caused by "filterTestSelection" within job_templates.js being called on the current index but the problem could so far be reproduced only for this specific value. I could reproduce the problem also based on the database dump from 2017-05-28 on my machine

steps to reproduce

To reproduce locally use database dump from o3.

It seems the PR adding tests https://github.com/os-autoinst/openQA/pull/1327 is not testing the part about trying to define an actual scenario on the second test selection. It only looks for test suites selections and also this part might miss the fact that actually the same test suite can be added twice - which it probably shouldn't.

https://github.com/os-autoinst/openQA/pull/1349 created to temporarily revert.

Actions #10

Updated by mkittler over 7 years ago

I created another PR which fixes the issue mentioned in the previous comment by @okurz. It simply occurred because uefi is in both columns (Tests and x86_64).

But as discussed with @okurz the issue isn't solved yet because the current approach doesn't handle the case where product_id machine_id and test_suite_id are identical but the job group differs. I suppose in this case it is not a good idea to just remove the conflicting entries from the selection. Otherwise the user would wonder why entries are missing. It is not obvious why the entries are missing because the conflicting templates are on a different job template page in this case. Instead the error message should tell the user on which job template page the conflicting template is. By the way, does it even make sense that group_id is not part of the unique constraint?

Actions #11

Updated by mkittler over 7 years ago

In order to distinguish the unique constraint error from other database errors the error handling in line https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/API/V1/JobTemplate.pm#L111 must be improved. However, I'm currently unable to do it. I discovered the following options, but I'm not sure how to continue:

  • In other places we're using try-catch via Try::Tiny but it only provides an error string, too. The fact that the error string is even localized does not make parsing easier.
  • There is DBIx::Error but it is not packaged yet. It also seems a bit unreasonable to add an extra dependency for this.
  • It seems to be possible to register a custom error handler, but that's connection-wide and hence not convenient to use and might break other places.
  • As a workaround just check the constraint violation manually.
Actions #12

Updated by mkittler over 7 years ago

  • Status changed from In Progress to Feedback
Actions #13

Updated by coolo about 7 years ago

  • Has duplicate action #17600: Adding same scenario in multiple job groups fails added
Actions #14

Updated by mkittler almost 7 years ago

  • Assignee deleted (mkittler)
Actions #15

Updated by szarate over 5 years ago

  • Status changed from Feedback to Resolved
  • Assignee set to mkittler
  • Target version set to Done

This is donce since a while ago :)

Actions #16

Updated by mkittler over 5 years ago

Note that in my previous comment I confused this with the exception you still get when adding a new test suite with a name which already exists. But according to the screenshot this is actually about job templates and yes - I fixed it a while ago.

Actions #17

Updated by mkittler over 5 years ago

  • Related to action #57143: [YAML] Editor does not check if same combination of test suite/arch/flavor/version already used in different job group added
Actions

Also available in: Atom PDF