-
Notifications
You must be signed in to change notification settings - Fork 0
SP-000 add path-suffixes to filter better for frontend E2E and vitests failing tests #12
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
…s failing tests
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
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.
Pull Request Overview
This PR adds an optional file path suffix filter to the find_flaky_tests.py script and updates the corresponding GitHub Action and documentation.
- Adds a new
path_suffixesfield inAppState, CLI parsing (--path-suffixes), and filters annotations by suffix inlist_occurrences. - Updates
action.ymlto expose thepath-suffixesinput to the GitHub Action. - Extends
README.mdwith an example showing how to specify path suffixes.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| find_flaky_tests.py | Introduces path_suffixes parsing and filtering logic. |
| action.yml | Defines path-suffixes input and passes it to the script. |
| README.md | Adds path-suffixes to the usage example under inputs. |
Comments suppressed due to low confidence (2)
find_flaky_tests.py:60
- Add unit tests for
parse_suffixes_tupleto verify correct parsing of comma-separated suffix strings and edge cases.
def parse_suffixes_tuple(s: str | None) -> tuple | None:
find_flaky_tests.py:236
- Add integration tests for
list_occurrencesto ensure annotations are correctly filtered by the provided suffixes.
if state.path_suffixes and not ann.path.endswith(tuple(state.path_suffixes)):
MarvinZeising
left a comment
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.
Nice, thanks!
Why not file-suffixes? Since we use it to filter the files and not the paths where those files can be found?
I named it path because the GitHub annotation has it as path too. |
Type of Change
Description
See Slack
As we have in the frontend and studio repository different kinds of tests running in the CI, it is not so easy to find a prefix for all of them to list the failing/flaky tests on the default branch.
Therefore @ikortelainen came up with the idea to use a path suffix.
This is implemented in the PR
How to test
python3 find_flaky_tests.py --auth-token "**********" --prefix '' --path-suffixes '.spec.ts,.spec.tsx, .test.ts, .test.tsx' Staffbase/frontend masterdiff for two runs with and without the suffixes
TODOs after PR merge