IntRangeStrategy does not implement analyze_interval
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary The recently added `IntRangeStrategy` does not have `analyze_interval` attribute, which results in an error when syncing partitions. ### Steps to reproduce 1. Execute `tail -f log/application_json.log | jq 'select(.severity=="ERROR")'`. 2. In a new terminal execute `bundle exec rails gitlab:db:create_dynamic_partitions`. 3. Back in the first terminal we'll see the following error ```json { "severity": "ERROR", "time": "2024-04-15T21:50:49.286Z", "message": "Failed to create / detach partition(s)", "table_name": "merge_request_diff_commits_b5377a7a34", "exception_class": "NoMethodError", "exception_message": "undefined method `analyze_interval' for #<Gitlab::Database::Partitioning::IntRangeStrategy:0x000000017847e2e8 @model=#<Class:0x00000001645f53d8>(authored_date: datetime, committed_date: datetime, sha: binary, message: text, trailers: jsonb, commit_author_id: integer, committer_id: integer, merge_request_diff_id: integer, relative_order: integer), @partitioning_key=:merge_request_diff_id, @partition_size=200000000>", "connection_name": "main" } { "severity": "ERROR", "time": "2024-04-15T21:50:49.506Z", "message": "Failed to create / detach partition(s)", "table_name": "merge_request_diff_commits_b5377a7a34", "exception_class": "NoMethodError", "exception_message": "undefined method `analyze_interval' for #<Gitlab::Database::Partitioning::IntRangeStrategy:0x000000017847e2e8 @model=#<Class:0x00000001645f53d8>(authored_date: datetime, committed_date: datetime, sha: binary, message: text, trailers: jsonb, commit_author_id: integer, committer_id: integer, merge_request_diff_id: integer, relative_order: integer), @partitioning_key=:merge_request_diff_id, @partition_size=200000000>", "connection_name": "ci" } ``` ### What is the current *bug* behavior? Syncing partitions for models using `IntRangeStrategy` fails. ### What is the expected *correct* behavior? Partitions for models using `IntRangeStrategy` should succeed. ### Relevant logs and/or screenshots Reported in https://gitlab.com/gitlab-org/gitlab/-/issues/451767#note_1863215307
issue