Skip to content

Fix repack AAB output path#3892

Open
Kudo wants to merge 3 commits into
mainfrom
@kudo/repack/aab
Open

Fix repack AAB output path#3892
Kudo wants to merge 3 commits into
mainfrom
@kudo/repack/aab

Conversation

@Kudo

@Kudo Kudo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Why

Repacked Android builds should produce an APK output path when the source app path ends in .aab.

How

Removed the unused output_path input and generate the repacked output path internally. Generated .aab paths are rewritten to .apk.

Test Plan

  • yarn run -T oxfmt packages/build-tools/src/steps/functions/repack.ts packages/build-tools/src/steps/functions/__tests__/repack.test.ts
  • yarn --cwd packages/build-tools jest-unit repack.test.ts --watchman=false

@Kudo Kudo added the no changelog PR that doesn't require a changelog entry label Jun 23, 2026
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.06%. Comparing base (4071f48) to head (d8887a2).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3892      +/-   ##
==========================================
+ Coverage   59.01%   59.06%   +0.05%     
==========================================
  Files         935      935              
  Lines       40933    40964      +31     
  Branches     8624     8629       +5     
==========================================
+ Hits        24153    24190      +37     
+ Misses      16684    16678       -6     
  Partials       96       96              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Kudo Kudo marked this pull request as ready for review June 23, 2026 19:43
@Kudo Kudo requested a review from sjchmiela June 23, 2026 19:43
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

expect(repackStep.outputById['output_path'].value).toBe('/path/to/output_app');
});

it('should rename explicit aab output path to apk', async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't this weird? like what's the purpose of output_path input if it can be different in the end haha

maybe we can drop the input altogether?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that's kind of intentional to support aab. repack wouldn't be ideal tool to support production aab build, but it's fine to repack from aab source build.
open to idea if there's a better way to support aab. (or even fine that just not to support aab)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i'm talking only about output_path being both an input and an output. i'm all for repacking an aab. if i were to pass in some value to output_path as input i would expect the artifact to be where i told it to be

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i got your point! in the latest commit, it preserves the output_path if explicitly specifying an output_path.

@Kudo Kudo requested a review from sjchmiela June 25, 2026 13:23

@sjchmiela sjchmiela left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thank you!

we could also add Datadog.log for when we do see output_path being used (and not used), and if it isn't, remove it?

Comment on lines +112 to +116
const outputPath = createOutputPath({
requestedOutputPath: inputs.output_path.value as string | undefined,
sourceAppPath,
tmpDir,
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const outputPath = createOutputPath({
requestedOutputPath: inputs.output_path.value as string | undefined,
sourceAppPath,
tmpDir,
});
const outputPath = inputs.output_path.value as string | undefined || createOutputPath({
sourceAppPath,
tmpDir,
});

it feels clearer to me

@Kudo

Kudo commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

we could also add Datadog.log for when we do see output_path being used (and not used), and if it isn't, remove it?

i think output_path is not used.
https://github.com/expo/universe/blob/48c43fd54a33fc911756cefe52937f842113d049/server/www/src/data/entities/workflow/job/WorkflowRepackJob.ts#L223-L236

want me to remove it in this pr?

@github-actions

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

@Kudo

Kudo commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

want me to remove it in this pr?

now i entirely remove the inputs.output_path since it's not used

@Kudo Kudo requested a review from sjchmiela June 26, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants