New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show bug or label icon on overview if labeled #550

Merged
merged 2 commits into from Feb 15, 2016

Conversation

Projects
None yet
3 participants
@okurz
Member

okurz commented Feb 13, 2016

  • Show bug icon with URL if mentioned in test comments
  • Show bug or label icon on overview if labeled

Example for a generic label:
openqa_generic_label

Example for bug label:
openqa_bug_label

I would like to update documentation and help texts accordingly if someone could provide me a hint where this would be appropriate or how we can add the corresponding user documentation.

Related issue: https://progress.opensuse.org/issues/10212

Tested against production database dump from openqa.opensuse.org, querying with

time sudo -u geekotest OPENQA_CONFIG=local/stage OPENQA_DATABASE=stage script/openqa get '/tests/overview?version=Tumbleweed&groupid=1&build=20160130&distri=opensuse' >/dev/null 2>&1 | grep real ; time sudo -u geekotest OPENQA_CONFIG=local/stage OPENQA_DATABASE=stage script/openqa get '/tests/117629' >/dev/null 2>&1 | grep real

yields comparable results for before and after change (, e.g. origin/master: 1.7s+0.8s, feature/bug_and_label: 1.8s+0.8s)

Show bug or label icon on overview if labeled
As we parse the comments for generating the overview page we can now
do some simple parsing and show a "bug" icon if a corresponding reference in
a comment has been found or a "label" icon if the keyword "label:" has been
used. This way we can show bug references using the convention
"<bugtracker_abbreviation>#<bug_id>", e.g. "bsc#1234" or labels in the
(not yet) convention "label:<single_word_label>", e.g. "label:false_positive"
or "label:broken_test".

Priority is as follows: bug > label > any comment. Based on this only one icon
is shown not to clutter up the overview page.

Currently the behaviour based on multiple bugs or labels found is undefined.
@@ -96,10 +97,8 @@ sub _DoAutoLinks {
# URL markers '<>'
$text =~ s@(?<!['"(<>])($RE{URI})@<$1>@gi;
$text = bugref_to_href($text);
$text =~ s{(bnc#(\d+))}{<a href="https://bugzilla.novell.com/show_bug.cgi?id=$2">$1</a>}gi;

This comment has been minimized.

@aaannz

aaannz Feb 15, 2016

Member

Missed leftover?

This comment has been minimized.

@okurz

okurz Feb 15, 2016

Member

obviously, thx

Show bug icon with URL if mentioned in test comments
Extract util methods for resolving common bug references to a complete bugurl
or an HTML 'a href' tag. Add a helper 'bugurl_for' for use in templates and
use this helper within 'test/overview.html.ep' to make the bug icon a link.

The use of "OpenQA::Utils" within "OpenQA::WebAPI::Plugin::Helpers" - which
does not look like a good "plugin" candidate itself - might be disputable or
a candidate for refactoring.

@okurz okurz force-pushed the okurz:feature/bug_and_label branch from dc03162 to 997362d Feb 15, 2016

@okurz

This comment has been minimized.

Member

okurz commented Feb 15, 2016

updated:

  • performance evaluation (see description)
  • deleted missed left-over

coolo added a commit that referenced this pull request Feb 15, 2016

Merge pull request #550 from okurz/feature/bug_and_label
Show bug or label icon on overview if labeled

@coolo coolo merged commit 4b787de into os-autoinst:master Feb 15, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@okurz okurz deleted the okurz:feature/bug_and_label branch Feb 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment