Skip to content

Don't upload golden artifacts to GitHub Actions storage - #22656

Open
jathu wants to merge 1 commit into
mainfrom
jathu/android-golden
Open

Don't upload golden artifacts to GitHub Actions storage#22656
jathu wants to merge 1 commit into
mainfrom
jathu/android-golden

Conversation

@jathu

@jathu jathu commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses step 4:
https://docs.google.com/document/d/1CnGfiP5SU0PG0IdJWn9Ca43LS8bGlEMi3l2gjgC7k48/edit

  • We upload the golden artifacts to GitHub Actions storage and S3. Nothing uses the GHA copy; the Android test uses the S3 one
    local url="https://gha-artifacts.s3.amazonaws.com/pytorch/executorch/test-backend-artifacts/golden-artifacts-xnnpack/golden_artifacts_26082700.zip"
    So keep only the S3 upload.
  • test_backend.sh always set GOLDEN_ARTIFACTS_DIR, so every PR and push to main wrote goldens into the test reports of every backend, about 2 TB/day. Now only the xnnpack nightly writes them (that's where the Android pin comes from), plus a manual save-goldens dispatch when we need a fresh one.

Test plan

CI. On this PR package-golden-artifacts is skipped and the models test reports are a few MB instead of ~1.7 GB.

Authored with Claude Code.

@pytorch-bot

pytorch-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22656

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 2 Unclassified Failures

As of commit 92772fa with merge base 5c5c9ee (image):

NEW FAILURE - The following job has failed:

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 9, 2026
@jathu jathu added the release notes: none Do not include this in the release notes label Sep 9, 2026
@jathu
jathu marked this pull request as ready for review September 9, 2026 20:58
@Gasoonjia

Copy link
Copy Markdown
Contributor

@claude review plz. Will the update impact any existing CI?

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown

Claude finished @Gasoonjia's task in 2m 29s —— View job


Review: Don't upload golden artifacts to GitHub Actions storage

  • Read the diff and the three changed files
  • Trace how GOLDEN_ARTIFACTS_DIR is produced and consumed
  • Check every caller of _test_backend.yml for CI impact
  • Verify the Android test still finds its fixture

Answer to "will this impact existing CI?": Yes, but intentionally, and I don't see a regression. Two behavior changes, both matching the PR description:

  1. Goldens now only written by the xnnpack nightly (or manual dispatch). test_backend.sh no longer exports GOLDEN_ARTIFACTS_DIR unconditionally; instead _test_backend.yml sets it only when save-goldens == true && suite == models. The consumer backends/test/suite/conftest.py:74-78 returns None when the env var is unset, so no golden files get written into the report — reports shrink from ~1.7 GB to a few MB on every other run. ✅

  2. package-golden-artifacts gained && inputs.save-goldens. It now runs only on the nightly/manual dispatch, and the GHA upload-artifact step is deleted, keeping just the S3 upload. ✅

Backward-compatibility / blast radius — checked all callers of _test_backend.yml: pull.yml, test-backend-arm.yml, -coreml, -cortex-m, -nxp, -openvino, -qnn, -vulkan, -webgpu, test-webgpu-native.yml. None of them pass save-goldens, so it defaults to false everywhere — they simply stop writing/packaging goldens, which is the goal. Only test-backend-xnnpack.yml opts in (schedule or manual dispatch). ✅

Android test consumer is safe: android_test_setup.sh:34 pins a hardcoded S3 key (golden_artifacts_26082700.zip). Nothing consumes the deleted GHA artifact, and the nightly still refreshes S3, so the pin can be rotated later. ✅

Minor observations (non-blocking)

  • The save-goldens boolean comparisons are slightly redundant but correct. In _test_backend.yml:85 the expression compares the templated value to the string "true" inside bash, while test-backend-xnnpack.yml:42 uses inputs.save-goldens == true (GHA boolean). Both are valid in their respective contexts; just noting the two idioms differ. No change needed.

  • inputs.save-goldens on a schedule/push event is null, not false. In test-backend-xnnpack.yml:42, inputs.save-goldens == true || github.event_name == 'schedule' — on non-dispatch events inputs is empty so the left side is falsy, and the schedule branch handles the nightly. This is correct, but note it means a push to main will not write goldens (only the cron schedule will). That appears intentional per the PR description ("only the xnnpack nightly writes them"), just flagging it's the schedule trigger specifically, not any push to main.

  • Commit message is wip. Worth giving it a real message before merge (repo guidance discourages throwaway messages).

Note on CI failures shown

The 2 unclassified OpenVINO failures are flagged by Dr. CI as "did not run on the merge base," and OpenVINO doesn't pass save-goldens — so they're unrelated to this change (pre-existing or infra). The 115 pending are still in flight.

Overall this is a clean, well-scoped change with a helpful explanatory comment on the nightly. LGTM aside from the wip commit message.
· branch jathu/android-golden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/nightly CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants