Skip to content

Revert "Merge branch 'georgekoltsov/add-group-import-usage-ping' into 'master'"

George Koltsov requested to merge revert-8b77146a into master

What does this MR do?

This MR reverts !41663 (merged) as post deployment data migration failed on production gitlab-com/gl-infra/production#2731 (closed)

Error:

TASK [Run migrations] **********************************************************
fatal: [deploy-01-sv-gprd.c.gitlab-production.internal]: FAILED! => changed=true 
  cmd:
  - /usr/bin/gitlab-rake
  - db:migrate
  delta: '0:00:20.456282'
  end: '2020-09-22 10:42:25.257486'
  msg: non-zero return code
  rc: 1
  start: '2020-09-22 10:42:04.801204'
  stderr: |-
    rake aborted!
    StandardError: An error has occurred, all later migrations canceled:
    Invalid single-table inheritance type: Group is not a subclass of CleanupGroupImportStatesWithNullUserId::Namespace
    /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb:39:in `default_owner'
    /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb:65:in `block (2 levels) in up'
    /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb:64:in `block in up'
    /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:90:in `block in each_batch'
    /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:68:in `step'
    /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:68:in `each_batch'
    /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb:63:in `up'
    /opt/gitlab/embedded/bin/bundle:23:in `load'
    /opt/gitlab/embedded/bin/bundle:23:in `<main>'
    Caused by:
    ActiveRecord::SubclassNotFound: Invalid single-table inheritance type: Group is not a subclass of CleanupGroupImportStatesWithNullUserId::Namespace
    /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb:39:in `default_owner'
    /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb:65:in `block (2 levels) in up'
    /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb:64:in `block in up'
    /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:90:in `block in each_batch'
    /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:68:in `step'
    /opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:68:in `each_batch'
    /opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20200909161624_cleanup_group_import_states_with_null_user_id.rb:63:in `up'
    /opt/gitlab/embedded/bin/bundle:23:in `load'
    /opt/gitlab/embedded/bin/bundle:23:in `<main>'
    Tasks: TOP => db:migrate
    (See full trace by running task with --trace)
  stderr_lines: <omitted>
  stdout: '== 20200909161624 CleanupGroupImportStatesWithNullUserId: migrating ==========='
  stdout_lines: <omitted>

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by George Koltsov

Merge request reports