Use flavor-specific artifact names to avoid S3 upload collision#18578
Conversation
When android-release-on-tag calls this workflow for multiple flavors,
they share the same run_id and S3 prefix. Naming the intermediate
artifact executorch-${FLAVOR}.aar prevents the second and third
uploads from failing with "file already exists".
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18578
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
Updates the Android release workflow to use flavor-specific intermediate artifact names so multiple flavor builds in the same run don’t collide during S3 artifact upload/download.
Changes:
- Rename the produced AAR artifact to include the build flavor (
executorch-${FLAVOR}.aar). - Update the S3 artifact download step to fetch the flavor-specific AAR before uploading to the public release bucket.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cp aar-out/executorch.aar "${ARTIFACTS_DIR_NAME}/executorch-${FLAVOR}.aar" | ||
|
|
||
| shasum -a 256 "${ARTIFACTS_DIR_NAME}/executorch.aar" | ||
| shasum -a 256 "${ARTIFACTS_DIR_NAME}/executorch-${FLAVOR}.aar" |
There was a problem hiding this comment.
FLAVOR can be empty (e.g., schedule runs and workflow_dispatch has no default). In that case this will create/upload an artifact named executorch-.aar, while the upload job later defaults empty FLAVOR to xnnpack and tries to download executorch-xnnpack.aar, causing the workflow to fail. Set a default for FLAVOR in the build step before using it in the artifact filename (and ideally reuse the same defaulting logic across jobs).
| wget https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/executorch-${FLAVOR}.aar | ||
| mv executorch-${FLAVOR}.aar executorch.aar | ||
| shasum -a 256 executorch.aar > executorch.aar.sha256sums |
There was a problem hiding this comment.
This step assumes the flavor-specific artifact exists at .../executorch-${FLAVOR}.aar. If FLAVOR was empty in the build job (possible for schedule/manual dispatch), the artifact would have been named executorch-.aar and this download will 404. Ensure FLAVOR is consistently defaulted/validated in both the build and upload jobs (or make flavor required for the triggers that use this workflow).
|
@pytorchbot cherry-pick --onto release/1.2 -c critical |
When android-release-on-tag calls this workflow for multiple flavors,
they share the same run_id and S3 prefix. Naming the intermediate
artifact executorch-${FLAVOR}.aar prevents the second and third uploads
from failing with "file already exists".
(cherry picked from commit 330a567)
Cherry picking #18578The cherry pick PR is at #18581 and it is recommended to link a critical cherry pick PR with an issue. The following tracker issues are updated: Details for Dev Infra teamRaised by workflow job |
…rch#18578) When android-release-on-tag calls this workflow for multiple flavors, they share the same run_id and S3 prefix. Naming the intermediate artifact executorch-${FLAVOR}.aar prevents the second and third uploads from failing with "file already exists".
When android-release-on-tag calls this workflow for multiple flavors, they share the same run_id and S3 prefix. Naming the intermediate artifact executorch-${FLAVOR}.aar prevents the second and third uploads from failing with "file already exists".