bodhi_comment_directive's log_url can point to ResultsDB
ClosedPublic

Authored by jskladan on Jun 17 2015, 12:21 PM.

Details

Summary

Now that we have artifacts that only contain the 'sane' subset of tests' output,
lets change the URL in Bodhi-comment, so it points to the respective ResultsDB's
result page, from which it is then possible to either go to the log, or view the
other results.

In order to do that, it is necessary for the resultsdb_directive to produce
information about item->result_id pairing. After a discussion with @kparal
I've added another reserved key to the TAP's YAML section - __internal.
The value is meant to be a dictionary, that will contain the implementation
specific bits of information, when we need to transfer data from one directive
to another.

Test Plan

added unittests

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jskladan retitled this revision from to bodhi_comment_directive's log_url can point to ResultsDB.Jun 17 2015, 12:21 PM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added reviewers: kparal, mkrizek, tflink.
jskladan added a subscriber: kparal.

A few nitpicks and documentation requests.

libtaskotron/check.py
24

The attribute has a single underscore, but this has two. It's not very important, but if we synchronized it (I think one underscore is enough), it would look prettier.

122

We probably don't want to document this in a docstring, but at least a comment explaining what it is for would be great.

libtaskotron/directives/bodhi_comment_directive.py
61–98

I think we will need to include another example here to show how to send Bodhi comments which include links to ResultDB and not directly to BuildBot. And it would be great to also shortly mention it in the directive description.

183–184

Why exactly do we check for AttributeError here? Just a few lines below we use detail.keyvals and we don't check it either. If someone fills the attribute with invalid value type, let's just crash? Also, even if we keep it, at least log the error?

libtaskotron/directives/resultsdb_directive.py
257

The return value has changed, but the documentation hasn't been adjusted. It would be great not only to mention what it returns, but also why (in case you need to use it later, e.g. in bodhi comments directive).

jskladan updated this revision to Diff 1051.Jun 17 2015, 1:27 PM
kparal accepted this revision.Jun 17 2015, 1:32 PM
kparal added inline comments.
libtaskotron/directives/bodhi_comment_directive.py
77

typo :P

This revision is now accepted and ready to land.Jun 17 2015, 1:32 PM
jskladan updated this revision to Diff 1052.Jun 17 2015, 1:35 PM
  • fixed typo and bodhi_comment_directive docs
mkrizek accepted this revision.Jun 23 2015, 8:53 AM
Closed by commit rLTRN39a62f7a1c5c: bodhi_comment_directive: log_url can point to ResultsDB status page (authored by Josef Skladanka <jskladan@redhat.com>, committed by kparal). · Explain WhyJun 23 2015, 8:57 AM
This revision was automatically updated to reflect the committed changes.