Page MenuHomePhabricator

Maintenance bot creates duplicates for new wiki tasks
Open, Needs TriagePublic

Event Timeline

Urbanecm renamed this task from Maintenance bot creates duplicates to Maintenance bot creates duplicates for new wiki tasks.Jul 15 2021, 8:02 PM

This happens because of https://github.com/Ladsgroup/Phabricator-maintenance-bot/blob/master/lib.py#L194, which is called before creating any subtasks. According to https://phabricator.wikimedia.org/conduit/method/maniphest.search/, hasSubtasks means "has open subtasks".

@Ladsgroup Any idea how to workaround this bug (except closing tasks early after wiki creation)?

Ugh, yeah for now we should close them early but let me think what we can do here.

With T279233: Re-think post-creation checklist of new wikis I think this is sorta addressed. Once the wiki has been created, its ticket should be closed.

A simple solution would be to check wiki exists (by hitting e.g. az.wikimedia.org and making sure it's not 404) before creating them, if the wiki exists, it shouldn't create it