Skip to content

Change to use the gitlab-styles UpdateLargeTable cop

What does this MR do?

  • Utilizes the upstreamed version of the UpdateLargeTable cop and removes the locally defined version provided by gitlab-styles gem.
  • Removes add_column_with_default from cop detection due to deprecation.

Validated Cop is working as expected still by temporarily creating an exception...

✔ ~/projects/gdk/gitlab [218706-change-to-use-the-gitlab-styles-updatelargetable-cop|●2✚ 2⚑ 1]
10:16 $ be rubocop db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb
Inspecting 1 file
C

Offenses:

db/migrate/20180608110058_rename_merge_requests_allow_collaboration.rb:15:7: C: Migration/UpdateLargeTable: Using rename_column_concurrently on the merge_requests table will take a long time to complete, and should be avoided unless absolutely necessary
      rename_column_concurrently :merge_requests, :allow_collaboration, :allow_maintainer_to_push
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1 file inspected, 1 offense detected
✘-1 ~/projects/gdk/gitlab [218706-change-to-use-the-gitlab-styles-updatelargetable-cop|●2✚ 3⚑ 1]
10:16 $

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

Related to #218706

Edited by Mayra Cabrera

Merge request reports