[build-tools] Load legacy command/path local functions and resolve module paths - #4097
Draft
sswrk wants to merge 1 commit into
Conversation
This was referenced Jul 27, 2026
Member
Author
This was referenced Jul 27, 2026
sswrk
force-pushed
the
szymonswierk/eng-25402-build-tools-load-legacy-functions
branch
from
July 27, 2026 15:02
34f9038 to
6ce77e0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## szymonswierk/eng-25402-steps-expand-legacy-functions #4097 +/- ##
========================================================================================
+ Coverage 62.32% 62.33% +0.02%
========================================================================================
Files 996 996
Lines 44867 44881 +14
Branches 9440 9443 +3
========================================================================================
+ Hits 27959 27973 +14
Misses 15462 15462
Partials 1446 1446 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sswrk
force-pushed
the
szymonswierk/eng-25402-build-tools-load-legacy-functions
branch
from
July 28, 2026 09:04
6ce77e0 to
c468e34
Compare
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-build-tools-load-legacy-functions
branch
from
July 28, 2026 12:58
c468e34 to
d2e8524
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
from
July 28, 2026 13:11
22be929 to
a49aa69
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-build-tools-load-legacy-functions
branch
2 times, most recently
from
July 28, 2026 15:30
5554d33 to
76e0f68
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
2 times, most recently
from
July 29, 2026 09:01
0df6118 to
2e32e71
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-build-tools-load-legacy-functions
branch
from
July 29, 2026 09:01
76e0f68 to
2da65a9
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-build-tools-load-legacy-functions
branch
from
July 29, 2026 09:29
2da65a9 to
d1cc5f1
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-build-tools-load-legacy-functions
branch
from
July 29, 2026 13:40
d1cc5f1 to
548b648
Compare
sswrk
force-pushed
the
szymonswierk/eng-25402-steps-expand-legacy-functions
branch
from
July 29, 2026 13:40
3ba680d to
096a5fd
Compare
|
✅ Thank you for adding the changelog entry! |
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
Build runners load referenced local functions from the checked-out project sources before parsing the job, so they need to understand the single-step shape added in #4095/#4096. A
pathfunction also needs its module directory resolved on the runner.How
Parses
function.ymlwith the widenedLocalFunctionConfigZand returns either shape.For a
pathfunction, the module path is resolved against the function's own directory, mirroring how a.eas/buildconfig resolves it against the config file, using the sharedresolveLegacyFunctionModulePathhelper. The loader fails early with a clear error naming both the literalpath:value and the resolved location when the module directory or itspackage.jsonis missing. This check has to live here: single-step functions never joinworkflow.buildFunctions, soBuildWorkflowValidator.validateCustomFunctionModulesAsyncwill not see them.The absolute path stays under
projectSourceDirectory, so the existing source-to-target remap increateCustomFunctionCallkeeps working exactly as it does for.eas/buildfunctions.buildCompositeFunctionCatalogAsyncand its callers (generic.ts,jobHooks.ts,custom.ts) need no changes; they delegate to the shared catalog builder.Test Plan
cd packages/build-tools && yarn test src/steps/__tests__/compositeFunctions.test.tsLoader tests: a
commandfunction loads with its inputs, outputs, shell and platforms; apathfunction's module path is rewritten to an absolute path under the function directory; a missing module directory and a module withoutpackage.jsonboth fail fast; a catalog mixing composite and single-step functions loads; a config mixing both shapes reports the prettified error.Also smoke-tested end to end against a scratch project: a
commandfunction with an input ran and set its output throughset-output, and apathfunction using the prebuiltmy-custom-ts-functionfixture ran and set its outputs.