Only count public projects where project and root are public

We appear to have some data integrity issues on GitLab.com where some
projects are marked as public but their namespace isn't. This project
won't actually be public and so won't get Gold features for free, so we
exclude them from the query.
parent 9dd2f46b
Pipeline #149998 passed with stage
in 48 seconds
......@@ -14,7 +14,11 @@ module GitLab
projects.mirror = true
AND projects.archived = false
AND project_mirror_data.retry_count <= 14
AND (projects.visibility_level = 20 OR plans.name IN ('early_adopter', 'bronze', 'silver', 'gold'))
AND (
(projects.visibility_level = 20 AND root_namespaces.visibility_level = 20)
OR
plans.name IN ('early_adopter', 'bronze', 'silver', 'gold')
)
SQL
MIRROR_QUERY = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment