[steps] Expand legacy command/path local functions to a single build step - #4096
Draft
sswrk wants to merge 1 commit into
Conversation
This was referenced Jul 27, 2026
Member
Author
This was referenced Jul 27, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## szymonswierk/eng-25402-eas-build-job-legacy-function-shape #4096 +/- ##
=============================================================================================
Coverage ? 62.32%
=============================================================================================
Files ? 996
Lines ? 44867
Branches ? 9440
=============================================================================================
Hits ? 27959
Misses ? 15462
Partials ? 1446 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
from
July 28, 2026 09:04
b77819d to
b43b302
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-eas-build-job-legacy-function-shape
branch
2 times, most recently
from
July 28, 2026 12:58
3b018d6 to
891ef23
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
2 times, most recently
from
July 28, 2026 13:11
22be929 to
a49aa69
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-eas-build-job-legacy-function-shape
branch
2 times, most recently
from
July 28, 2026 15:30
27f53d7 to
e8d69a0
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
from
July 28, 2026 15:30
a49aa69 to
0df6118
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-eas-build-job-legacy-function-shape
branch
from
July 29, 2026 09:01
e8d69a0 to
702bea2
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
from
July 29, 2026 09:01
0df6118 to
2e32e71
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-eas-build-job-legacy-function-shape
branch
from
July 29, 2026 09:28
702bea2 to
961f32c
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
from
July 29, 2026 09:29
2e32e71 to
3ba680d
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-eas-build-job-legacy-function-shape
branch
from
July 29, 2026 13:40
961f32c to
9d5f159
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
from
July 29, 2026 13:40
3ba680d to
096a5fd
Compare
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
Makes the moved functions actually run. A workflow step calling a
commandorpathfunction should behave the way it did in a.eas/buildcustom build.Builds on #4095, which taught
function.ymlthe single-step shape.How
When a step references a local function whose
function.ymldeclarescommandorpath, the expander emits a single build step instead of expanding a step group, reusing the sameBuildFunction.createBuildStepFromFunctionCallmachinery that runs these functions in custom builds today. Because that method already accepts a composite function scope, calls work in job steps, in hooks, and from inside a composite function.utils/legacyFunction.tsmaps the parsed config onto aBuildFunction. Legacy semantics are preserved: inputs and outputs are required unless declared otherwise (the composite shape keeps itsrequired ?? falsedefault for inputs), andsupported_platformsis enforced by the existing step-level platform validation.shellfield now takes effect. In.eas/buildconfigs it was parsed and stored but never applied to the step.CompositeFunctionExpander.expandCompositeFunctionStepbecomesexpandLocalFunctionStepand returns flattenedBuildStep[], dispatching on the shape, soCompositeBuildStepno longer leaks to call sites. A single-step function keeps the caller's own id (nocaller__innerprefix) and takes the call-siteif:as its own condition; there is no expansion scope to hang it on.resolveLegacyFunctionModulePathhelper used by the loaders in the next two PRs, so the module-path rewrite cannot drift between them.working_directoryon a step that calls a local function stays rejected for both shapes; the error message is now shape-agnostic. WidensCompositeFunctionCatalogto hold either shape.Test Plan
cd packages/steps && yarn testNew
StepsConfigParser-legacy-functions-test.tscovers expansion to exactly one step with the caller's id, display-name fallbacks,with:values reaching inputs, defaults, required-input andallowed_valuesvalidation, outputs viaset-outputand their visibility to later steps,supported_platformsenforcement, forwardedshell, apathfunction producing a step that calls the module, rejectedworking_directory, and calls nested inside a composite function (idouter__inner,${{ inputs.* }}intowith:, outputs visible to siblings and to the composite's output templates). Extends the hooks and catalog-builder suites.