Skip to content

Fix empty FLAVOR in scheduled AAR builds#18764

Merged
kirklandsign merged 1 commit intomainfrom
android/fix-aar-flavor-default
Apr 8, 2026
Merged

Fix empty FLAVOR in scheduled AAR builds#18764
kirklandsign merged 1 commit intomainfrom
android/fix-aar-flavor-default

Conversation

@kirklandsign
Copy link
Copy Markdown
Contributor

Summary

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.

Test plan

CI

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.
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 8, 2026

🔗 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 Failures

As of commit cd7b43a with merge base 462a4af (image):

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.

@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 Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@kirklandsign kirklandsign marked this pull request as ready for review April 8, 2026 18:55
Copilot AI review requested due to automatic review settings April 8, 2026 18:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" in check-if-aar-exists.
  • Add the same default FLAVOR="xnnpack" in build-aar before composing Gradle args, aligning behavior with upload-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
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
if [[ "$FLAVOR" == "vulkan" || "$FLAVOR" == "all" || -z "$FLAVOR" ]]; then
if [[ "$FLAVOR" == "vulkan" || "$FLAVOR" == "all" ]]; then

Copilot uses AI. Check for mistakes.
@lucylq
Copy link
Copy Markdown
Contributor

lucylq commented Apr 8, 2026

is executorch-.aar the same as executorch-xnnpack.aar ?

@kirklandsign kirklandsign merged commit 5f16a77 into main Apr 8, 2026
170 of 177 checks passed
@kirklandsign kirklandsign deleted the android/fix-aar-flavor-default branch April 8, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants