From 64e7495e7d4f4b302bf155e7b3fd34731d449ade Mon Sep 17 00:00:00 2001 From: Peter Leitzen Date: Wed, 15 May 2024 11:57:03 +0200 Subject: [PATCH 1/2] Run database dictionary related specs on db/docs changes --- scripts/verify-tff-mapping | 11 +++++++++++ tests.yml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/scripts/verify-tff-mapping b/scripts/verify-tff-mapping index 4bdb9a4f690cb8..e053339c02ad72 100755 --- a/scripts/verify-tff-mapping +++ b/scripts/verify-tff-mapping @@ -364,6 +364,17 @@ tests = [ ee/spec/graphql/types/remote_development/workspace_type_spec.rb ee/spec/requests/api/graphql/remote_development/workspace/with_id_arg_spec.rb ] + }, + { + explanation: 'Run database dictionary related specs on db/docs changes.', + changed_file: 'db/docs/design_management_repositories.yml', + expected: %w[ + ee/spec/lib/gitlab/database/desired_sharding_key_spec.rb + spec/db/docs_spec.rb + spec/lib/gitlab/database/dictionary_spec.rb + spec/lib/gitlab/database/no_new_tables_with_gitlab_main_schema_spec.rb + spec/lib/gitlab/database/sharding_key_spec.rb + ] } ] diff --git a/tests.yml b/tests.yml index 355bddb0423a7c..febf30f1f48c00 100644 --- a/tests.yml +++ b/tests.yml @@ -146,6 +146,17 @@ mapping: - 'spec/db/docs_spec.rb' - 'ee/spec/lib/ee/gitlab/database/docs/docs_spec.rb' + # Run database dictionary related specs on db/docs changes. + # https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/6276 + - source: 'db/docs/.+\.yml' + test: + # Found via `git greo Database::Dictionary -l spec ee/spec` + - 'ee/spec/lib/gitlab/database/desired_sharding_key_spec.rb' + - 'spec/db/docs_spec.rb' + - 'spec/lib/gitlab/database/dictionary_spec.rb' + - 'spec/lib/gitlab/database/no_new_tables_with_gitlab_main_schema_spec.rb' + - 'spec/lib/gitlab/database/sharding_key_spec.rb' + # See https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/1360 - source: 'vendor/project_templates/.*' test: 'spec/lib/gitlab/project_template_spec.rb' -- GitLab From 8a47919467e32e41e40c54673afcb761cd019e4a Mon Sep 17 00:00:00 2001 From: Peter Leitzen Date: Wed, 15 May 2024 16:59:26 +0000 Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémy Coutable --- tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.yml b/tests.yml index febf30f1f48c00..9b5197d8766833 100644 --- a/tests.yml +++ b/tests.yml @@ -150,7 +150,7 @@ mapping: # https://gitlab.com/gitlab-org/quality/engineering-productivity/master-broken-incidents/-/issues/6276 - source: 'db/docs/.+\.yml' test: - # Found via `git greo Database::Dictionary -l spec ee/spec` + # Found via `git grep Database::Dictionary -l spec ee/spec` - 'ee/spec/lib/gitlab/database/desired_sharding_key_spec.rb' - 'spec/db/docs_spec.rb' - 'spec/lib/gitlab/database/dictionary_spec.rb' -- GitLab