[eas-cli] migrate off deprecated Build.project and BuildMutation.cancel#3908
Draft
tomek-agent wants to merge 1 commit into
Draft
[eas-cli] migrate off deprecated Build.project and BuildMutation.cancel#3908tomek-agent wants to merge 1 commit into
tomek-agent wants to merge 1 commit into
Conversation
Author
|
/changelog-entry chore migrate off deprecated GraphQL fields Build.project (use app) and BuildMutation.cancel (use cancelBuild) |
|
❌ It looks like a changelog entry is missing for this PR. Add it manually to CHANGELOG.md. |
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
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
The deprecated-GraphQL-field usage dashboard shows eas-cli is the top reader of several
@deprecatedoutput fields.Build.projectalone accounts for ~394k resolver hits andBuildMutation.cancelfor 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
BuildFragmentselectsappinstead ofproject. On the serverproject: Project!andapp: App!resolve through the samegetAppAsync(), so this is a 1:1 swap. Becauseappis always anApp, theProjectunion branch ingetBuildLogsUrlcollapses to the account/slug path.build cancelcommand uses thecancelBuild(buildId:)mutation instead of the deprecatedbuild(buildId:).cancel.generated.tswas 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 theruntime/updateChannelobjects don't, so switching would return null for older builds. Unblocking them needs a small server change to add the same fallback.Update.runtimeVersionis safe but threads through the update-formatting types (FormatUpdateParameter,UpdateToRepublish,RolloutUpdate); it belongs in its own PR.Account.usershas 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 → appswap is behavior-preserving: both fields share the server resolver andappis non-null, so the log-URL, internal-distribution-URL, and run-cache-path consumers receive the same values. CI passes.