• Thong Kuah's avatar
    Deploy to clusters for a project's groups · 5bb2814a
    Thong Kuah authored
    Look for matching clusters starting from the closest ancestor, then go
    up the ancestor tree.
    
    Then use Ruby to get clusters for each group in order. Not that
    efficient, considering we will doing up to `NUMBER_OF_ANCESTORS_ALLOWED`
    number of queries, but it's a finite number
    
    Explicitly order query by depth
    
    This allows us to control ordering explicitly and also to reverse the
    order which is useful to allow us to be consistent with
    Clusters::Cluster.on_environment (EE) which does reverse ordering.
    
    Puts querying group clusters behind Feature Flag. Just in case we have
    issues with performance, we can easily disable this
    5bb2814a
group_hierarchy_spec.rb 3.72 KB