Skip to content
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

Build tagging; keeping important builds #591

Merged
merged 5 commits into from
Mar 18, 2016

Conversation

okurz
Copy link
Member

@okurz okurz commented Mar 2, 2016

Included changes

  • Do not clean up logs of important builds in GRU task
  • Mark build as non-important with '-important' tag
  • Tag builds with special comments on group overview
  • Extract 'bugref' and 'label' helpers into methods on comment

Detailed description

As builds can now be tagged we come up with the convention that the
'important' type - the only one for now - is used to tag every job that
corresponds to a build as 'important' and keep the logs for these jobs so that
we can always refer to the attached data, e.g. for milestone builds, final
releases, jobs for which long-lasting bug reports exist, etc.

As these jobs are not cleaned up automatically a manual or external cleanup
scheme has to be applied for important builds and jobs.

Also add tests for 'reduce_result' GRU task.

Adds a possibility to actually revert the action provided by the previous
commit. The more recent tag always wins.

Based on comments on the group overview individual builds can be tagged. As
'build' by themselves do not own any data the job group is used to store this
information. A tag has a 'build' to link it to a build. It also has a 'type'
and an optional 'description'. The type can later on be used to distinguish
tag types.

A 'tag' icon is shown next to tagged builds together with the description on
the group_overview page. The index page is not changed to prevent a potential
performance regression.

Within the sub group_overview the comments are parsed for comments and then
passed to the template explicitly to prevent duplicate database queries.

Example screenshot

openqa_tag_important

Performance evaluation

Tested against a production database dump from o.s.d from 2016-02-25 (before we cleaned it to optimize even more). Performance evaluation of getting a tests/overview page, index page and a group overview page including the commit adding build tags. Results in seconds for each complete transaction from 5 iterations:

  • before: 1.5+-0.1, 2.4+-0.1, 2.2+-0.0
  • after: 1.5+-0.1, 2.0+-0.1, 2.2+-0.1

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

@Soulofdestiny
Copy link
Contributor

You can actually 'create' new builds to show up in the group overview by typing a build number which doesn't exist
screenshot from 2016-03-03 11-41-57

@okurz
Copy link
Member Author

okurz commented Mar 3, 2016

wow, that's cool :-)

@Soulofdestiny
Copy link
Contributor

it also works when you type something different than '
screenshot from 2016-03-03 12-29-03
important'

@okurz
Copy link
Member Author

okurz commented Mar 4, 2016

both "issues" you described I declare as "features", the latter was intended, the former … not so much actually :-) I can think of use cases where it makes sense to tag "expected" builds before they even arrive

Based on comments on the group overview individual builds can be tagged. As
'build' by themselves do not own any data the job group is used to store this
information. A tag has a 'build' to link it to a build. It also has a 'type'
and an optional 'description'. The type can later on be used to distinguish
tag types.

A 'tag' icon is shown next to tagged builds together with the description on
the group_overview page. The index page is not changed to prevent a potential
performance regression.

Within the sub group_overview the comments are parsed for comments and then
passed to the template explicitly to prevent duplicate database queries.

Related progress issue: https://progress.opensuse.org/issues/9544
@okurz okurz force-pushed the feature/build_tagging_poo#9544 branch from 3453f71 to 9497fe9 Compare March 18, 2016 07:02
@okurz
Copy link
Member Author

okurz commented Mar 18, 2016

updated:

  • @mgriessmeier the "hidden feature" you discovered has been prevented for now by not showing a tag on non-new builds, can be added as feature later, properly, I have something prepared, not as part of this PR
  • rebased

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 62.905% when pulling 9497fe9 on okurz:feature/build_tagging_poo#9544 into 97ed3bd on os-autoinst:master.

@okurz okurz force-pushed the feature/build_tagging_poo#9544 branch from 9497fe9 to c51ca23 Compare March 18, 2016 07:13
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 62.905% when pulling c51ca23 on okurz:feature/build_tagging_poo#9544 into 97ed3bd on os-autoinst:master.

=cut
sub bugref {
my ($self) = @_;
$self->text =~ /\b([^t]+#\d+)\b/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is t not allowed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because a reference to a test within openqa is not a "bugref".

Adds a possibility to actually revert the action provided by the previous
commit. The more recent tag always wins.

Related progress issue: https://progress.opensuse.org/issues/9544
As builds can now be tagged we come up with the convention that the
'important' type - the only one for now - is used to tag every job that
corresponds to a build as 'important' and keep the logs for these jobs so that
we can always refer to the attached data, e.g. for milestone builds, final
releases, jobs for which long-lasting bug reports exist, etc.

As these jobs are not cleaned up automatically a manual or external cleanup
scheme has to be applied for important builds and jobs.

Also add tests for 'reduce_result' GRU task.

Performance evaluation of getting a tests/overview page, index page and a group
overview page including the commit adding build tags.

* before: 1.5+-0.1, 2.4+-0.1, 2.2+-0.0
* after: 1.5+-0.1, 2.0+-0.1, 2.2+-0.1

Related progress issue: https://progress.opensuse.org/issues/9544
@okurz okurz force-pushed the feature/build_tagging_poo#9544 branch from c51ca23 to 993265a Compare March 18, 2016 10:21
@okurz
Copy link
Member Author

okurz commented Mar 18, 2016

updated:

  • s/undef/delete/

aaannz pushed a commit that referenced this pull request Mar 18, 2016
Build tagging; keeping important builds
@aaannz aaannz merged commit 3069453 into os-autoinst:master Mar 18, 2016
@okurz okurz deleted the feature/build_tagging_poo#9544 branch March 19, 2016 07:42
@coolo
Copy link
Contributor

coolo commented Mar 20, 2016

I'm deploying this right now - it's a calm sunday without any builds whatsoever :)

@sysrich
Copy link
Member

sysrich commented Mar 21, 2016

This PR is suspected at breaking the review process on openqa.suse.de, as new builds are not showing in some job groups :(

@coolo
Copy link
Contributor

coolo commented Mar 21, 2016

it wasn't - #616 reverts the broken one (I had trouble with anyway for different reason, but merged anyway :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants