produce per-builds results and store logs
ClosedPublic

Authored by kparal on Feb 20 2015, 12:36 PM.

Details

Summary

Produce also per-build results in TAP. Store log artifacts for both
per-build and per-update. Enabled that in task recipe.

Test Plan

no tests, but it works locally well

Diff Detail

Repository
rUPGR task-upgradepath
Branch
feature/T404-per-build-logs
Lint
No Linters Available
Unit
No Unit Test Coverage
kparal retitled this revision from to produce per-builds results and store logs.Feb 20 2015, 12:36 PM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added reviewers: mkrizek, jskladan, tflink.

This is the current output. Please note how both koji builds and bodhi updates are included in TAP.

$ runtask -i f21-updates -t koji_tag ../task-upgradepath/upgradepath.yml 
[libtaskotron:runner.py:241] 2015-02-20 11:59:47 INFO    Execution started at: 2015-02-20 11:59:47 UTC
[libtaskotron:runner.py:242] 2015-02-20 11:59:47 DEBUG   Using libtaskotron 0.3.11
[libtaskotron:runner.py:247] 2015-02-20 11:59:47 DEBUG   Parsed arguments: Namespace(arch=None, debug=False, item='f21-updates', jobid='-1', override=[], task=['../task-upgradepath/upgradepath.yml'], type='koji_tag', uuid='20150220_115947_558287')
[libtaskotron:config.py:93] 2015-02-20 11:59:47 DEBUG   Using config file: /etc/taskotron/taskotron.yaml
[libtaskotron:config.py:64] 2015-02-20 11:59:47 DEBUG   Using config profile: development
[libtaskotron:runner.py:51] 2015-02-20 11:59:47 INFO    Saving task artifacts into: /var/lib/taskotron/artifacts/20150220_115947_558287
[libtaskotron:python_directive.py:154] 2015-02-20 11:59:47 INFO    Executing Python: upgradepath.main() with args {'custom_args': ['--debug', '--storedir', '/var/lib/taskotron/artifacts/20150220_115947_558287', 'f21-updates']}
[upgradepath:upgradepath.py:359] 2015-02-20 11:59:47 INFO    Querying Koji for builds...
[upgradepath:upgradepath.py:377] 2015-02-20 11:59:49 INFO    Querying Bodhi for matching updates...
[upgradepath:upgradepath.py:418] 2015-02-20 12:00:27 INFO    Getting build information from Koji...
============================================================
csvcat-0.1-20141205git858edfe.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         None
[ OK ] f20-updates
        Latest package:         None
[ OK ] f21
        Latest package:         None
[--->] f21-updates
        Proposed package:       csvcat-0.1-20141205git858edfe.fc21
[ OK ] f22 + f22-updates
        Latest package:         csvcat-0.1-20141205git858edfe.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         csvcat-0.1-20141205git858edfe.fc22
        Latest pending package: None
RESULT: PASSED
============================================================
cups-1:1.7.5-15.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         cups-1:1.7.0-4.fc20
[ OK ] f20-updates
        Latest package:         cups-1:1.7.5-12.fc20
[ OK ] f21
        Latest package:         cups-1:1.7.5-13.fc21
[--->] f21-updates
        Proposed package:       cups-1:1.7.5-15.fc21
[ OK ] f22 + f22-updates
        Latest package:         cups-1:2.0.2-2.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         cups-1:2.0.2-2.fc23
        Latest pending package: None
RESULT: PASSED
============================================================
dnf-langpacks-0.8.1-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         None
[ OK ] f20-updates
        Latest package:         dnf-langpacks-0.6.1-1.fc20
[ OK ] f21
        Latest package:         dnf-langpacks-0.5.0-1.fc21
[--->] f21-updates
        Proposed package:       dnf-langpacks-0.8.1-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         dnf-langpacks-0.8.1-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         dnf-langpacks-0.8.1-1.fc23
        Latest pending package: None
