Skip to content

::HistoricalData.max_historical_user_count fails with ArubmentError

Summary

Customer reported on zd-251420(internal) that when attempting to run command :HistoricalData.max_historical_user_count ad documented the command failed with below error

irb(main):028:0> ::HistoricalData.max_historical_user_count

Traceback (most recent call last):

2: from (irb):28

1: from ee/app/models/historical_data.rb:17:in `max_historical_user_count'

ArgumentError (missing keywords: :from, :to) 

Steps to reproduce

  1. Open rails console on GitLab
  2. Run commands as documented

Example Project

What is the current bug behavior?

Command fails with error

irb(main):028:0> ::HistoricalData.max_historical_user_count

Traceback (most recent call last):

2: from (irb):28

1: from ee/app/models/historical_data.rb:17:in `max_historical_user_count'

ArgumentError (missing keywords: :from, :to) 

What is the expected correct behavior?

Command should produce the required output.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes