Skip to content

[eas-cli] Validate local composite functions in workflow files - #3931

Open
sswrk wants to merge 1 commit into
mainfrom
szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files
Open

[eas-cli] Validate local composite functions in workflow files#3931
sswrk wants to merge 1 commit into
mainfrom
szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files

Conversation

@sswrk

@sswrk sswrk commented Jul 1, 2026

Copy link
Copy Markdown
Member

Why

Workflow users should get early feedback when a workflow references a missing or malformed local composite function before server-side validation runs.

How

  • Adds validateWorkflowLocalCompositeFunctionsAsync to walk workflow job steps and build the local composite function catalog using @expo/steps discovery utilities
  • Validates referenced composite functions exist on disk, parse as YAML, and conform to CompositeFunctionConfigZ (including nested references)
  • Hooks validation into validateWorkflowFileAsync

Test Plan

Added unit tests for validation, monorepo resolution, nested references, and malformed configs.

@linear-code

linear-code Bot commented Jul 1, 2026

Copy link
Copy Markdown

ENG-22387

sswrk commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 737a707 to a01a405 Compare July 1, 2026 16:50
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from 32e1305 to d95f9f7 Compare July 2, 2026 16:56
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from a01a405 to 23c7c61 Compare July 2, 2026 16:56
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.80488% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.23%. Comparing base (2e00719) to head (ab74d1e).

Files with missing lines Patch % Lines
...li/src/commandUtils/workflow/compositeFunctions.ts 92.11% 3 Missing ⚠️
...es/eas-cli/src/commandUtils/workflow/validation.ts 33.34% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3931      +/-   ##
==========================================
+ Coverage   62.20%   62.23%   +0.03%     
==========================================
  Files         994      995       +1     
  Lines       44716    44757      +41     
  Branches     9409     9414       +5     
==========================================
+ Hits        27812    27848      +36     
- Misses      15457    15462       +5     
  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-load-custom-action-catalog-at-build-time branch from d95f9f7 to e5d34d9 Compare July 3, 2026 13:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 23c7c61 to e2fed20 Compare July 3, 2026 13:43
@sswrk sswrk changed the title [eas-cli] Validate custom actions in workflow files [eas-cli] Validate local actions in workflow files Jul 3, 2026
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from e5d34d9 to 4f20b26 Compare July 3, 2026 14:08
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from e2fed20 to d09911d Compare July 3, 2026 14:08
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from 4f20b26 to d6b61d3 Compare July 3, 2026 14:46
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch 2 times, most recently from 01b71a3 to 00e7850 Compare July 3, 2026 14:58
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from d6b61d3 to 00ab20d Compare July 3, 2026 14:58
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 00e7850 to c30e2d8 Compare July 3, 2026 15:40
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from 00ab20d to 506eea1 Compare July 3, 2026 15:40
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from c30e2d8 to eda7530 Compare July 3, 2026 15:48
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from 0eb9999 to b8bb5e0 Compare July 6, 2026 12:11
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from eda7530 to 6d8070b Compare July 6, 2026 12:11
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch 2 times, most recently from ceb1aee to 4625995 Compare July 6, 2026 13:51
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch 2 times, most recently from 899157c to 0859c68 Compare July 6, 2026 14:49
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch 2 times, most recently from 6beaef1 to 776864e Compare July 6, 2026 15:20
@sswrk
sswrk changed the base branch from szymonswierk/eng-22387-steps-local-action-discovery to graphite-base/3931 July 15, 2026 12:06
@sswrk
sswrk force-pushed the graphite-base/3931 branch from 098fd12 to 6dc8837 Compare July 15, 2026 12:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 7d2587e to 755f3f6 Compare July 15, 2026 12:43
@sswrk
sswrk changed the base branch from graphite-base/3931 to szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time July 15, 2026 12:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from 6dc8837 to c64ad5c Compare July 15, 2026 12:51
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 755f3f6 to 1269383 Compare July 15, 2026 12:51
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from c64ad5c to 63d2c7b Compare July 15, 2026 13:10
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch 2 times, most recently from 1f496dd to 9990fad Compare July 15, 2026 14:02
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch 2 times, most recently from a9a4c3c to 5af9431 Compare July 15, 2026 15:29
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 9990fad to 54399d9 Compare July 15, 2026 15:29
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from 5af9431 to 5153814 Compare July 15, 2026 18:33
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 54399d9 to 0d6c85c Compare July 15, 2026 18:33
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from 5153814 to ea60f40 Compare July 15, 2026 18:44
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 0d6c85c to 1c7419b Compare July 15, 2026 18:44
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from ea60f40 to d1090a4 Compare July 16, 2026 00:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-eas-cli-validate-custom-actions-in-workflow-files branch from 1c7419b to cfd56a8 Compare July 16, 2026 00:43
@sswrk
sswrk force-pushed the szymonswierk/eng-22387-build-tools-load-custom-action-catalog-at-build-time branch from d1090a4 to c8a36de Compare July 16, 2026 10:33
);
}

async function readCompositeFunctionConfigFileAsync(

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.

Should this be shared across worker and eas-cli somehow? I think I saw a very similar function in another PR just now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same reason as here #3930 (comment) I'm open to moving it a layer lower, to steps if you think that makes sense

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

2 participants