Fix empty FLAVOR in scheduled AAR builds#18764
Conversation
When triggered by cron schedule, `inputs.flavor` is empty since scheduled runs don't have inputs. The build-aar job was uploading the artifact as `executorch-.aar` (empty flavor), while upload-release-aar defaults flavor to "xnnpack" and tries to download `executorch-xnnpack.aar`, causing a 404. Add consistent default fallback to "xnnpack" in both build-aar and check-if-aar-exists jobs, matching upload-release-aar.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18764
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 3 Unrelated FailuresAs of commit cd7b43a with merge base 462a4af ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
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
Fixes scheduled (cron) runs of the Android AAR release workflow where inputs.flavor is empty (scheduled runs don’t provide inputs), causing mismatched artifact naming and failed downloads.
Changes:
- Add a bash-level default
FLAVOR="xnnpack"incheck-if-aar-exists. - Add the same default
FLAVOR="xnnpack"inbuild-aarbefore composing Gradle args, aligning behavior withupload-release-aar.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fi | ||
| GRADLE_ARGS+=" -Dflavor=${FLAVOR}" | ||
|
|
||
| if [[ "$FLAVOR" == "vulkan" || "$FLAVOR" == "all" || -z "$FLAVOR" ]]; then |
There was a problem hiding this comment.
In this job you now always set a default for FLAVOR (xnnpack) when it's empty, so the || -z "$FLAVOR" branch in the Vulkan setup condition is dead code and can be removed to avoid confusion about when Vulkan dependencies get installed.
| if [[ "$FLAVOR" == "vulkan" || "$FLAVOR" == "all" || -z "$FLAVOR" ]]; then | |
| if [[ "$FLAVOR" == "vulkan" || "$FLAVOR" == "all" ]]; then |
|
is executorch-.aar the same as executorch-xnnpack.aar ? |
Summary
When triggered by cron schedule,
inputs.flavoris empty since scheduled runs don't have inputs. The build-aar job was uploading the artifact asexecutorch-.aar(empty flavor), while upload-release-aar defaults flavor to "xnnpack" and tries to downloadexecutorch-xnnpack.aar, causing a 404.Add consistent default fallback to "xnnpack" in both build-aar and check-if-aar-exists jobs, matching upload-release-aar.
Test plan
CI