Skip to content

Remove temp index in oauth_applications table

Dominic Couture requested to merge remove-tmp-index-oauth-applications into master

What does this MR do?

It removes a temporary index that was created for a migration. Follow up to https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/1132#note_474044062

Migration log

Up

== 20210120221743 DeleteOauthApplicationsTmpIndex: migrating ==================
-- transaction_open?()
   -> 0.0000s
-- indexes(:oauth_applications)
   -> 0.0030s
-- execute("SET statement_timeout TO 0")
   -> 0.0001s
-- remove_index(:oauth_applications, {:algorithm=>:concurrently, :name=>"tmp_index_oauth_applications_on_id_where_trusted"})
   -> 0.0028s
-- execute("RESET ALL")
   -> 0.0002s
== 20210120221743 DeleteOauthApplicationsTmpIndex: migrated (0.0066s) =========

Down

== 20210120221743 DeleteOauthApplicationsTmpIndex: reverting ==================
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:oauth_applications, :id, {:where=>"trusted = true", :name=>"tmp_index_oauth_applications_on_id_where_trusted", :algorithm=>:concurrently})
   -> 0.0030s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- add_index(:oauth_applications, :id, {:where=>"trusted = true", :name=>"tmp_index_oauth_applications_on_id_where_trusted", :algorithm=>:concurrently})
   -> 0.0075s
-- execute("RESET ALL")
   -> 0.0002s
== 20210120221743 DeleteOauthApplicationsTmpIndex: reverted (0.0112s) =========

Screenshots (strongly suggested)

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 Dominic Couture

Merge request reports