Commit 32c3b547 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'handle-missing-knapsack-report-gracefully' into 'master'

Handle a missing Knapsack report gracefully in rspec_helpers.sh

See merge request gitlab-org/gitlab!31367
parents cb140072 fe6b3a85
...@@ -73,6 +73,12 @@ function rspec_paralellized_job() { ...@@ -73,6 +73,12 @@ function rspec_paralellized_job() {
export KNAPSACK_LOG_LEVEL="debug" export KNAPSACK_LOG_LEVEL="debug"
export KNAPSACK_REPORT_PATH="knapsack/${report_name}_report.json" export KNAPSACK_REPORT_PATH="knapsack/${report_name}_report.json"
# There's a bug where artifacts are sometimes not downloaded. Since specs can run without the Knapsack report, we can
# handle the missing artifact gracefully here. See https://gitlab.com/gitlab-org/gitlab/-/issues/212349.
if [[ ! -f "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" ]]; then
echo "{}" > "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}"
fi
cp "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" "${KNAPSACK_REPORT_PATH}" cp "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" "${KNAPSACK_REPORT_PATH}"
if [[ -z "${KNAPSACK_TEST_FILE_PATTERN}" ]]; then if [[ -z "${KNAPSACK_TEST_FILE_PATTERN}" ]]; then
......
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