-
Notifications
You must be signed in to change notification settings - Fork 432
ci: no retry for flakes in coverage builds #12752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12752 +/- ##
==========================================
- Coverage 93.60% 93.60% -0.01%
==========================================
Files 2075 2075
Lines 182377 182377
==========================================
- Hits 170715 170710 -5
- Misses 11662 11667 +5 ☔ View full report in Codecov by Sentry. |
| GOOGLE_CLOUD_CPP_SPANNER_SLOW_INTEGRATION_TESTS="instance" | ||
| mapfile -t integration_args < <(integration::bazel_args) | ||
| mapfile -t integration_args < <(integration::bazel_coverage_args) | ||
| integration::bazel_with_emulators coverage "${args[@]}" "${integration_args[@]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider leaving integration.sh alone and doing something like:
# With code coverage the `--flaky_test_attempts`
# works in unexpected ways. A flake produces an empty `coverage.dat` file, which
# breaks the build when trying to consolidate all the `coverage.dat` files.
#
# This combination of a "successful" test (because the flake is retried) and a
# failure later in the consolidation of coverage results easily leads the
# developer astray.
coverage_args=("${args[@]" "${integration_args[@]/--flaky_test_attempts=3/}")
integration::bazel_with_emulators coverage "${coverage_args[@]}" There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't like the explicit 3, try ...
# blah blah blah
let i=0
for arg in "${integration_args[@]}"
do
case "${arg}" in
--flaky_test_attempts=*)
unset integration_args[$i]
;;
esac
let ++i
done
This also has the advantage of removing the array element, rather than replacing it with an empty string.
This change is