Skip to content

test_failure_handler improvements #154

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

Open
soxofaan opened this issue Apr 16, 2025 · 1 comment
Open

test_failure_handler improvements #154

soxofaan opened this issue Apr 16, 2025 · 1 comment
Assignees

Comments

@soxofaan
Copy link
Contributor

if grep -q "FAILED" qa/benchmarks/pytest_output.txt; then
python qa/tools/apex_algorithm_qa_tools/test_failure_handler.py
else
echo "No test failures detected"
fi

Why doing this "FAILED" grep in bash, which makes things more error prone and harder to maintain. I would just do the "FAIL" detection directly in test_failure_handler.py.

Also: I would pass the pytest_output.txt path explicitly to the test_failure_handler.py script instead of brittle hardcoding of a relative path it in the script:

log_file = Path("qa/benchmarks/pytest_output.txt")

@soxofaan
Copy link
Contributor Author

with this built-in if condition

- name: Issue Generation
if: ${{ failure() }}

(as added by e16e711 for #152)
I guess it's probably easier to just remove the whole if grep -q "FAILED" qa/benchmar... else... guard as the step will now only run on failure anyway

@soxofaan soxofaan changed the title test_failure_handler improvments test_failure_handler improvements Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants