Add script to run and automatically retry tests#542
Conversation
7bbc2ba to
9a967dd
Compare
|
I think I would prefer to have |
|
I'm fine with that. I'll see if more comments are added and can then implement it. |
|
I modified a smoke test (so that it fails) and ran
INFO:root:Expanding test case id [smoke_opa-1.0.1_openshift-false]
INFO:root:Expanding test case id [smoke_opa-1.4.2_openshift-false]
Traceback (most recent call last):
File "/nix/store/dk3mknkr5xfkd6wm4zznhy4h8zjcxv1w-beku-stackabletech-0.0.10-/bin/.beku-wrapped", line 9, in <module>
sys.exit(main())
^^^^^^
File "/nix/store/dk3mknkr5xfkd6wm4zznhy4h8zjcxv1w-beku-stackabletech-0.0.10-/lib/python3.12/site-packages/beku/main.py", line 97, in main
return expand(
^^^^^^^
File "/nix/store/dk3mknkr5xfkd6wm4zznhy4h8zjcxv1w-beku-stackabletech-0.0.10-/lib/python3.12/site-packages/beku/kuttl.py", line 332, in expand
test_case.expand(template_dir, output_dir, namespace)
File "/nix/store/dk3mknkr5xfkd6wm4zznhy4h8zjcxv1w-beku-stackabletech-0.0.10-/lib/python3.12/site-packages/beku/kuttl.py", line 149, in expand
test_source.build_destination()
File "/nix/store/dk3mknkr5xfkd6wm4zznhy4h8zjcxv1w-beku-stackabletech-0.0.10-/lib/python3.12/site-packages/beku/kuttl.py", line 79, in build_destination
with open(dest, encoding="utf8", mode="w") as stream:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'tests/_work/tests/smoke/smoke_opa-1.4.2_openshift-false/01-install-vector-aggregator-discovery-configmap.yaml'
ERROR:root:beku failedIs this maybe because of multiple processes running in parallel? |
|
Can you give me the full command you ran and maybe a bit more output? And the three namespaces it mentions are still there. |
|
I currently don't have any output, but at least I can provide the full command :)
Yeah, because you specified |
|
Ahhhh! Now I understand. Thank you. I'll fix that and try the run again. |
|
I also found the issue (well you already hinted at it) with the message about the missing directories. https://github.com/stackabletech/beku.py/pull/7/files I see two possibilities and I'm fine with both (or another option I haven't thought of)
Any preferences/ideas? |
|
Option 1 sounds a bit nicer but I cant judge if it's worth the effort |
9a967dd to
6e8faaa
Compare
|
I have implemented option 1 now along with other improvements |
- keep-failed-namespaces has been changed to delete-failed-namespaces (default false) - A unique work directory is created for each test run to avoid interference - The logs now contain the exact command that was used to run the tests - Script tried to delete already deleted namespaces
6e8faaa to
3e7c4fb
Compare
sbernauer
left a comment
There was a problem hiding this comment.
I guess we can just give this a try in CI and see how it goes :)
This script can be used to run the full test suite and then automatically retry the failing tests a configurable number of times. It can optionally keep the failed namespaces and it writes all the logs to files.
I did create this to run tests locally on my machine but I hope we can also make it usable for CI builds.
I am not the biggest fan of the output as it is very noisy but on the other hand I also don't want to miss crucial information during debugging.
This will generate output like this: