Skip to content

[eas-cli] migrate off deprecated Build.project and BuildMutation.cancel#3908

Draft
tomek-agent wants to merge 1 commit into
mainfrom
tuft/1782520669.581029/eas-cli-27cc7e1f
Draft

[eas-cli] migrate off deprecated Build.project and BuildMutation.cancel#3908
tomek-agent wants to merge 1 commit into
mainfrom
tuft/1782520669.581029/eas-cli-27cc7e1f

Conversation

@tomek-agent

Copy link
Copy Markdown

Why

The deprecated-GraphQL-field usage dashboard shows eas-cli is the top reader of several @deprecated output fields. Build.project alone accounts for ~394k resolver hits and BuildMutation.cancel for the cancel path. Both have drop-in replacements with identical server behavior, so moving off them removes the largest safely-removable slice of eas-cli's deprecated-field traffic.

How

  • BuildFragment selects app instead of project. On the server project: Project! and app: App! resolve through the same getAppAsync(), so this is a 1:1 swap. Because app is always an App, the Project union branch in getBuildLogsUrl collapses to the account/slug path.
  • The build cancel command uses the cancelBuild(buildId:) mutation instead of the deprecated build(buildId:).cancel.
  • generated.ts was regenerated against the committed schema so the diff is limited to these two documents (no unrelated schema refresh).

Intentionally left out:

  • Build.runtimeVersion / Build.channel (the two next-biggest) are not safe to move yet: the deprecated string resolvers fall back to build metadata (runtime?.version ?? metadata.runtimeVersion) that the runtime / updateChannel objects don't, so switching would return null for older builds. Unblocking them needs a small server change to add the same fallback.
  • Update.runtimeVersion is safe but threads through the update-formatting types (FormatUpdateParameter, UpdateToRepublish, RolloutUpdate); it belongs in its own PR.
  • Account.users has no replacement ("No longer supported").

Test Plan

Regenerated GraphQL types, built eas-cli, and ran the affected unit suites (build cancel, build delete, workflow logs) — all green. The project → app swap is behavior-preserving: both fields share the server resolver and app is non-null, so the log-URL, internal-distribution-URL, and run-cache-path consumers receive the same values. CI passes.

@tomek-agent

Copy link
Copy Markdown
Author

/changelog-entry chore migrate off deprecated GraphQL fields Build.project (use app) and BuildMutation.cancel (use cancelBuild)

@github-actions

Copy link
Copy Markdown

❌ It looks like a changelog entry is missing for this PR. Add it manually to CHANGELOG.md.
⏩ If this PR doesn't require a changelog entry, such as if it's an internal change that doesn't affect the user experience, you can add the "no changelog" label to the PR.

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.05%. Comparing base (efc78f4) to head (bc21a22).

Files with missing lines Patch % Lines
packages/eas-cli/src/build/utils/url.ts 0.00% 3 Missing ⚠️
packages/eas-cli/src/build/runBuildAndSubmit.ts 0.00% 1 Missing ⚠️
packages/eas-cli/src/commands/build/cancel.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3908      +/-   ##
==========================================
+ Coverage   59.05%   59.05%   +0.01%     
==========================================
  Files         935      935              
  Lines       40959    40957       -2     
  Branches     8630     8628       -2     
==========================================
  Hits        24185    24185              
+ Misses      16678    16676       -2     
  Partials       96       96              

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

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