-
Notifications
You must be signed in to change notification settings - Fork 181
Attemp HO e2e flaky tests multiple times. #1987
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
base: main
Are you sure you want to change the base?
Conversation
0130b26 to
e34a067
Compare
5cf0d7e to
8bd1b36
Compare
| sudo podman info | ||
| sudo podman load --quiet -i android-cuttlefish-e2etest.tar && rm android-cuttlefish-e2etest.tar | ||
| mkdir -p -m 777 /tmp/cw_bazel | ||
| # Run flaky tests. |
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.
General comment. At some point, we should consider pulling all this logic out and putting it elsewhere. Maybe we can create a special container for running tests in that does all of this?
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.
Agree.
| echo "${targets}" | ||
| targets=( $(echo ${targets}) ) | ||
| readonly ATTEMPTS=3 | ||
| for t in "${targets[@]}"; do |
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.
Why can't we do, say, for t in ${targets}; do? (I don't know what the output of targets looks like, though.)
I think you may not even need to strip the carriage return like that, if you do?
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.
Output for bazel query --noshow_progress 'attr(flaky, 1, orchestration/...)' | grep -e "^\/\/" | sort is the following:
//orchestration/bugreport_test:bugreport_test_test
//orchestration/snapshot_test:snapshot_test_test
which is then converted to an array of strings hence the need to use ${targets[@]} in order to iterate through each item.
.github/workflows/presubmit.yaml
Outdated
| sudo podman run --name tester -d --privileged --pids-limit=8192 -v /tmp/cw_bazel:/tmp/cw_bazel -v .:/src/workspace -w /src/workspace/e2etests android-cuttlefish-e2etest:latest | ||
| if [[ ${i} -lt ${ATTEMPTS} ]] | ||
| then | ||
| sudo podman exec --user=testrunner -it tester bazel --output_user_root=/tmp/cw_bazel/output test --sandbox_writable_path=/home/testrunner --flaky_test_attempts=1 ${t} && break || continue |
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.
Run this, capture $?, then test that. This means you don't duplicate the entire podman command string.
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.
Discussed offline. Removed the duplicated command. PTAL
8bd1b36 to
bdf39e3
Compare
- Use brand new containers for every execution. - Run the executions in special runner. Bug: b/474339886
bdf39e3 to
7b85518
Compare
Bug: b/474339886