Repository navigation
Add Builder Test Pytest Parser - #73
Conversation
Also move shared func into shared.py
f27ca1b to
27002a9
Compare
20c7753 to
fc987f4
Compare
vmilosevic
left a comment
There was a problem hiding this comment.
Parser Registration
Issue: Parsers registered with test_parser.py produce pydantic_models.Test objects, but your parser is producing pydantic_models.OpTest objects, which have a separate collection path and are uploaded in separate files.
Data Flow Paths:
pydantic_models.Test path:
generate_data → create_pipeline_json → create_cicd_json_for_data_analysis → ...
pydantic_models.OpTest path:
generate_data → create_optest_json → create_optest_reports
Solution: Register your parser in optests.py instead of test_parser.py
Testing
This project has multiple contributors, and the only way to ensure that others won't break the changes you made is to add regression tests. Once changes are merged to main, all pipelines start using the new collection code, so it's easy not to notice that something got broken.
Required Test Cases:
Unit tests for builder_pytest_parser.py
Integration tests: Add sample data files to collect_data/test/data/ and add test cases that try to read the actual files, similar to the test here
* Add debugging code, re-enable the workflow to figure out what is working and what isn't. * Update .github/workflows/on-community-issue.yml Remove potential secrets leak Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixed missing newline * Changed output to only put out specific items. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
66a2753 to
7286e57
Compare
| parser = TTTorchModelTestsParser() | ||
|
|
||
| # Load job information to get job names | ||
| github_jobs_json_filename = f"{workflow_outputs_dir}/{pipeline.github_pipeline_id}/workflow_jobs.json" |
There was a problem hiding this comment.
I believe pipeline object already contains job information you need
There was a problem hiding this comment.
job_id_to_name = {j.github_job_id:j.name for j in pipeline.jobs}
| job_name = job_id_to_name.get(github_job_id, "") | ||
|
|
||
| # Select parser based on job name and git branch | ||
| if should_use_builder_pytest_parser(job_name, git_branch): |
There was a problem hiding this comment.
Is this exclusive or can both parsers extract data from same files?
There was a problem hiding this comment.
Technically both could extract data from the same file, but we only want this data to specifically be moved through the builder pytest parser pipeline. The other parser will currently fail due to the suite-wide properties I define to mark this as a builder test artifact.
f56caca to
5427bb4
Compare
5427bb4 to
3faed2a
Compare
3faed2a to
f46a696
Compare
This change adds a secondary parser for
pytestJUnit XML files specifically created by thett-mlir/test/python/golden/tests. This is part of a broader effort to get the results of these tests into Superset, and thecollect_dataaction is a key part of that pipeline.Changes
OpTestspydantic model has been modified to fit the one indata-airflow/dags/pipelines/ml_kernel_op_test/pydantic_models.pyThis is to ensure a common schema across thesftpcall that thecollect_dataaction performstt-mlir/test/python/golden/conftest.py. It contains information about input tensors, hardware, git sha, and any other parameters that the test is run with.mainand part of a job with "builder" in the name to theBuilderPytestParser.