Skip to content

Add build reference to test reports

Jan Provaznik requested to merge add_build_reference into master

What does this MR do?

Because requirements reports will be processed per each CI build, not per pipeline, it will be better to associate each test report with a build.

In a next step we can also remove pipeline reference to normalize this table.

This column will be used in !33031 (merged) Related to #215513 (comment 348942649)

DB migration

$ rake db:migrate
== 20200527135313 AddRequirementsBuildReference: migrating ====================
-- add_column(:requirements_management_test_reports, :build_id, :bigint)
   -> 0.0008s
-- add_index(:requirements_management_test_reports, :build_id, {:name=>"index_requirements_management_test_reports_on_build_id"})
   -> 0.0071s
-- add_foreign_key(:requirements_management_test_reports, :ci_builds, {:column=>:build_id, :on_delete=>:nullify})
   -> 0.0091s
== 20200527135313 AddRequirementsBuildReference: migrated (0.0201s) ===========

$ rake db:rollback
== 20200527135313 AddRequirementsBuildReference: reverting ====================
-- remove_column(:requirements_management_test_reports, :build_id)
   -> 0.0008s
== 20200527135313 AddRequirementsBuildReference: reverted (0.0027s) ===========

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Jan Provaznik

Merge request reports