RESULT: PASSED
============================================================
evolution-3.12.11-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         evolution-3.10.2-2.fc20
[ OK ] f20-updates
        Latest package:         evolution-3.10.4-4.fc20
[ OK ] f21
        Latest package:         evolution-3.12.8-1.fc21
[--->] f21-updates
        Proposed package:       evolution-3.12.11-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         evolution-3.13.90-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         evolution-3.13.90-1.fc23
        Latest pending package: None
RESULT: PASSED
============================================================
evolution-data-server-3.12.11-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         evolution-data-server-3.10.2-2.fc20
[ OK ] f20-updates
        Latest package:         evolution-data-server-3.10.4-7.fc20
[ OK ] f21
        Latest package:         evolution-data-server-3.12.8-2.fc21
[--->] f21-updates
        Proposed package:       evolution-data-server-3.12.11-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         evolution-data-server-3.13.90-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         evolution-data-server-3.13.90-1.fc23
        Latest pending package: None
RESULT: PASSED
============================================================
evolution-ews-3.12.11-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         evolution-ews-3.10.2-2.fc20
[ OK ] f20-updates
        Latest package:         evolution-ews-3.10.4-1.fc20
[ OK ] f21
        Latest package:         evolution-ews-3.12.8-1.fc21
[--->] f21-updates
        Proposed package:       evolution-ews-3.12.11-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         evolution-ews-3.13.90-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         evolution-ews-3.13.90-1.fc23
        Latest pending package: None
RESULT: PASSED
============================================================
gnome-boxes-3.14.3.1-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         gnome-boxes-3.10.2-1.fc20
[ OK ] f20-updates
        Latest package:         gnome-boxes-3.10.2-3.fc20
[ OK ] f21
        Latest package:         gnome-boxes-3.14.2-2.fc21
[--->] f21-updates
        Proposed package:       gnome-boxes-3.14.3.1-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         gnome-boxes-3.15.90-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         gnome-boxes-3.15.90-1.fc23
        Latest pending package: None
RESULT: PASSED
============================================================
perl-Encode-1:2.70-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         perl-Encode-1:2.54-1.fc20
[ OK ] f20-updates
        Latest package:         perl-Encode-1:2.54-3.fc20
[ OK ] f21
        Latest package:         perl-Encode-1:2.64-1.fc21
[--->] f21-updates
        Proposed package:       perl-Encode-1:2.70-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         perl-Encode-2:2.70-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         perl-Encode-2:2.70-1.fc22
        Latest pending package: None
RESULT: PASSED
============================================================
qtspell-0.7.1-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         None
[ OK ] f20-updates
        Latest package:         qtspell-0.6.0-1.fc20
[ OK ] f21
        Latest package:         None
[--->] f21-updates
        Proposed package:       qtspell-0.7.1-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         qtspell-0.7.1-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         qtspell-0.7.1-1.fc22
        Latest pending package: None
RESULT: PASSED
============================================================
sharutils-4.15-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         sharutils-4.13.5-3.fc20
[ OK ] f20-updates
        Latest package:         None
[ OK ] f21
        Latest package:         sharutils-4.14-4.fc21
[--->] f21-updates
        Proposed package:       sharutils-4.15-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         sharutils-4.15-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         sharutils-4.15-1.fc22
        Latest pending package: None
RESULT: PASSED
============================================================
shigofumi-0.6-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         shigofumi-0.4-1.fc20
[ OK ] f20-updates
        Latest package:         shigofumi-0.5-1.fc20
[ OK ] f21
        Latest package:         shigofumi-0.5-3.fc21
[--->] f21-updates
        Proposed package:       shigofumi-0.6-1.fc21
[ OK ] f22 + f22-updates
        Latest package:         shigofumi-0.6-1.fc22
        Latest pending package: None
[ OK ] f23
        Latest package:         shigofumi-0.6-1.fc22
        Latest pending package: None
