action #60118
closedload_templates does not load JobGroups (unless they exist)
0%
Description
I have tried to setup a local openQA instance in a container as described in the official documentation and after getting all the tests (http://open.qa/docs/#_getting_tests), I tried to fetch the job groups, templates, etc from o3. Unfortunately using dump_templates & load_templates fails:
openqa1:/ # /usr/share/openqa/script/dump_templates --host openqa.opensuse.org > templates.json
openqa1:/ # /usr/share/openqa/script/load_templates --host localhost templates.json
ERROR: 400 - Bad Request
{ error => ["Job group OBS Unstable not found"], error_status => 400 }
ERROR: 400 - Bad Request
{
error => [{ message => "Missing property.", path => "/scenarios" }],
error_status => 400,
}
ERROR: 400 - Bad Request
{
error => ["Job group openSUSE Leap 15.0 Incidents not found"],
error_status => 400,
}
ERROR: 400 - Bad Request
{
error => ["Job group Staging Projects not found"],
error_status => 400,
}
ERROR: 400 - Bad Request
{
error => ["Job group openSUSE Leap 42.3 Updates not found"],
error_status => 400,
}
ERROR: 400 - Bad Request
{
error => ["Job group openSUSE Leap Staging Projects not found"],
error_status => 400,
}
ERROR: 400 - Bad Request
{
error => ["Job group openSUSE Leap 15.1 AArch64 Images not found"],
error_status => 400,
}
ERROR: 400 - Bad Request
{
error => ["Job group openSUSE Leap 15.1 Updates not found"],
error_status => 400,
}
SNIP
ERROR: 414 - Request-URI Too Long
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.
org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n<head>\n<title>Submitted URI too large!</title>\n<link rev=\"made\" href=\"mailto:%5bno%20address%20given%5d\" />\n<style type=\"text/css\"><!--
/*--><![CDATA[/*><!--*/ \n body { color: #000000; background-color: #FFFFFF; }\n a:link { color: #0000CC; }\n p, address {margin-left: 3em;}\n span {font-size: smaller;}\n/*]]>*/-
-></style>\n</head>\n\n<body>\n<h1>Submitted URI too large!</h1>\n<p>\n\n\n The length of the requested URL exceeds the capacity limit for\n\tthis server. The request cannot be processed.\
n \n</p>\n<p>\nIf you think this is a server error, please contact\nthe <a href=\"mailto:%5bno%20address%20given%5d\">webmaster</a>.\n\n</p>\n\n<h2>Error 414</h2>\n<address>\n <a href=\"/\
">openqa1</a><br />\n <span>Apache</span>\n</address>\n</body>\n</html>\n\n"
SNIP
{
JobGroups => { added => 0, of => 40 },
JobTemplates => { added => 0, of => 0 },
Machines => { added => 49, of => 49 },
Products => { added => 140, of => 140 },
TestSuites => { added => 331, of => 331 },
}
I have attached the templates.json file that was produced by dump_templates.
Files
Updated by livdywan about 5 years ago
- Subject changed from /usr/share/openqa/script/load_templates does not load JobGroups to load_templates does not load JobGroups (unless they exist)
- Status changed from New to Workable
- Assignee set to livdywan
- Target version set to Current Sprint
Thanks for filing the bug!
I think what's happening here is that the script tries to update job groups without ensuring they actually exist.
Updated by dancermak almost 5 years ago
cdywan wrote:
Thanks for filing the bug!
I think what's happening here is that the script tries to update job groups without ensuring they actually exist.
Would that mean, that if I create the groups manually, that the script will automatically populate them? Since I tried that with the openSUSE Tumbleweed
group and it did not get filled with the data from o3.
Updated by livdywan almost 5 years ago
- Status changed from Workable to In Progress
I'm writing unit tests atm as a prerequisite to fixing this.
Updated by livdywan almost 5 years ago
Updated by livdywan almost 5 years ago
Updated by livdywan over 4 years ago
With the earlier fixes and new tests in, what's left is making sure job groups always get created - which also makes importing the same group(s) twice an error, which should fail unless the clean option is used as well.
Btw just a side note but by default dump_templates
writes Perl data. You need to add --json
to actually get JSON output, as suggested by the filename i.e. dump_templates --host openqa.opensuse.org > templates.json
but the problem description is valid regardless.
Updated by okurz over 4 years ago
https://github.com/os-autoinst/openQA/pull/2770 merged. Let me ask you what is maybe obvious, just to be sure: Did you also test the use case that dancermak provided, i.e. import templates into a real empty openQA instance?
Updated by livdywan over 4 years ago
- Status changed from In Progress to Feedback
okurz wrote:
https://github.com/os-autoinst/openQA/pull/2770 merged. Let me ask you what is maybe obvious, just to be sure: Did you also test the use case that dancermak provided, i.e. import templates into a real empty openQA instance?
Yes. And it should work. Now that it's merged I was planning to double-check that with @dancermak
Updated by dancermak over 4 years ago
- Status changed from Feedback to Closed
I have just created a test openQA instance and can confirm that load_templates now does the job as expected.
Thank you for fixing it!
Updated by okurz over 4 years ago
- Status changed from Closed to Resolved
thanks for crosschecking. For ticket status: We use "Resolved" only, better avoid "Closed" as described on https://progress.opensuse.org/projects/openqav3/wiki/#ticket-workflow