Fixes: https://pagure.io/koji/issue/1298
Metadata Update from @tkopecek: - Pull-request tagged with: testing-ready
Metadata Update from @mfilip: - Pull-request tagged with: testing-done
Seems odd to grab all these taginfos each pass and only keep the existence. We probably ought to populate tag_cache when we do this.
rebased onto 1e7640acfea5ce96e3a7a4c28cba0ed939250631
Ah, missed, that local getTag already does reasonable caching for this usecase. Simplified.
getTag
Metadata Update from @tkopecek: - Pull-request untagged with: testing-done
Metadata Update from @jcupova: - Pull-request tagged with: testing-done
@tkopecek to check and make sure there aren't any other cases that need updating as well for this
(iirc kojiweb also crashes if you delete a tag)
@dgregor @mikem Issue I was talking about is #1064 (PR #1063) - I thinks we can drop that one, as I'm not sure where I've encountered it. I suspect, that it was only in my dev environment, so caused by dev process and it shouldn't appear in real world.
@ktdreyer Which page suffers from this / can you file a separate issue?
Side note: #1506 is a tangentially related follow-up
Traceback (most recent call last): File "/usr/sbin/kojira", line 1045, in <module> main(options, session) File "/usr/sbin/kojira", line 823, in main repomgr.readCurrentRepos() File "/usr/sbin/kojira", line 358, in readCurrentRepos if not getTag(repo.tag_id) and not repo.expired(): AttributeError: 'NoneType' object has no attribute 'tag_id'
This fixes the above and one other issue. (plus a bonus unrelated logging fix than came up in testing)
https://github.com/mikem23/koji-playground/commits/pagure/pr/1447
The only way I've been able to trigger the condition is to delete build tags while kojira is stopped and then start it. In that case, things seem to work fine. Deleting them while kojira is running seems to be handled elsewhere, but I suppose there is likely a race.
:thumbsup:
Commit a1be473a fixes this pull-request
Pull-Request has been merged by mikem
Fixes: https://pagure.io/koji/issue/1298