Add classes representing CodeCoverage ClickHouse tables
What does this MR do and why?
Adds 3 classes needed to parse different files:
-
CodeCoverage::ClickHouse::CategoryOwnersTable: represents acategory_ownerstable in ClickHouse, and offers functionality to create it and push data to it -
CodeCoverage::ClickHouse::CoverageMetricsTable: represents acoverage_metricstable in ClickHouse, and offers functionality to create it and push data to it -
CodeCoverage::ClickHouse::Table: base class for the above 2 classes
The classes are needed in the context of this work: !355.
Related to: https://gitlab.com/gitlab-org/quality/feature-readiness/team/-/issues/7
How to set up and validate locally
Although not strictly dependent on anything else, to check the correct functioning of these classes many branches need to be fetched locally:
-
Fetch these branches in this exact order, stacking each branch on top of each other so that the last branch contains the complete logic:
- !367 (merged)
- this branch
- !355
-
Run these commands to fetch a bunch of files locally, and store them in
<project-root>/working_dir/:curl -o gitlab.lcov https://gitlab.com/gitlab-org/gitlab/-/jobs/11380416469/artifacts/raw/coverage/lcov/gitlab.lcov curl -o rspec-11380416038.json https://gitlab.com/gitlab-org/gitlab/-/jobs/11380416038/artifacts/raw/rspec/rspec-11380416038.json curl -o rspec-11380416056.json https://gitlab.com/gitlab-org/gitlab/-/jobs/11380416056/artifacts/raw/rspec/rspec-11380416056.json curl https://gitlab-org.gitlab.io/gitlab/crystalball/packed-mapping.json.gz | gzip -d > mapping.json -
Run
ruby exe/test-coverage \ --working_dir '/local/path/to/gitlab_quality-test_tooling/working_dir/' \ --rspec-reports-jobs 'rspec_artifact_collector_unit,rspec_artifact-collector_unit_single-redis,rspec:artifact-collector_ee_unit_single-redis,rspec_artifact-collector_ee_unit' \ --rspec-reports-glob 'rspec/rspec-*.json' \ --coverage-report-path '/local/path/to/gitlab_quality-test_tooling/working_dir/rspec_coverage/coverage/lcov/gitlab.lcov' \ --test-map-url 'https://gitlab-org.gitlab.io/gitlab/crystalball/packed-mapping.json.gz'
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.
Edited by Alberto Bignotti