Skip to content

Remove temp index on job artifacts

Tetiana Chupryna requested to merge 233387-remove-lc-temp-index into master

What does this MR do?

We needed this index to run migration 20200809221641_migrate_license_management_artifacts_to_license_scanning Since this migration is rolled up, we can remove the index

This index is added in this migration

Issue: #233387 (closed)

Migratiom

up

➜  gitlab git:(233387-remove-lc-temp-index) ✗ rails db:migrate 
== 20201019130244 RemoveLicenseComplianceTempIndex: migrating =================
-- transaction_open?()
   -> 0.0000s
-- indexes(:ci_job_artifacts)
   -> 0.0049s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- remove_index(:ci_job_artifacts, {:algorithm=>:concurrently, :name=>"index_ci_job_artifacts_on_license_compliance_file_types"})
   -> 0.0055s
-- execute("RESET ALL")
   -> 0.0002s
== 20201019130244 RemoveLicenseComplianceTempIndex: migrated (0.0113s) ========

down

== 20201019130244 RemoveLicenseComplianceTempIndex: reverting =================
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:ci_job_artifacts, [:job_id, :file_type], {:where=>"file_type = 10 OR file_type = 101", :name=>"index_ci_job_artifacts_on_license_compliance_file_types", :algorithm=>:concurrently})
   -> 0.0042s
-- execute("SET statement_timeout TO 0")
   -> 0.0001s
-- add_index(:ci_job_artifacts, [:job_id, :file_type], {:where=>"file_type = 10 OR file_type = 101", :name=>"index_ci_job_artifacts_on_license_compliance_file_types", :algorithm=>:concurrently})
   -> 0.0071s
-- execute("RESET ALL")
   -> 0.0002s
== 20201019130244 RemoveLicenseComplianceTempIndex: reverted (0.0120s) ========

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 #233387 (closed)

Edited by Tetiana Chupryna

Merge request reports