Adding jobid to the taskotron runner, fixes T145. Adding logurl and joburl interpolation to resultsdb reporting. Fixes T122
ClosedPublic

Authored by tflink on May 6 2014, 11:07 AM.

Details

Summary

Fixed T145 by adding the concept of jobid to the runner. Used the jobid to interpolate logurl and joburl in resultsdb reporting, fixing T122

Test Plan

Added some unit tests, have been running the code in my local instance for a while and it seems to be working.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Just a minor comment, looks OK to me otherwise.

libtaskotron/directives/resultsdb_directive.py
150

Is there any reason for not constructing the log_url in this way?

log_url = "%s/steps/%s/logs/stdio" % (joburl, self.task_stepname)

Will update code shortly

libtaskotron/directives/resultsdb_directive.py
150

Other that the fact that it didn't occur to me to do it that way since I did the log url first? No reason and good idea.

tflink updated this revision.May 6 2014, 11:39 AM
  • simplifying log_url construction, fixing variable names to have more consistent convention
tflink updated this revision.May 6 2014, 11:41 AM
  • backing out partial version bump done during testing
jskladan accepted this revision.May 6 2014, 1:28 PM

Looks good to me!

kparal requested changes to this revision.May 6 2014, 3:37 PM

From a short glance it looks fine, just a string tweak is needed and probably also the comparison. See comments.

conf/taskotron.yaml
60–61

If it is related to buildbot, maybe it should be called buildbot_task_step? But if I'm rambling, ignore me.

libtaskotron/directives/resultsdb_directive.py
106

Shouldn't be this if jobid != '-1'? Because direct is comparison works only for same object instances, it does not compare values.

113–114

You need to put a space at the end of the string, otherwise it will be joined like defaultvalue.

testing/test_resultsdb_directive.py
123

I'm not sure why this is commented out. If we finally have jobid, shouldn't the log_url be properly constructed?

tflink updated this revision.May 6 2014, 4:08 PM
  • simplifying log_url construction, fixing variable names to have more consistent convention
  • backing out partial version bump done during testing
  • fixing unit test so that assertion isn't commented out
tflink added inline comments.May 6 2014, 4:17 PM
testing/test_resultsdb_directive.py
123

in this case, jobid is the resultsdb job id

tflink updated this revision.May 6 2014, 4:20 PM
  • updating code to address concerns in review
kparal accepted this revision.May 6 2014, 4:35 PM

I don't see any more problems.

conf/taskotron.yaml
60–61

Since I'm in my nitpicking mood, we might also consider creating a new "Scheduling" section, because this does not fully fit into "Resources" section :-)

No, I don't really mind, at this point.

tflink added a comment.May 6 2014, 5:25 PM

Since I'm in my nitpicking mood, we might also consider creating a new "Scheduling" section, because this does not fully fit into "Resources" section :-)

I agree but I also want to get this code in develop so we can it in stg. I've filed T161 to cover reorganizing the config file so that the buildbot-related stuff falls in a more appropriate section.

tflink closed this revision.May 6 2014, 5:27 PM

Closed by commit rLTRN229bff5dd2d7 (authored by @tflink).