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 tocontainer:(and updatedPolicyCreate,PolicyDelete, the policies resolver, and the REST endpoint). - !252080 (merged) added the
governPolicyUpdatemutation against the oldorganization: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
- CI-health incident (deployment-blocker): gitlab-org/quality/analytics/ci-health-incidents#1267 (closed)
- Example failing job: https://gitlab.com/gitlab-org/gitlab/-/jobs/16405288029
- Causing MRs: !253003 (merged) and !252080 (merged)
- Reported in: !253311 (comment 3811846060)
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
-
Run the previously failing spec:
bundle exec rspec ee/spec/requests/api/graphql/mutations/govern/policy_update_spec.rb -
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.