Skip to content

[steps][build-tools][eas-cli] Expand legacy command/path local functions to a single build step; rename references in the consumers - #4096

Open
sswrk wants to merge 9 commits into
szymonswierk/eng-25402-eas-build-job-legacy-function-shapefrom
szymonswierk/eng-25402-steps-expand-legacy-functions
Open

[steps][build-tools][eas-cli] Expand legacy command/path local functions to a single build step; rename references in the consumers#4096
sswrk wants to merge 9 commits into
szymonswierk/eng-25402-eas-build-job-legacy-function-shapefrom
szymonswierk/eng-25402-steps-expand-legacy-functions

Conversation

@sswrk

@sswrk sswrk commented Jul 27, 2026

Copy link
Copy Markdown
Member

Why

We want to grandfather the legacy reusable functions from custom builds (https://docs.expo.dev/custom-builds/functions/) into the new reusable functions that can be used in workflows. This is to make the migration from custom builds to workflows easier.

This PR adds support for parsing the legacy custom build functions into workflow steps.

How

First, across steps, and the consumers (build-tools and eas-cli):

  • Rename “composite local function” occurrences to “local function” in places where we support both composite and legacy functions (this is done in the first commit so I recommend taking a look and then reviewing the rest of the commits to avoid the renaming noise).

The actual feature in steps:

  • Load legacy functions in the local function catalog (utils/localFunctions.ts).
    • Functions that specify path: have the path resolved in this step.
  • Map a legacy config to BuildFunction (utils/legacyFunction.ts).
    • Inputs and outputs default to required, which match the legacy functions, but is different from composites.
  • Expand a legacy call into a single build step (LocalFunctionExpander). BuildStep already has the machinery to run such function.
    • Note: unlike composite functions, working_directory set by the caller is allowed, because there's just one step.

This affects consumers:

  • build-tools: legacy functions referenced in workflows, hooks or composite functions used in workflows are now loaded.
  • eas-cli: eas workflow:validate accepts legacy functions.

Test Plan

Added unit tests.

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

ENG-25402

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.84946% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (szymonswierk/eng-25402-eas-build-job-legacy-function-shape@124aed7). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...es/eas-cli/src/commandUtils/workflow/validation.ts 33.34% 2 Missing ⚠️
packages/steps/src/index.ts 0.00% 1 Missing ⚠️
packages/steps/src/utils/localFunctions.ts 98.95% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                      Coverage Diff                                      @@
##             szymonswierk/eng-25402-eas-build-job-legacy-function-shape    #4096   +/-   ##
=============================================================================================
  Coverage                                                              ?   62.52%           
=============================================================================================
  Files                                                                 ?     1011           
  Lines                                                                 ?    45832           
  Branches                                                              ?     9645           
=============================================================================================
  Hits                                                                  ?    28651           
  Misses                                                                ?    15720           
  Partials                                                              ?     1461           

☔ 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.

@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from b77819d to b43b302 Compare July 28, 2026 09:04
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch 2 times, most recently from 22be929 to a49aa69 Compare July 28, 2026 13:11
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from a49aa69 to 0df6118 Compare July 28, 2026 15:30
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from 0df6118 to 2e32e71 Compare July 29, 2026 09:01
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from 2e32e71 to 3ba680d Compare July 29, 2026 09:29
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from 3ba680d to 096a5fd Compare July 29, 2026 13:40
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from 096a5fd to 04ebb71 Compare July 30, 2026 15:09
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from 80d6d47 to 0486baf Compare August 5, 2026 10:58
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch 3 times, most recently from 51743d5 to 2e21d7e Compare August 5, 2026 12:14
@sswrk sswrk added the ai-review Commits pushed to PRs with this label be automatically reviewed. label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

🤖 AI code review

Decision: No review — every pass failed

⚠️ The AI review could not complete: every review pass failed or timed out, so these changes were effectively NOT reviewed. Treat this as "no review", not "looks good".

⏱️ Coverage note: coverage is partial — some review passes did not
finish (timed out or failed), so issues may exist in areas not fully reviewed:

  • The cross-file review (issues spanning multiple changed files) failed to run; those changes were not reviewed.
  • The consistency review (part 2 of 3) failed to run; those changes were not reviewed.
  • The consistency review (part 1 of 3) failed to run; those changes were not reviewed.
  • The correctness review (part 1 of 3) failed to run; those changes were not reviewed.
  • The consistency review (part 3 of 3) failed to run; those changes were not reviewed.
  • The correctness review (part 2 of 3) failed to run; those changes were not reviewed.
  • The correctness review (part 3 of 3) failed to run; those changes were not reviewed.
  • The security review (part 1 of 3) failed to run; those changes were not reviewed.
  • The security review (part 2 of 3) failed to run; those changes were not reviewed.
  • The security review (part 3 of 3) failed to run; those changes were not reviewed.

No findings.


This review is advisory — it never blocks a merge and never auto-approves.

@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from 2e21d7e to d544e0c Compare August 5, 2026 12:29
@sswrk sswrk changed the title [steps] Expand legacy command/path local functions to a single build step [steps][build-tools][eas-cli] Expand legacy command/path local functions to a single build step; rename references in the consumers Aug 5, 2026
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch 4 times, most recently from 316a9b7 to d4e75da Compare August 5, 2026 15:15
sswrk added 7 commits August 6, 2026 13:11
A local function can now be a composite function or a single-step
command/path function, so the "composite function" naming throughout
packages/steps (and its build-tools/eas-cli consumers) is renamed to
the more general "local function". Pure rename: no behavior, wording,
or type changes.
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-steps-expand-legacy-functions branch from d4e75da to 5b53032 Compare August 6, 2026 12:25
@sswrk

sswrk commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Re. AI review:

Local function load errors use plain Error, not BuildConfigError

Not something specific to this PR, ignoring

…m workflows

Folded from #4098, which added only this test and CHANGELOG entry.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
packages/eas-cli/** @douglowder

Generated by CodeMention

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

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

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

Labels

ai-review Commits pushed to PRs with this label be automatically reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant