Index vulnerability_reads on casted_cluster_agent_id
What does this MR do and why?
Adds an index to vulnerability_reads.casted_cluster_agent_id
. Currently there is only a partial index on this column, which is not suitable for performing foreign key actions.
Migration output
main: == 20220630050050 IndexVulnerabilityReadsOnCastedClusterAgentIdFull: migrating
main: -- transaction_open?()
main: -> 0.0000s
main: -- index_exists?(:vulnerability_reads, :casted_cluster_agent_id, {:name=>"index_vuln_reads_on_casted_cluster_agent_id_where_it_is_null", :where=>"casted_cluster_agent_id IS NOT NULL", :algorithm=>:concurrently})
main: -> 0.0100s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0006s
main: -- add_index(:vulnerability_reads, :casted_cluster_agent_id, {:name=>"index_vuln_reads_on_casted_cluster_agent_id_where_it_is_null", :where=>"casted_cluster_agent_id IS NOT NULL", :algorithm=>:concurrently})
main: -> 0.0037s
main: -- execute("RESET statement_timeout")
main: -> 0.0007s
main: == 20220630050050 IndexVulnerabilityReadsOnCastedClusterAgentIdFull: migrated (0.0235s)
main: == 20220630050050 IndexVulnerabilityReadsOnCastedClusterAgentIdFull: reverting
main: -- transaction_open?()
main: -> 0.0000s
main: -- indexes(:vulnerability_reads)
main: -> 0.0122s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0004s
main: -- remove_index(:vulnerability_reads, {:algorithm=>:concurrently, :name=>"index_vuln_reads_on_casted_cluster_agent_id_where_it_is_null"})
main: -> 0.0026s
main: -- execute("RESET statement_timeout")
main: -> 0.0005s
main: == 20220630050050 IndexVulnerabilityReadsOnCastedClusterAgentIdFull: reverted (0.0279s)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
assigned to @tigerwnz
Suggested Reviewers (beta)
The individuals below may be good candidates to participate in the review based on various factors.
You can use slash commands in comments to quickly assign
/assign_reviewer @user1
.Suggested Reviewers @rspeicher
,@mayra-cabrera
,@psimyn
,@jivanvl
,@ahegyi
If you do not believe these suggestions are useful, please apply the label Bad Suggested Reviewer. You can also provide feedback for this feature on this issue:
https://gitlab.com/gitlab-org/gitlab/-/issues/357923
.Automatically generated by Suggested Reviewers Bot - an experimental ML-based recommendation engine created by ~"group::applied ml".
- A deleted user
added typebug label
1 Warning You've made some app changes, but didn't add any tests.
That's OK as long as you're refactoring existing code,
but please consider adding any of the maintenancepipelines, maintenanceworkflow, documentation, QA labels.1 Message This merge request adds or changes files that require a review from the Database team. This merge request requires a database review. To make sure these changes are reviewed, take the following steps:
- Ensure the merge request has database and databasereview pending labels. If the merge request modifies database files, Danger will do this for you.
- Prepare your MR for database review according to the docs.
- Assign and mention the database reviewer suggested by Reviewer Roulette.
The following files require a review from the Database team:
db/post_migrate/20220630050050_index_vulnerability_reads_on_casted_cluster_agent_id_full.rb
db/post_migrate/20220630050050_index_vulnerability_reads_on_casted_cluster_agent_id_full.rb
db/schema_migrations/20220630050050
db/structure.sql
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer database Eulyeon K. ( @euko
) (UTC+9, 1 hour behind@tigerwnz
)Mayra Cabrera ( @mayra-cabrera
) (UTC-5, 15 hours behind@tigerwnz
)~migration No reviewer available No maintainer available To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangeradded 1 commit
- 87810938 - Index vulnerability_reads on casted_cluster_agent_id
added 1 commit
- a9e7d747 - Index vulnerability_reads on casted_cluster_agent_id
changed milestone to %15.2
added groupconfigure [DEPRECATED] label
Started database testing pipeline (limited access). This comment will be updated once the pipeline has finished running.
@DylanGriffith can you please review for database, and pass to
@Alexand
for maintainer review if you approve?requested review from @DylanGriffith
- Resolved by João Alexandre Cunha
@tigerwnz in the interest of time and since I assume what you have will end up being the best option I'll pass along to @Alexand .
Edited by Dylan Griffithadded databasereviewed label
requested review from @Alexand
mentioned in issue gitlab-com/www-gitlab-com#11160 (closed)
removed review request for @DylanGriffith
mentioned in merge request !91456 (merged)
added 1 commit
- 886f6e34 - Index vulnerability_reads on casted_cluster_agent_id
Setting label(s) ~"devops::configure" sectionops based on ~"group::configure".
added devopsconfigure [DEPRECATED] sectionops labels
- Resolved by João Alexandre Cunha
- A deleted user
added database label
added 92 commits
-
44f2bca0...412c3948 - 91 commits from branch
master
- 87b0d2bc - Index vulnerability_reads on casted_cluster_agent_id
-
44f2bca0...412c3948 - 91 commits from branch
@Alexand
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.
For more info, please refer to the following links:
added databaseapproved label and removed databasereviewed label
enabled an automatic merge when the pipeline for 9bff45f6 succeeds
Thanks, @tigerwnz, @DylanGriffith and @mparuszewski. MWPS!
mentioned in commit 9cf74412
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
mentioned in issue Alexand/growth-and-development#1 (closed)
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!1252 (merged)
added groupenvironments label and removed groupconfigure [DEPRECATED] label