Fix governPolicyUpdate passing wrong keyword to UpdateService

What does this MR do and why?

Fixes Mutations::Govern::PolicyUpdate, which currently fails every call with Internal server error: missing keyword: :container.

Two MRs crossed on master:

  • !253003 (merged) renamed the Policy Store services' organization: keyword to container: (and updated PolicyCreate, PolicyDelete, the policies resolver, and the REST endpoint).
  • !252080 (merged) added the governPolicyUpdate mutation against the old organization: signature.

They merged without a git conflict, so the mutation kept calling PolicyStore::UpdateService.new(organization: ...) while the service requires container:. This broke ee/spec/requests/api/graphql/mutations/govern/policy_update_spec.rb and is blocking master and MR pipelines (see the ci-health incident below).

The fix passes container: organization, matching the sibling mutations and the REST endpoint in ee/lib/api/govern/policies.rb.

References

Screenshots or screen recordings

Not applicable: backend-only change with no UI impact.

Before After
Mutation raises missing keyword: :container Mutation updates the policy

How to set up and validate locally

  1. Run the previously failing spec:

    bundle exec rspec ee/spec/requests/api/graphql/mutations/govern/policy_update_spec.rb
  2. All examples should pass (they currently fail on master with Internal server error: missing keyword: :container).

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.

Merge request reports

Loading
Loading