T216 - Changes blocking depcheck
ClosedPublic

Authored by jskladan on Jun 12 2014, 12:24 PM.

Details

Summary

Small but important fixes for bugs found when trying to make depcheck run via taskotron

Test Plan

unit tests are updated

Diff Detail

Repository
rLTRN libtaskotron
Lint
Lint Skipped
Unit
Unit Tests Skipped
jskladan retitled this revision from to T216 - Changes blocking depcheck.Jun 12 2014, 12:24 PM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added reviewers: tflink, kparal, mkrizek.
tflink requested changes to this revision.Jun 12 2014, 1:44 PM

Changes look good overall but I'd like to see more detail in the exceptions raised.

libtaskotron/directives/yumrepoinfo_directive.py
64

I see why you've written it this way but I'm wondering if separating the arch validity checks would make for better error messages. Something like

processed_arches = [arch for arch in arches if arch not in ['noarch', 'all', 'src']]
if len(processed_arches) == 0:
  raise TaskotronDirectiveError("No valid yumrepo arches supplied to yumrepoinfo directive. Recieved %s" % str(arches))

if len(processed_arches) > 1:
  raise TaskotronDirectiveError("Yumrepoinfo requires a single arch but multiple arches were submitted: %s" % arches)
libtaskotron/koji_utils.py
100

can you add more detail to this exception? Something about which directory should have been created?

This revision now requires changes to proceed.Jun 12 2014, 1:44 PM
kparal added inline comments.Jun 12 2014, 1:50 PM
libtaskotron/directives/yumrepoinfo_directive.py
64–65

Maybe you could be more descriptive here, like "Expected just a single major architecture" or something like that.

libtaskotron/koji_utils.py
84–97

If this is really blocking you, I'm ACK for this for the moment, and please create a ticket so that it's fixed properly in the future. I think file_utils.download() should get changed to prevent these problems.

jskladan updated this revision to Diff 399.Jun 12 2014, 1:59 PM

Updated according to reviews

kparal accepted this revision.Jun 12 2014, 2:00 PM
tflink accepted this revision.Jun 12 2014, 2:15 PM

Looks good to me

This revision is now accepted and ready to land.Jun 12 2014, 2:15 PM
jskladan closed this revision.Jun 12 2014, 2:46 PM
jskladan updated this revision to Diff 402.

Closed by commit rLTRN14b08fa55507 (authored by @jskladan).