Commit 6bf723d6 authored by Matthias Kaeppler's avatar Matthias Kaeppler

Make `warn` deprecation note a comment instead

This turned out to be quite noisy, and we already have a dedicated issue
to track bulk insert related deprecations.

https://gitlab.com/gitlab-org/gitlab/issues/207989
parent 859681c6
...@@ -10,8 +10,9 @@ class MergeRequestDiffCommit < ApplicationRecord ...@@ -10,8 +10,9 @@ class MergeRequestDiffCommit < ApplicationRecord
sha_attribute :sha sha_attribute :sha
alias_attribute :id, :sha alias_attribute :id, :sha
# Deprecated; use `bulk_insert!` from `BulkInsertSafe` mixin instead.
# cf. https://gitlab.com/gitlab-org/gitlab/issues/207989 for progress
def self.create_bulk(merge_request_diff_id, commits) def self.create_bulk(merge_request_diff_id, commits)
warn 'Deprecated; use `bulk_insert` from `BulkInsertSafe` mixin instead'
rows = commits.map.with_index do |commit, index| rows = commits.map.with_index do |commit, index|
# See #parent_ids. # See #parent_ids.
commit_hash = commit.to_hash.except(:parent_ids) commit_hash = commit.to_hash.except(:parent_ids)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment