Skip to content
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

#13419: Handle cases where GitHub timeout on a job cuts off the data in a test in a Junit XML, leaving no data to use #13425

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion infra/data_collection/github/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,22 @@ def get_category_from_pytest_testcase_(testcase_):
)


def is_valid_testcase_(testcase):
"""
Some cases of invalid tests include:

- GitHub times out pytest so it records something like this:
</testcase>
<testcase time="0.032"/>
"""
if "name" not in testcase.attrib or "classname" not in testcase.attrib:
# This should be able to capture all cases where there's no info
logger.warning("Found invalid test case with: no name nor classname")
return False
else:
return True


def get_tests_from_test_report_path(test_report_path):
report_root_tree = junit_xml_utils.get_xml_file_root_element_tree(test_report_path)

Expand All @@ -189,6 +205,11 @@ def get_tests_from_test_report_path(test_report_path):

get_pydantic_test = partial(get_pydantic_test_from_pytest_testcase_, default_timestamp=default_timestamp)

return list(map(get_pydantic_test, testsuite))
tests = []
for testcase in testsuite:
if is_valid_testcase_(testcase):
tests.append(get_pydantic_test(testcase))

return tests
else:
raise Exception("We only support pytest junit xml outputs for now")

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":11034942442,"name":"All post-commit tests","node_id":"WFR_kwLOI9Wqc88AAAACkbvb6g","head_branch":"npetrovic/new-sweeps-5","head_sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","path":".github/workflows/all-post-commit-workflows.yaml","display_title":"All post-commit tests","run_number":16500,"event":"workflow_dispatch","status":"completed","conclusion":"failure","workflow_id":67993574,"check_suite_id":28834578360,"check_suite_node_id":"CS_kwDOI9Wqc88AAAAGtqy_uA","url":"https://api.github.com/repos/tenstorrent/tt-metal/actions/runs/11034942442","html_url":"https://github.com/tenstorrent/tt-metal/actions/runs/11034942442","pull_requests":[],"created_at":"2024-09-25T14:17:02Z","updated_at":"2024-09-25T15:19:41Z","actor":{"login":"npetrovic-tenstorrent","id":109360062,"node_id":"U_kgDOBoSzvg","avatar_url":"https://avatars.githubusercontent.com/u/109360062?v=4","gravatar_id":"","url":"https://api.github.com/users/npetrovic-tenstorrent","html_url":"https://github.com/npetrovic-tenstorrent","followers_url":"https://api.github.com/users/npetrovic-tenstorrent/followers","following_url":"https://api.github.com/users/npetrovic-tenstorrent/following{/other_user}","gists_url":"https://api.github.com/users/npetrovic-tenstorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/npetrovic-tenstorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npetrovic-tenstorrent/subscriptions","organizations_url":"https://api.github.com/users/npetrovic-tenstorrent/orgs","repos_url":"https://api.github.com/users/npetrovic-tenstorrent/repos","events_url":"https://api.github.com/users/npetrovic-tenstorrent/events{/privacy}","received_events_url":"https://api.github.com/users/npetrovic-tenstorrent/received_events","type":"User","site_admin":false},"run_attempt":1,"referenced_workflows":[{"path":"tenstorrent/tt-metal/.github/workflows/models-post-commit.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/_build-wheels-impl.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/ttnn-post-commit.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/cpp-post-commit.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/all-static-checks.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/run-profiler-regression.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/build-artifact.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/build-docker-artifact.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/docs-latest-public.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/_test-wheels-impl.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/build-and-unit-tests.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/umd-unit-tests.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/fast-dispatch-build-and-unit-tests.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"},{"path":"tenstorrent/tt-metal/.github/workflows/build.yaml@3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","sha":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","ref":"refs/heads/npetrovic/new-sweeps-5"}],"run_started_at":"2024-09-25T14:17:02Z","triggering_actor":{"login":"npetrovic-tenstorrent","id":109360062,"node_id":"U_kgDOBoSzvg","avatar_url":"https://avatars.githubusercontent.com/u/109360062?v=4","gravatar_id":"","url":"https://api.github.com/users/npetrovic-tenstorrent","html_url":"https://github.com/npetrovic-tenstorrent","followers_url":"https://api.github.com/users/npetrovic-tenstorrent/followers","following_url":"https://api.github.com/users/npetrovic-tenstorrent/following{/other_user}","gists_url":"https://api.github.com/users/npetrovic-tenstorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/npetrovic-tenstorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npetrovic-tenstorrent/subscriptions","organizations_url":"https://api.github.com/users/npetrovic-tenstorrent/orgs","repos_url":"https://api.github.com/users/npetrovic-tenstorrent/repos","events_url":"https://api.github.com/users/npetrovic-tenstorrent/events{/privacy}","received_events_url":"https://api.github.com/users/npetrovic-tenstorrent/received_events","type":"User","site_admin":false},"jobs_url":"https://api.github.com/repos/tenstorrent/tt-metal/actions/runs/11034942442/attempts/1/jobs","logs_url":"https://api.github.com/repos/tenstorrent/tt-metal/actions/runs/11034942442/attempts/1/logs","check_suite_url":"https://api.github.com/repos/tenstorrent/tt-metal/check-suites/28834578360","artifacts_url":"https://api.github.com/repos/tenstorrent/tt-metal/actions/runs/11034942442/artifacts","cancel_url":"https://api.github.com/repos/tenstorrent/tt-metal/actions/runs/11034942442/cancel","rerun_url":"https://api.github.com/repos/tenstorrent/tt-metal/actions/runs/11034942442/rerun","previous_attempt_url":null,"workflow_url":"https://api.github.com/repos/tenstorrent/tt-metal/actions/workflows/67993574","head_commit":{"id":"3e1d154a7e9a4a41558eb2ee692b5ac91f974dc9","tree_id":"d7554065d29f3410deb6268ffb6085688c31a107","message":"Merge branch 'main' into npetrovic/new-sweeps-5","timestamp":"2024-09-25T12:59:11Z","author":{"name":"Nenad Petrovic","email":"[email protected]"},"committer":{"name":"GitHub","email":"[email protected]"}},"repository":{"id":601205363,"node_id":"R_kgDOI9Wqcw","name":"tt-metal","full_name":"tenstorrent/tt-metal","private":false,"owner":{"login":"tenstorrent","id":64161552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0MTYxNTUy","avatar_url":"https://avatars.githubusercontent.com/u/64161552?v=4","gravatar_id":"","url":"https://api.github.com/users/tenstorrent","html_url":"https://github.com/tenstorrent","followers_url":"https://api.github.com/users/tenstorrent/followers","following_url":"https://api.github.com/users/tenstorrent/following{/other_user}","gists_url":"https://api.github.com/users/tenstorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/tenstorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenstorrent/subscriptions","organizations_url":"https://api.github.com/users/tenstorrent/orgs","repos_url":"https://api.github.com/users/tenstorrent/repos","events_url":"https://api.github.com/users/tenstorrent/events{/privacy}","received_events_url":"https://api.github.com/users/tenstorrent/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tenstorrent/tt-metal","description":":metal: TT-NN operator library, and TT-Metalium low level kernel programming model.","fork":false,"url":"https://api.github.com/repos/tenstorrent/tt-metal","forks_url":"https://api.github.com/repos/tenstorrent/tt-metal/forks","keys_url":"https://api.github.com/repos/tenstorrent/tt-metal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tenstorrent/tt-metal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tenstorrent/tt-metal/teams","hooks_url":"https://api.github.com/repos/tenstorrent/tt-metal/hooks","issue_events_url":"https://api.github.com/repos/tenstorrent/tt-metal/issues/events{/number}","events_url":"https://api.github.com/repos/tenstorrent/tt-metal/events","assignees_url":"https://api.github.com/repos/tenstorrent/tt-metal/assignees{/user}","branches_url":"https://api.github.com/repos/tenstorrent/tt-metal/branches{/branch}","tags_url":"https://api.github.com/repos/tenstorrent/tt-metal/tags","blobs_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/refs{/sha}","trees_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tenstorrent/tt-metal/statuses/{sha}","languages_url":"https://api.github.com/repos/tenstorrent/tt-metal/languages","stargazers_url":"https://api.github.com/repos/tenstorrent/tt-metal/stargazers","contributors_url":"https://api.github.com/repos/tenstorrent/tt-metal/contributors","subscribers_url":"https://api.github.com/repos/tenstorrent/tt-metal/subscribers","subscription_url":"https://api.github.com/repos/tenstorrent/tt-metal/subscription","commits_url":"https://api.github.com/repos/tenstorrent/tt-metal/commits{/sha}","git_commits_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/commits{/sha}","comments_url":"https://api.github.com/repos/tenstorrent/tt-metal/comments{/number}","issue_comment_url":"https://api.github.com/repos/tenstorrent/tt-metal/issues/comments{/number}","contents_url":"https://api.github.com/repos/tenstorrent/tt-metal/contents/{+path}","compare_url":"https://api.github.com/repos/tenstorrent/tt-metal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tenstorrent/tt-metal/merges","archive_url":"https://api.github.com/repos/tenstorrent/tt-metal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tenstorrent/tt-metal/downloads","issues_url":"https://api.github.com/repos/tenstorrent/tt-metal/issues{/number}","pulls_url":"https://api.github.com/repos/tenstorrent/tt-metal/pulls{/number}","milestones_url":"https://api.github.com/repos/tenstorrent/tt-metal/milestones{/number}","notifications_url":"https://api.github.com/repos/tenstorrent/tt-metal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tenstorrent/tt-metal/labels{/name}","releases_url":"https://api.github.com/repos/tenstorrent/tt-metal/releases{/id}","deployments_url":"https://api.github.com/repos/tenstorrent/tt-metal/deployments"},"head_repository":{"id":601205363,"node_id":"R_kgDOI9Wqcw","name":"tt-metal","full_name":"tenstorrent/tt-metal","private":false,"owner":{"login":"tenstorrent","id":64161552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0MTYxNTUy","avatar_url":"https://avatars.githubusercontent.com/u/64161552?v=4","gravatar_id":"","url":"https://api.github.com/users/tenstorrent","html_url":"https://github.com/tenstorrent","followers_url":"https://api.github.com/users/tenstorrent/followers","following_url":"https://api.github.com/users/tenstorrent/following{/other_user}","gists_url":"https://api.github.com/users/tenstorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/tenstorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenstorrent/subscriptions","organizations_url":"https://api.github.com/users/tenstorrent/orgs","repos_url":"https://api.github.com/users/tenstorrent/repos","events_url":"https://api.github.com/users/tenstorrent/events{/privacy}","received_events_url":"https://api.github.com/users/tenstorrent/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tenstorrent/tt-metal","description":":metal: TT-NN operator library, and TT-Metalium low level kernel programming model.","fork":false,"url":"https://api.github.com/repos/tenstorrent/tt-metal","forks_url":"https://api.github.com/repos/tenstorrent/tt-metal/forks","keys_url":"https://api.github.com/repos/tenstorrent/tt-metal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tenstorrent/tt-metal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tenstorrent/tt-metal/teams","hooks_url":"https://api.github.com/repos/tenstorrent/tt-metal/hooks","issue_events_url":"https://api.github.com/repos/tenstorrent/tt-metal/issues/events{/number}","events_url":"https://api.github.com/repos/tenstorrent/tt-metal/events","assignees_url":"https://api.github.com/repos/tenstorrent/tt-metal/assignees{/user}","branches_url":"https://api.github.com/repos/tenstorrent/tt-metal/branches{/branch}","tags_url":"https://api.github.com/repos/tenstorrent/tt-metal/tags","blobs_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/refs{/sha}","trees_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tenstorrent/tt-metal/statuses/{sha}","languages_url":"https://api.github.com/repos/tenstorrent/tt-metal/languages","stargazers_url":"https://api.github.com/repos/tenstorrent/tt-metal/stargazers","contributors_url":"https://api.github.com/repos/tenstorrent/tt-metal/contributors","subscribers_url":"https://api.github.com/repos/tenstorrent/tt-metal/subscribers","subscription_url":"https://api.github.com/repos/tenstorrent/tt-metal/subscription","commits_url":"https://api.github.com/repos/tenstorrent/tt-metal/commits{/sha}","git_commits_url":"https://api.github.com/repos/tenstorrent/tt-metal/git/commits{/sha}","comments_url":"https://api.github.com/repos/tenstorrent/tt-metal/comments{/number}","issue_comment_url":"https://api.github.com/repos/tenstorrent/tt-metal/issues/comments{/number}","contents_url":"https://api.github.com/repos/tenstorrent/tt-metal/contents/{+path}","compare_url":"https://api.github.com/repos/tenstorrent/tt-metal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tenstorrent/tt-metal/merges","archive_url":"https://api.github.com/repos/tenstorrent/tt-metal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tenstorrent/tt-metal/downloads","issues_url":"https://api.github.com/repos/tenstorrent/tt-metal/issues{/number}","pulls_url":"https://api.github.com/repos/tenstorrent/tt-metal/pulls{/number}","milestones_url":"https://api.github.com/repos/tenstorrent/tt-metal/milestones{/number}","notifications_url":"https://api.github.com/repos/tenstorrent/tt-metal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tenstorrent/tt-metal/labels{/name}","releases_url":"https://api.github.com/repos/tenstorrent/tt-metal/releases{/id}","deployments_url":"https://api.github.com/repos/tenstorrent/tt-metal/deployments"}}
Loading