action #13194
closedOpening needle editor on a screenshot where an already deleted needle is part of candidate needles gives error 500
80%
Description
observation¶
Opening needle editor from
https://openqa.opensuse.org/tests/242805#step/grub_test/1
yields puking trex and error messages in log:
[Mon Aug 15 14:15:49 2016] [885:debug] GET "/tests/242805/modules/grub_test/steps/1/edit"
[Mon Aug 15 14:15:49 2016] [885:debug] Routing to controller "OpenQA::WebAPI::Controller::Step" and action "edit"
[Mon Aug 15 14:15:49 2016] [885:debug] reading /var/lib/openqa/testresults/00242805-opensuse-42.2-DVD-ppc64le-Build0107-boot_to_snapshot@ppc64le/details-grub_test.json
[Mon Aug 15 14:15:49 2016] [885:warn] /var/lib/openqa/share/tests/opensuse/products/opensuse/needles/grub_test-grub2-OWF-20160815.json: No such file or directory
[Mon Aug 15 14:15:49 2016] [885:error] Could not find needle: grub_test-grub2-OWF-20160815 for opensuse 42.2
[Mon Aug 15 14:15:49 2016] [885:error] fileparse(): need a valid pathname at /usr/share/openqa/script/../lib/OpenQA/WebAPI/Controller/Step.pm line 179.
[Mon Aug 15 14:15:49 2016] [885:debug] Template "exception.production.html.ep" not found
[Mon Aug 15 14:15:49 2016] [885:debug] Template "exception.html.ep" not found
[Mon Aug 15 14:15:49 2016] [885:debug] Rendering template "mojo/exception.html.ep"
[Mon Aug 15 14:15:49 2016] [885:debug] 500 Internal Server Error (0.029532s, 33.862/s)
[Mon Aug 15 14:15:50 2016] [886:debug] POST "/api/v1/jobs/242883/status"
steps to reproduce¶
- login on https://openqa.opensuse.org
- go to https://openqa.opensuse.org/tests/242805#step/grub_test/1
- click "Create new needle"
- Observe error display
- Optional: Observe logs on o3:/var/log/openqa
problem¶
The needle got deleted after the test ran. The needle editor should not crash but probably just ignore this needle from being parsed.
suggestions¶
- Handle non-existing needles gracefully
further details¶
related to https://progress.opensuse.org/issues/13192
original content from lnussel:
Looks like needles that got cleaned up are not shown at all in such screens:
https://openqa.opensuse.org/tests/97538/modules/bootloader/steps/1
The needle editor even throws. The no longer available needles should be listed but marked as no longer existing instead
workaround¶
Retrigger job which should cause the current set of needles loaded and then again open the needle editor on only present candidates.
Updated by mkittler over 8 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 80
PR: https://github.com/os-autoinst/openQA/pull/830
Fixed it by just ignoring the needle if not found. Don't know whether printing an error message is required.
Updated by mkittler over 8 years ago
- Is duplicate of action #10806: Opening needle editor on a screenshot where an already deleted needle is part of candidate needles gives error 500 added