Commit 1c8b40c5 authored by Thong Kuah's avatar Thong Kuah

Fixes gitlab_schema for Ci::Builds

This custom model is clobbering gitlab_schema for the ci_builds table,
causing false failures for cross-db query detection

This now causes other specs to fail because we now have the correct
schema for ci_builds, so allowlist those specs.
parent 8cfb1472
...@@ -20,6 +20,7 @@ class AssociateExistingDastBuildsWithVariables < ActiveRecord::Migration[6.1] ...@@ -20,6 +20,7 @@ class AssociateExistingDastBuildsWithVariables < ActiveRecord::Migration[6.1]
class Build < ApplicationRecord class Build < ApplicationRecord
self.table_name = 'ci_builds' self.table_name = 'ci_builds'
self.inheritance_column = :_type_disabled self.inheritance_column = :_type_disabled
self.gitlab_schema = :gitlab_ci
default_scope { where(name: :dast, stage: :dast) } # rubocop:disable Cop/DefaultScope default_scope { where(name: :dast, stage: :dast) } # rubocop:disable Cop/DefaultScope
end end
......
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
- "./spec/mailers/emails/pipelines_spec.rb" - "./spec/mailers/emails/pipelines_spec.rb"
- "./spec/migrations/20210907211557_finalize_ci_builds_bigint_conversion_spec.rb" - "./spec/migrations/20210907211557_finalize_ci_builds_bigint_conversion_spec.rb"
- "./spec/migrations/cleanup_legacy_artifact_migration_spec.rb" - "./spec/migrations/cleanup_legacy_artifact_migration_spec.rb"
- "./spec/migrations/migrate_protected_attribute_to_pending_builds_spec.rb"
- "./spec/migrations/re_schedule_latest_pipeline_id_population_with_all_security_related_artifact_types_spec.rb" - "./spec/migrations/re_schedule_latest_pipeline_id_population_with_all_security_related_artifact_types_spec.rb"
- "./spec/migrations/schedule_migrate_security_scans_spec.rb" - "./spec/migrations/schedule_migrate_security_scans_spec.rb"
- "./spec/models/ci/build_spec.rb" - "./spec/models/ci/build_spec.rb"
...@@ -118,3 +117,8 @@ ...@@ -118,3 +117,8 @@
- "./spec/support/shared_examples/requests/graphql_shared_examples.rb" - "./spec/support/shared_examples/requests/graphql_shared_examples.rb"
- "./spec/support/shared_examples/services/packages_shared_examples.rb" - "./spec/support/shared_examples/services/packages_shared_examples.rb"
- "./spec/support/shared_examples/workers/idempotency_shared_examples.rb" - "./spec/support/shared_examples/workers/idempotency_shared_examples.rb"
- "./spec/migrations/associate_existing_dast_builds_with_variables_spec.rb"
- "./spec/migrations/schedule_pages_metadata_migration_spec.rb"
- "./spec/migrations/schedule_copy_ci_builds_columns_to_security_scans2_spec.rb"
- "./spec/lib/gitlab/background_migration/copy_ci_builds_columns_to_security_scans_spec.rb"
- "./spec/lib/gitlab/background_migration/migrate_pages_metadata_spec.rb"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment