Remove dead ApplicationSetting push_rule association

What does this MR do and why?

Removes the dead belongs_to :push_rule association on ApplicationSetting, the #push_rule method override that forced it to return nil, and the EE spec block covering that override.

Instance-level push rules used to be stored in the push_rules table (a row with is_sample: true) linked through application_settings.push_rule_id. Since the rollout of the update_organization_push_rules feature flag (already cleaned up), they live in the dedicated organization_push_rules table and are looked up by organization instead.

The association is no longer used:

  • The model already overrode #push_rule to always return nil.
  • No runtime code reads or writes ApplicationSetting#push_rule or application_settings.push_rule_id (verified by grepping app/, ee/app/, lib/, and ee/lib/).

Next steps

Handled in separate follow-up MRs (intentionally excluded here):

  1. Remove the loose foreign key definition application_settings → push_rules (push_rule_id, async_nullify) from config/gitlab_loose_foreign_keys.yml, stop tracking record deletions on push_rules, and add ignore_column :push_rule_id.
  2. Drop the push_rule_id column and the index_application_settings_on_push_rule_id unique index, following the multi-release column removal process.

References

Edited by Emma Park

Merge request reports

Loading
Loading