RESULT: PASSED
============================================================
sqlitebrowser-3.5.1-1.fc21 into f21-updates
============================================================
[ OK ] f20
        Latest package:         None
[ OK ] f20-updates
        Latest package:         sqlitebrowser-3.4.0-2.fc20
[ OK ] f21
        Latest package:         None
[--->] f21-updates
        Proposed package:       sqlitebrowser-3.5.1-1.fc21
[FAIL] f22 + f22-updates
        Latest package:         sqlitebrowser-3.5.0-1.fc22
        Latest pending package: None
        Error: Proposed package version must be lesser than or equal to the latest (pending) package version.
[FAIL] f23
        Latest package:         sqlitebrowser-3.5.0-1.fc22
        Latest pending package: None
        Error: Proposed package version must be lesser than or equal to the latest (pending) package version.
RESULT: FAILED
[upgradepath:upgradepath.py:553] 2015-02-20 12:01:52 INFO    OVERALL SUMMARY: 11 PASSED, 1 FAILED
[libtaskotron:resultsdb_directive.py:170] 2015-02-20 12:01:52 INFO    Reporting to ResultsDB is disabled. Once enabled, the following would get reported:
ok - upgradepath for Koji build csvcat-0.1-20141205git858edfe.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: csvcat-0.1-20141205git858edfe.fc21
  outcome: PASSED
  summary: csvcat-0.1-20141205git858edfe.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build cups-1:1.7.5-15.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: cups-1:1.7.5-15.fc21
  outcome: PASSED
  summary: cups-1:1.7.5-15.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build dnf-langpacks-0.8.1-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: dnf-langpacks-0.8.1-1.fc21
  outcome: PASSED
  summary: dnf-langpacks-0.8.1-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build evolution-3.12.11-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: evolution-3.12.11-1.fc21
  outcome: PASSED
  summary: evolution-3.12.11-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build evolution-data-server-3.12.11-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: evolution-data-server-3.12.11-1.fc21
  outcome: PASSED
  summary: evolution-data-server-3.12.11-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build evolution-ews-3.12.11-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: evolution-ews-3.12.11-1.fc21
  outcome: PASSED
  summary: evolution-ews-3.12.11-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build gnome-boxes-3.14.3.1-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: gnome-boxes-3.14.3.1-1.fc21
  outcome: PASSED
  summary: gnome-boxes-3.14.3.1-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build perl-Encode-1:2.70-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: perl-Encode-1:2.70-1.fc21
  outcome: PASSED
  summary: perl-Encode-1:2.70-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build qtspell-0.7.1-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: qtspell-0.7.1-1.fc21
  outcome: PASSED
  summary: qtspell-0.7.1-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build sharutils-4.15-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: sharutils-4.15-1.fc21
  outcome: PASSED
  summary: sharutils-4.15-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Koji build shigofumi-0.6-1.fc21
  ---
  details:
    output: |-
      ============================================================
      <... 16 lines stripped out ...>
      RESULT: PASSED
  item: shigofumi-0.6-1.fc21
  outcome: PASSED
  summary: shigofumi-0.6-1.fc21 into f21-updates
  type: koji_build
  ...
not ok - upgradepath for Koji build sqlitebrowser-3.5.1-1.fc21	# FAIL 
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      RESULT: FAILED
  item: sqlitebrowser-3.5.1-1.fc21
  outcome: FAILED
  summary: sqlitebrowser-3.5.1-1.fc21 into f21-updates
  type: koji_build
  ...
ok - upgradepath for Bodhi update FEDORA-2015-1725
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      SUMMARY: 1 PASSED
  item: FEDORA-2015-1725
  outcome: PASSED
  summary: 1 PASSED
  type: bodhi_update
  ...
