Small but important fixes for bugs found when trying to make depcheck run via taskotron
Details
- Reviewers
kparal tflink mkrizek - Maniphest Tasks
- T216: Fix taskotron issues preventing depcheck from running properly
- Commits
- rLTRN14b08fa55507: T216 - Changes blocking depcheck
unit tests are updated
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Lint Skipped - Unit
Unit Tests Skipped
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? | |
| 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. | |
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)