This happened for large Bodhi updates with many builds before it got
assigned an update id.
Details
- Reviewers
lbrabec mkrizek jskladan - Maniphest Tasks
- T530: Depcheck fails to create per-update log
- Commits
- rDEPCKf47dab8eb46d: don't try to create >255 chars long artifact filenames
tested manually
Diff Detail
- Repository
- rDEPCK task-depcheck
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
depcheck/squash_results.py | ||
---|---|---|
176–177 | item = item[:255-len('....%s.log' % result.keyvals['arch']) + '...' This IMHO has the same output, but is more readable, how about that? |
depcheck/squash_results.py | ||
---|---|---|
176–177 | Another option would be this: exceed_len = len(filename) - 255 item = item[:-exceed_len-len('...')] + '...' I should have done it like that in the first place. I like that I don't need to repeat the structure with all the arch and log suffix etc (which can change). But if you prefer the way you proposed it more, why not. I'd probably do arch = result.keyvals['arch'] first, to make it more readable. |
Accepted with the changes mentioned in the comments.
depcheck/squash_results.py | ||
---|---|---|
176–177 |
|
item = item[:255-len('....%s.log' % result.keyvals['arch']) + '...'
This IMHO has the same output, but is more readable, how about that?