Commit f27ebd8b authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'remove_project_id_delegation_from_pipeline' into 'master'

Remove `project_id` delegation from the `Ci::Pipeline` model

See merge request gitlab-org/gitlab!50032
parents 43e0d5ee 9f50c6c3
...@@ -104,7 +104,6 @@ module Ci ...@@ -104,7 +104,6 @@ module Ci
accepts_nested_attributes_for :variables, reject_if: :persisted? accepts_nested_attributes_for :variables, reject_if: :persisted?
delegate :id, to: :project, prefix: true
delegate :full_path, to: :project, prefix: true delegate :full_path, to: :project, prefix: true
validates :sha, presence: { unless: :importing? } validates :sha, presence: { unless: :importing? }
......
...@@ -38,7 +38,7 @@ module Security ...@@ -38,7 +38,7 @@ module Security
.where('vulnerability_feedback.project_fingerprint = security_findings.project_fingerprint')) .where('vulnerability_feedback.project_fingerprint = security_findings.project_fingerprint'))
end end
scope :ordered, -> { order(severity: :desc, confidence: :desc, id: :asc) } scope :ordered, -> { order(severity: :desc, confidence: :desc, id: :asc) }
scope :with_pipeline_entities, -> { includes(build: [:job_artifacts, pipeline: :project]) } scope :with_pipeline_entities, -> { includes(build: [:job_artifacts, :pipeline]) }
scope :with_scan, -> { includes(:scan) } scope :with_scan, -> { includes(:scan) }
scope :with_scanner, -> { includes(:scanner) } scope :with_scanner, -> { includes(:scanner) }
scope :deduplicated, -> { where(deduplicated: true) } scope :deduplicated, -> { where(deduplicated: true) }
......
...@@ -91,7 +91,7 @@ RSpec.describe Security::FindingsFinder do ...@@ -91,7 +91,7 @@ RSpec.describe Security::FindingsFinder do
end end
it 'does not cause N+1 queries' do it 'does not cause N+1 queries' do
expect { finder_result }.not_to exceed_query_limit(9) expect { finder_result }.not_to exceed_query_limit(8)
end end
describe '#current_page' do describe '#current_page' do
......
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