Skip to content

Prevent a revision on a main/master branch or a tag that does not have any versions without an image artifact from blocking the workflow cleanup

On this Redmine issue, I found that creating a Revision that has a GitRef of type Tag, or one of type Branch with the name master or main, would lead to manage.py cleanup never cleaning any expired workflows as long as the revision has no WorkerVersions that have a docker_image artifact. This leads to NULL values in a subquery used for a NOT IN clause, causing a WHERE clause to always be false and excluding all workflows from being cleaned up.