Moaz Khalifa (4d91186d) at 16 Mar 23:07
Merge branch '588110-update-models-with-identical-policies-to-use-d...
... and 1 more commit
Moaz Khalifa (df4eccbf) at 16 Mar 23:06
This refactors a bunch of virtual registries models to use declarative_policy_class to point to the correct policy instead of a dummy policy file for each of them, which only delegates rules.
| Before | After |
|---|---|
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Thanks @10io!
Left one question on the default value bump. Let me know what you think!
Just changing the default value does not increase the value of the virtual_registries_endpoints_api_limit because it is already saved in the rate_limits JSONB column in the database.
# on master
ApplicationSetting.last.rate_limits["virtual_registries_endpoints_api_limit"]
=> 1000
# on this branch
ApplicationSetting.last.rate_limits["virtual_registries_endpoints_api_limit"]
=> 1000
So, if we want the new value to take effect after this MR has been deployed, will we need a database migration to update the value in the JSONB column?
| Before | After |
|---|---|
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Moaz Khalifa (fb54096d) at 16 Mar 16:00
Remove revoked role requirement for virtual registry access
Thanks @rchanila!
Given https://gitlab.com/groups/gitlab-org/-/work_items/21311+, do you think we still need to move forward here? Most of the other ongoing VReg MRs have been paused.
This refactors a bunch of virtual registries models to use declarative_policy_class to point to the correct policy instead of a dummy policy file for each of them, which only delegates rules.
| Before | After |
|---|---|
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
suggestion (non-blocking): I think we don't need to create a group to pass it here:
setting = build(:virtual_registries_setting)This works for me too.
Thanks @pskorupa!
Left two more suggestions, but they can be done in a follow-up.
Approving here & setting MWPS!
Do we need a spec for this?