Set RSPEC_TESTS_MAPPING_ENABLED in the `detect-tests as-if-foss` job
What does this MR do and why?
I discovered in #371710 (comment 1075889990)
that the variable wasn't set for this job, resulting in missing test
files to be run by the rspec foss-impact
job, leading to potential
FOSS broken master
.
Related to #371760 (closed).
How to set up and validate locally
- Download artifacts of https://gitlab.com/gitlab-org/gitlab/-/jobs/2923393291 and extract
crystalball/mapping.json
to~/Downloads/crystalball/mapping.json
. - Download
tmp/changed_files.txt
from https://gitlab.com/gitlab-org/gitlab/-/jobs/2924374936 to~/Downloads/changed_files.txt
. - Download
tmp/changed_foss_files.txt
from https://gitlab.com/gitlab-org/gitlab/-/jobs/2924374937 to~/Downloads/changed_foss_files.txt
. - Run the following locally in your
gitlab
folder:FOSS_ONLY=1 RSPEC_TESTS_MAPPING_PATH=~/Downloads/crystalball/mapping.json tooling/bin/find_tests ~/Downloads/changed_foss_files.txt foss-test-files.txt
. - Then check the content of
foss-test-files.txt
and expectspec/graphql/resolvers/group_issues_resolver_spec.rb
not to be there (because the mapping isn't actually used sinceRSPEC_TESTS_MAPPING_PATH
isn't set). - Run the following locally in your
gitlab
folder:FOSS_ONLY=1 RSPEC_TESTS_MAPPING_ENABLED=1 RSPEC_TESTS_MAPPING_PATH=~/Downloads/crystalball/mapping.json tooling/bin/find_tests ~/Downloads/changed_foss_files.txt foss-test-files.txt
(same command but withRSPEC_TESTS_MAPPING_ENABLED=1
set). - Then check the content of
foss-test-files.txt
and expectspec/graphql/resolvers/group_issues_resolver_spec.rb
to be there (because the mapping is used sinceRSPEC_TESTS_MAPPING_PATH
is now set).
app/graphql/resolvers/concerns/issue_resolver_arguments.rb
is modified
Testing when I'm testing this in !96178 (closed) => https://gitlab.com/gitlab-org/gitlab/-/jobs/2940987460
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 Rémy Coutable