ok - upgradepath for Bodhi update FEDORA-2015-1749
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      SUMMARY: 1 PASSED
  item: FEDORA-2015-1749
  outcome: PASSED
  summary: 1 PASSED
  type: bodhi_update
  ...
ok - upgradepath for Bodhi update FEDORA-2015-1893
  ---
  details:
    output: |-
      ============================================================
      <... 54 lines stripped out ...>
      SUMMARY: 3 PASSED
  item: FEDORA-2015-1893
  outcome: PASSED
  summary: 3 PASSED
  type: bodhi_update
  ...
ok - upgradepath for Bodhi update FEDORA-2015-1894
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      SUMMARY: 1 PASSED
  item: FEDORA-2015-1894
  outcome: PASSED
  summary: 1 PASSED
  type: bodhi_update
  ...
ok - upgradepath for Bodhi update FEDORA-2015-1897
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      SUMMARY: 1 PASSED
  item: FEDORA-2015-1897
  outcome: PASSED
  summary: 1 PASSED
  type: bodhi_update
  ...
ok - upgradepath for Bodhi update FEDORA-2015-1903
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      SUMMARY: 1 PASSED
  item: FEDORA-2015-1903
  outcome: PASSED
  summary: 1 PASSED
  type: bodhi_update
  ...
not ok - upgradepath for Bodhi update FEDORA-2015-1915	# FAIL 
  ---
  details:
    output: |-
      ============================================================
      <... 20 lines stripped out ...>
      SUMMARY: 1 FAILED
  item: FEDORA-2015-1915
  outcome: FAILED
  summary: 1 FAILED
  type: bodhi_update
  ...
ok - upgradepath for Bodhi update FEDORA-2015-2074
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      SUMMARY: 1 PASSED
  item: FEDORA-2015-2074
  outcome: PASSED
  summary: 1 PASSED
  type: bodhi_update
  ...
ok - upgradepath for Bodhi update FEDORA-2015-2075
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      SUMMARY: 1 PASSED
  item: FEDORA-2015-2075
  outcome: PASSED
  summary: 1 PASSED
  type: bodhi_update
  ...
ok - upgradepath for Bodhi update FEDORA-2015-2127
  ---
  details:
    output: |-
      ============================================================
      <... 18 lines stripped out ...>
      SUMMARY: 1 PASSED
  item: FEDORA-2015-2127
  outcome: PASSED
  summary: 1 PASSED
  type: bodhi_update
  ...
[libtaskotron:resultsdb_directive.py:171] 2015-02-20 12:01:52 INFO    Hint: Enabling debug output allows you to see unstripped values during variable export.
[libtaskotron:bodhi_comment_directive.py:114] 2015-02-20 12:01:52 INFO    Reporting to Bodhi is disabled, not doing anything.
[libtaskotron:runner.py:267] 2015-02-20 12:01:52 INFO    Execution finished at: 2015-02-20 12:01:52 UTC

And this is how artifacts look like:

