Repository navigation
[CI] Upload test run reports to S3 - #199838
Draft
georgehong wants to merge 2 commits into
Draft
georgehong wants to merge 2 commits into
georgehong wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/199838
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 84a39ec with merge base 4f0d8e2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
georgehong
added a commit
that referenced
this pull request
Oct 5, 2026
Zips test/test-run-reports into its own test-run-reports-<suffix>.zip at job
end and uploads it to gha-artifacts, falling back to a GitHub artifact (copied
to S3 afterwards) when S3 is skipped or fails. It's kept apart from the junit
zips, so their readers and layouts are unchanged, and it does nothing when the
folder is missing. XPU jobs copy the folder out of their container with
test/test-reports.
Test Plan:
```
python -c "import yaml; yaml.safe_load(open('.github/actions/upload-test-artifacts/action.yml'))"
spin lint
```
The action's ZIP_CMD on a sample tree gives
test/test-run-reports/<file>/<file>-<id>.jsonl and leaves out
test/junit_xml_testdata. Not run on CI yet; _linux-test.yml uses this action
from main.
Authored with the help of an AI assistant (Claude).
ghstack-source-id: ffa1f00
Pull-Request: #199838
georgehong
added a commit
that referenced
this pull request
Oct 5, 2026
Only for checking #199838 on Linux: _linux-test.yml takes upload-test-artifacts from main (a full path, since local actions fail in its container jobs), so a PR's Linux jobs never run that PR's copy of the action. Pointing it at #199838's ghstack branch makes this PR's Linux jobs zip and upload test-run-reports-<suffix>.zip to S3. Close this PR after checking; it is not meant to land. Test Plan: ``` python -c "import yaml; yaml.safe_load(open('.github/workflows/_linux-test.yml'))" spin lint ``` Authored with the help of an AI assistant (Claude). ghstack-source-id: e0258dc Pull-Request: #199844
georgehong
added a commit
that referenced
this pull request
Oct 6, 2026
Zips test/test-run-reports into its own test-run-reports-<suffix>.zip at job
end and uploads it to gha-artifacts, falling back to a GitHub artifact (copied
to S3 afterwards) when S3 is skipped or fails. It's kept apart from the junit
zips, so their readers and layouts are unchanged, and it does nothing when the
folder is missing. XPU jobs copy the folder out of their container with
test/test-reports.
Test Plan:
```
python -c "import yaml; yaml.safe_load(open('.github/actions/upload-test-artifacts/action.yml'))"
spin lint
```
The action's ZIP_CMD on a sample tree gives
test/test-run-reports/<file>/<file>-<id>.jsonl and leaves out
test/junit_xml_testdata. Not run on CI yet; _linux-test.yml uses this action
from main.
Authored with the help of an AI assistant (Claude).
ghstack-source-id: ffa1f00
Pull-Request: #199838
georgehong
added a commit
that referenced
this pull request
Oct 6, 2026
Only for checking #199838 on Linux: _linux-test.yml takes upload-test-artifacts from main (a full path, since local actions fail in its container jobs), so a PR's Linux jobs never run that PR's copy of the action. Pointing it at #199838's ghstack branch makes this PR's Linux jobs zip and upload test-run-reports-<suffix>.zip to S3. Close this PR after checking; it is not meant to land. Test Plan: ``` python -c "import yaml; yaml.safe_load(open('.github/workflows/_linux-test.yml'))" spin lint ``` Authored with the help of an AI assistant (Claude). ghstack-source-id: 470b906 Pull-Request: #199844
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. TEST_RUN_REPORTS_MODE gates it: off (the default), dry (count what each statement would insert, write nothing), or on; the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO before switching it on: update the replicator's ClickHouse grants if needed. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. TEST_RUN_REPORTS_MODE gates it: off (the default), dry (count what each statement would insert, write nothing), or on; the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO before switching it on: update the replicator's ClickHouse grants if needed. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. TEST_RUN_REPORTS_MODE gates it: off, dry (count what each statement would insert, write nothing), or on (the default, while only the DNM pytorch/pytorch#199844 uploads these zips); the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO: update the replicator's ClickHouse grants if needed; until then its inserts fail and are logged to errors.gen_errors. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. TEST_RUN_REPORTS_MODE gates it: off, dry (count what each statement would insert, write nothing), or on (the default, while only the DNM pytorch/pytorch#199844 uploads these zips); the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO: update the replicator's ClickHouse grants if needed; until then its inserts fail and are logged to errors.gen_errors. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. TEST_RUN_REPORTS_MODE gates it: off, dry (count what each statement would insert, write nothing), or on (the default, while only the DNM pytorch/pytorch#199844 uploads these zips); the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO: update the replicator's ClickHouse grants if needed; until then its inserts fail and are logged to errors.gen_errors. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. Until the reports carry their uuid, runs.report_uuid is taken from each report's file name. TEST_RUN_REPORTS_MODE gates it: off, dry (count what each statement would insert, write nothing), or on (the default, while only the DNM pytorch/pytorch#199844 uploads these zips); the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO: update the replicator's ClickHouse grants if needed; until then its inserts fail and are logged to errors.gen_errors. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. Until the reports carry their uuid, runs.report_uuid is taken from each report's file name. runs' ids are the catalogs' own id DEFAULTs, read from system.columns at ingest, so the lambda holds no id logic; language comes from each run line. TEST_RUN_REPORTS_MODE gates it: off, dry (count what each statement would insert, write nothing), or on (the default, while only the DNM pytorch/pytorch#199844 uploads these zips); the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO: update the replicator's ClickHouse grants if needed; until then its inserts fail and are logged to errors.gen_errors. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. Until the reports carry their uuid, runs.report_uuid is taken from each report's file name. runs' ids are the catalogs' own id DEFAULTs, read from system.columns at ingest, so the lambda holds no id logic; language comes from each run line. TEST_RUN_REPORTS_MODE gates it: off, dry (count what each statement would insert, write nothing), or on (the default, while only the DNM pytorch/pytorch#199844 uploads these zips); the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO: update the replicator's ClickHouse grants if needed; until then its inserts fail and are logged to errors.gen_errors. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 6, 2026
Each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables. Until the reports carry their uuid, runs.report_uuid is taken from each report's file name. runs' ids are the catalogs' own id DEFAULTs, read from system.columns at ingest, so the lambda holds no id logic; language comes from each run line. TEST_RUN_REPORTS_MODE gates it: off, dry (count what each statement would insert, write nothing), or on (the default, while only the DNM pytorch/pytorch#199844 uploads these zips); the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change. TODO: update the replicator's ClickHouse grants if needed; until then its inserts fail and are logged to errors.gen_errors. It must be able to INSERT into the four tables and SELECT from tests, environments and flags; check SHOW GRANTS for its user, and grant by hand (or with the fortesting migrations) what is missing. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
to pytorch/test-infra
that referenced
this pull request
Oct 7, 2026
**Summary** In our E2E test for new test report generation, each pytorch test job uploads one zip of JSONL test run reports when it ends, as test-run-reports-<suffix>.report.zip (pytorch/pytorch#199838). Route those keys to a new adapter that has ClickHouse read the zip and insert into the fortesting.{tests,environments,flags,runs} tables, completing the loop of CI --> S3 --> ClickHouse. `TEST_RUN_REPORTS_MODE` gates it: off (the default), dry (count what each statement would insert, write nothing), or on; the function's environment can override it. The S3 notification for the zips is a separate pytorch-gha-infra change at metainternal/pytorch-gha-infra#1567. **Motivation** This allows us to check the ClickHouse insert query performance and how long lambdas will roughly take, which could affect proximity to the concurrency limit. Authored with the help of an AI assistant (Claude).
georgehong
added a commit
that referenced
this pull request
Oct 7, 2026
Zips test/test-run-reports into its own test-run-reports-<suffix>.zip at job
end and uploads it to gha-artifacts, falling back to a GitHub artifact (copied
to S3 afterwards) when S3 is skipped or fails. It's kept apart from the junit
zips, so their readers and layouts are unchanged, and it does nothing when the
folder is missing. XPU jobs copy the folder out of their container with
test/test-reports.
Test Plan:
```
python -c "import yaml; yaml.safe_load(open('.github/actions/upload-test-artifacts/action.yml'))"
spin lint
```
The action's ZIP_CMD on a sample tree gives
test/test-run-reports/<file>/<file>-<id>.jsonl and leaves out
test/junit_xml_testdata. Not run on CI yet; _linux-test.yml uses this action
from main.
Authored with the help of an AI assistant (Claude).
ghstack-source-id: ffa1f00
Pull-Request: #199838
georgehong
added a commit
that referenced
this pull request
Oct 7, 2026
Only for checking #199838 on Linux: _linux-test.yml takes upload-test-artifacts from main (a full path, since local actions fail in its container jobs), so a PR's Linux jobs never run that PR's copy of the action. Pointing it at #199838's ghstack branch makes this PR's Linux jobs zip and upload test-run-reports-<suffix>.zip to S3. Close this PR after checking; it is not meant to land. Test Plan: ``` python -c "import yaml; yaml.safe_load(open('.github/workflows/_linux-test.yml'))" spin lint ``` Authored with the help of an AI assistant (Claude). ghstack-source-id: 3fb0f4f Pull-Request: #199844
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Zips test/test-run-reports into its own test-run-reports-.zip at job
end and uploads it to gha-artifacts, falling back to a GitHub artifact (copied
to S3 afterwards) when S3 is skipped or fails. It's kept apart from the junit
zips, so their readers and layouts are unchanged, and it does nothing when the
folder is missing. XPU jobs copy the folder out of their container with
test/test-reports.
Test Plan:
The action's ZIP_CMD on a sample tree gives
test/test-run-reports//-.jsonl and leaves out
test/junit_xml_testdata. Not run on CI yet; _linux-test.yml uses this action
from @main.
Authored with the help of an AI assistant (Claude).