Skip to content

[build-tools] Load composite function catalogs for hook steps - #4063

Draft
sswrk wants to merge 1 commit into
szymonswierk/eng-22387-steps-composite-functions-in-hooksfrom
szymonswierk/eng-22387-build-tools-hook-composite-catalog
Draft

[build-tools] Load composite function catalogs for hook steps#4063
sswrk wants to merge 1 commit into
szymonswierk/eng-22387-steps-composite-functions-in-hooksfrom
szymonswierk/eng-22387-build-tools-hook-composite-catalog

Conversation

@sswrk

@sswrk sswrk commented Jul 23, 2026

Copy link
Copy Markdown
Member

Why

Hook steps can reference local composite functions (uses: ./...), but build-tools only loaded the catalog from job steps. Hook-only refs failed at parse/runtime even when function.yml was on disk.

How

  • Pass hooks into buildCompositeFunctionCatalogAsync for steps-based jobs (custom / generic), loading composites from every registered hook key (parity with built-in uses: validation).
  • For native jobs, load composites only from wrapped hook keys so unwrapped keys keep warn-not-fail and do not fail catalog loading.

Test Plan

Added unit tests.

@linear-code

linear-code Bot commented Jul 23, 2026

Copy link
Copy Markdown

ENG-22387

sswrk commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.24%. Comparing base (72786a9) to head (aa881f7).

Additional details and impacted files
@@                                      Coverage Diff                                      @@
##           szymonswierk/eng-22387-steps-composite-functions-in-hooks    #4063      +/-   ##
=============================================================================================
+ Coverage                                                      62.23%   62.24%   +0.02%     
=============================================================================================
  Files                                                            995      995              
  Lines                                                          44764    44778      +14     
  Branches                                                        9415     9419       +4     
=============================================================================================
+ Hits                                                           27855    27869      +14     
  Misses                                                         15462    15462              
  Partials                                                        1447     1447              

☔ 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-22387-build-tools-hook-composite-catalog branch from b9e011c to eb60cb4 Compare July 23, 2026 16:17
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from 394d362 to e118ae0 Compare July 23, 2026 16:17
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from eb60cb4 to e2453da Compare July 23, 2026 17:06
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from e118ae0 to 5a88848 Compare July 23, 2026 17:06
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from e2453da to be59908 Compare July 24, 2026 11:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from 5a88848 to 642f105 Compare July 24, 2026 11:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from be59908 to e65600c Compare July 24, 2026 11:49
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch 2 times, most recently from 40b60f7 to fd5922a Compare July 24, 2026 12:32
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch 2 times, most recently from 31f42c2 to b5884c9 Compare July 24, 2026 13:02
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from fd5922a to 44fec11 Compare July 24, 2026 13:02
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from b5884c9 to e810dd3 Compare July 24, 2026 14:12
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch 2 times, most recently from 56907d3 to a107305 Compare July 24, 2026 14:41
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from e810dd3 to 2f52da6 Compare July 24, 2026 14:41
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from a107305 to 95e91de Compare July 24, 2026 14:59
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from 2f52da6 to 55401ab Compare July 24, 2026 15:00
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from 95e91de to 31a9f3a Compare July 24, 2026 15:17
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from 55401ab to 078f9c2 Compare July 24, 2026 15:17
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from 6bc47f4 to c716575 Compare July 27, 2026 10:10
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch 2 times, most recently from 3dea532 to e086db9 Compare July 27, 2026 11:11
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from c716575 to 69cb01f Compare July 27, 2026 11:11
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from e086db9 to 642df28 Compare July 27, 2026 12:11
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch 2 times, most recently from b4a62e2 to 06aee7e Compare July 27, 2026 12:48
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from 642df28 to 9358a14 Compare July 27, 2026 12:48
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch 2 times, most recently from 5f870bb to f693750 Compare July 27, 2026 14:59
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from 9358a14 to 073ad5d Compare July 27, 2026 14:59
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from f693750 to fc53e31 Compare July 28, 2026 09:04
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch 2 times, most recently from 98ef96f to ff9cb50 Compare July 28, 2026 12:58
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch 2 times, most recently from 7082d4e to f21e06a Compare July 28, 2026 13:11
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from ff9cb50 to 4a56ee2 Compare July 28, 2026 13:11
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from f21e06a to 3d28037 Compare July 28, 2026 15:30
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch 2 times, most recently from 70ce854 to 3702906 Compare July 29, 2026 09:01
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from 3d28037 to 2938e66 Compare July 29, 2026 09:01
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-steps-composite-functions-in-hooks branch from 3702906 to 7136a56 Compare July 29, 2026 09:26
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from 2938e66 to 0319ce3 Compare July 29, 2026 09:27
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-hook-composite-catalog branch from 0319ce3 to aa881f7 Compare July 29, 2026 13:40
@github-actions

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant