Drop group from CD models and GraphQL surface

What does this MR do and why?

Align the CD models and GraphQL surface with the organization-only ownership decided in the Rails design proposal and PRD. Group ownership is deferred to a later iteration.

Changes:

  • Models: Cd::Application and Cd::Environment no longer read group_id (added ignore_column for 19.3 drop). Removed belongs_to :group and the for_groups / for_namespace scopes.
  • GraphQL types: removed the group field and batch loader from CdApplication and CdEnvironment. Granular token boundaries are now instance-only.
  • GraphQL mutations: removed the group_path argument, the Mutations::ResolvesGroup include, and the exactly_one_of validation from CdApplicationCreate and CdEnvironmentCreate. organizationId is now required.
  • GraphQL resolvers: deleted the group-level Resolvers::Cd::ApplicationsResolver and Resolvers::Cd::EnvironmentsResolver. The organization-level resolvers are unchanged.
  • Services and policies: dropped the parent.is_a?(::Group) branch in Cd::Applications::CreateService and Cd::Environments::CreateService; parent is always an organization. Policies now delegate to organization only.
  • Group surface: removed has_many :cd_applications / has_many :cd_environments from the Group model, and the matching cdApplications / cdEnvironments fields from the Group GraphQL type.
  • Specs, factories, and generated GraphQL docs / introspection schema updated to match.

Notes

References

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Agnes Slota

Merge request reports

Loading
Loading