$ ll /var/lib/taskotron/artifacts/20150220_115947_558287
total 91k
-rw-rw-r--. 1 kparal kparal  671 Feb 20 13:01 csvcat-0.1-20141205git858edfe.fc21.log
-rw-rw-r--. 1 kparal kparal  660 Feb 20 13:01 cups-1:1.7.5-15.fc21.log
-rw-rw-r--. 1 kparal kparal  683 Feb 20 13:01 dnf-langpacks-0.8.1-1.fc21.log
-rw-rw-r--. 1 kparal kparal  688 Feb 20 13:01 evolution-3.12.11-1.fc21.log
-rw-rw-r--. 1 kparal kparal  772 Feb 20 13:01 evolution-data-server-3.12.11-1.fc21.log
-rw-rw-r--. 1 kparal kparal  716 Feb 20 13:01 evolution-ews-3.12.11-1.fc21.log
-rw-rw-r--. 1 kparal kparal  717 Feb 20 13:01 FEDORA-2015-1725.log
-rw-rw-r--. 1 kparal kparal  690 Feb 20 13:01 FEDORA-2015-1749.log
-rw-rw-r--. 1 kparal kparal 2.2k Feb 20 13:01 FEDORA-2015-1893.log
-rw-rw-r--. 1 kparal kparal  650 Feb 20 13:01 FEDORA-2015-1894.log
-rw-rw-r--. 1 kparal kparal  674 Feb 20 13:01 FEDORA-2015-1897.log
-rw-rw-r--. 1 kparal kparal  682 Feb 20 13:01 FEDORA-2015-1903.log
-rw-rw-r--. 1 kparal kparal  900 Feb 20 13:01 FEDORA-2015-1915.log
-rw-rw-r--. 1 kparal kparal  702 Feb 20 13:01 FEDORA-2015-2074.log
-rw-rw-r--. 1 kparal kparal  723 Feb 20 13:01 FEDORA-2015-2075.log
-rw-rw-r--. 1 kparal kparal  679 Feb 20 13:01 FEDORA-2015-2127.log
-rw-rw-r--. 1 kparal kparal  704 Feb 20 13:01 gnome-boxes-3.14.3.1-1.fc21.log
-rw-rw-r--. 1 kparal kparal  698 Feb 20 13:01 perl-Encode-1:2.70-1.fc21.log
-rw-rw-r--. 1 kparal kparal  631 Feb 20 13:01 qtspell-0.7.1-1.fc21.log
-rw-rw-r--. 1 kparal kparal  655 Feb 20 13:01 sharutils-4.15-1.fc21.log
-rw-rw-r--. 1 kparal kparal  663 Feb 20 13:01 shigofumi-0.6-1.fc21.log
-rw-rw-r--. 1 kparal kparal  881 Feb 20 13:01 sqlitebrowser-3.5.1-1.fc21.log

Usually NVR.log is a per-build log, FEDORA-*.log is a per-update log. If the Fedora update does not have any ID yet, I use its title, therefore either NVR1,NVR2.log, or just NVR.log (for single-build updates). In the last case it overwrites the corresponding per-build log, but that doesn't matter, because the file contents is the same.

tflink accepted this revision.Feb 24 2015, 5:15 AM

Ran locally, looks good.

The only thing I'm not sure about is where to put this code. I'm a little worried that if we just push it to master, it'll end up pulled into stg/prod by accident. Maybe we should be creating a 'develop' branch or something similar for stuff that is to be used in only dev? a fork would also work, I suppose. Any other thoughts?

This revision is now accepted and ready to land.Feb 24 2015, 5:15 AM
In D282#5149, @tflink wrote:

The only thing I'm not sure about is where to put this code. I'm a little worried that if we just push it to master, it'll end up pulled into stg/prod by accident. Maybe we should be creating a 'develop' branch or something similar for stuff that is to be used in only dev? a fork would also work, I suppose. Any other thoughts?

I can create develop branch, no problem at all. But do we have actually some processes which will allow us to distinguish the task default branch in production vs stg/dev? Or will it be done manually? In that case, isn't that potentially even more error-prone? (I'm just thinking aloud, I don't have any personal preference here.)

If we decide to use develop branch in tasks, I think we should do that for all of our tasks (rpmlint, depcheck) to have it consistent. None of them currently uses such a branch.

kparal closed this revision.Feb 25 2015, 10:07 AM

This has been pushed as rUPGR4cc9a698a251. I have created develop branch and set it as default in both Bitbucket and Phabricator.

Please note that with this approach any time we want to promote the code from dev buildbot (running develop branch) to stg buildbot (running master branch), somebody needs to go through all our tasks and manually merge develop into master and push into bitbucket. Ideally using git merge --ff-only or running git diff develop master after the merge to make sure the branches are equal. It's not ideal and it's an additional manual work, but with @mkrizek we weren't able to come up with a better approach until we have some repo automation ready.