Learn more about these different git repos.
Other Git URLs
In the code, a comment says this case "should not happen". Yet, I see it in my kojira logs.
This looks like a minor race condition. The 'unknown' task appears in the kojira logs earlier. It finishes very shortly before the warning. Either we're not cleaning something up, or just not cleaning it up fast enough. When this happens, kojira will make a duplicate newRepo task, so it is a wasteful bug.
The code segment here is in regenRepos:
regenRepos
order = self.needed_tags.values() order.sort(key=lambda t:t['score']) for tag in order: ### -SNIP- ### task_id = tag.get('task_id') if task_id: if task_id in self.tasks: # we already have a task continue else: # should not happen logger.warning('Needed tag refers to unknown task. ' '%s -> %i', tagname, task_id)
Looks like the the order of events is:
self.tasks
'task_id'
self.needed_tags
checkTasks
updateRepos
checkNeeded
So this can leave a gap where we have a stale needed_tags entry.
Not critical, but definitely a bug we should fix
Metadata Update from @mikem: - Issue set to the milestone: 1.17
Ways we might address this
I don't think we should just drop the check. If task fails to produce a valid repo, we might get into a state we never properly regenerate a needed tag.
Leaning towards number 2
PR #1175
Commit 2b8a9dd fixes this issue
Commit 1fed5e4 fixes this issue
Login to comment on this ticket.