Draft: Make interface of parsers consistent
What does this MR do and why?
This MR aims to make the interface of the various Ci::Parser
classes consistent. They should have the following interface:
def parse!(blob, report, **kwargs); end
The only change is on Ci::Parsers::Security::Common
which is inherited by each security parser. The change moves the parameters for the parser from the constructor to the parse!
method.
9,11c9,11
< ee/app/models/ee/ci/build.rb:237: ::Gitlab::Ci::Parsers.fabricate!(security_report.type, blob, security_report, signatures_enabled: signatures_enabled).parse!
< ee/app/models/ee/ci/job_artifact.rb:121: ::Gitlab::Ci::Parsers.fabricate!(file_type, blob, report, signatures_enabled: signatures_enabled, validate: validate).parse!
< ee/lib/ee/gitlab/background_migration/populate_uuids_for_security_findings.rb:55: ::Gitlab::Ci::Parsers.fabricate!(file_type, blob, report).parse!
---
> ee/app/models/ee/ci/build.rb:237: ::Gitlab::Ci::Parsers.fabricate!(security_report.type).parse!(blob, security_report, signatures_enabled: signatures_enabled)
> ee/app/models/ee/ci/job_artifact.rb:121: ::Gitlab::Ci::Parsers.fabricate!(file_type).parse!(blob, report, signatures_enabled: signatures_enabled, validate: validate)
> ee/lib/ee/gitlab/background_migration/populate_uuids_for_security_findings.rb:55: ::Gitlab::Ci::Parsers.fabricate!(file_type).parse!(blob, report)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
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.
Related to #370719
Edited by Albert