Skip to content

Fix productivity analytics fixture

Ezekiel Kigbo requested to merge 356917-fix-productivity-analytics-fixture into master

What does this MR do and why?

Updates a call to the MergeService in the merge_merge_request method to use the correct arguments.

Screenshots or screen recordings

Run the productivity analytics fixture

$ SEED_PRODUCTIVITY_ANALYTICS=1 FILTER=productivity_analytics rake db:seed_fu

Before

Output from the fixture
SEED_PRODUCTIVITY_ANALYTICS=1 FILTER=productivity_analytics rake db:seed_fu

== Filtering seed files against regexp: /productivity_analytics/

== Seed from ee/db/fixtures/development/90_productivity_analytics.rb
/Users/vegito/.asdf/installs/ruby/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30: warning: ⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment.  Your jobs will not go to Redis.
....rake aborted!
ArgumentError: wrong number of arguments (given 2, expected 0; required keyword: project)
/Users/vegito/glab/gdk/gitlab/app/services/issuable_base_service.rb:18:in `initialize'
(eval):132:in `new'
(eval):132:in `block (2 levels) in merge_merge_requests'
(eval):131:in `block in merge_merge_requests'
(eval):130:in `each'
(eval):130:in `merge_merge_requests'
(eval):35:in `block (2 levels) in seed!'
(eval):14:in `block in seed!'
/Users/vegito/glab/gdk/gitlab/config/initializers/forbid_sidekiq_in_transactions.rb:10:in `skipping_transaction_check'
(eval):13:in `seed!'
(eval):150:in `block (4 levels) in run_file'
(eval):142:in `block (3 levels) in run_file'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/seeder.rb:94:in `block (3 levels) in quiet'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/seeder.rb:122:in `without_new_note_notifications'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/seeder.rb:93:in `block (2 levels) in quiet'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/seeder.rb:132:in `without_statement_timeout'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/seeder.rb:92:in `block in quiet'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/seeder.rb:148:in `without_database_logging'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/seeder.rb:91:in `quiet'
(eval):138:in `block (2 levels) in run_file'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:115:in `block in read_write'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:184:in `retry_with_backoff'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:111:in `read_write'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:119:in `write_using_load_balancer'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:71:in `transaction'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/database.rb:331:in `block in transaction'
/Users/vegito/glab/gdk/gitlab/lib/gitlab/database.rb:330:in `transaction'
Tasks: TOP => db:seed_fu
(See full trace by running task with --trace)

After

Output from the fixture
SEED_PRODUCTIVITY_ANALYTICS=1 FILTER=productivity_analytics rake db:seed_fu

== Filtering seed files against regexp: /productivity_analytics/

== Seed from ee/db/fixtures/development/90_productivity_analytics.rb
/Users/vegito/.asdf/installs/ruby/2.7.5/lib/ruby/gems/2.7.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30: warning: ⛔️ WARNING: Sidekiq testing API enabled, but this is not the test environment.  Your jobs will not go to Redis.
......Productivity analytics seeded for project gitlab-org/gitlab-test

OK

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #356917 (closed)

Edited by Ezekiel Kigbo

Merge request reports