Skip to content

Remove local project generation from go command#3514

Open
tchayen wants to merge 2 commits intomainfrom
go-no-local-project
Open

Remove local project generation from go command#3514
tchayen wants to merge 2 commits intomainfrom
go-no-local-project

Conversation

@tchayen
Copy link
Member

@tchayen tchayen commented Mar 17, 2026

Why

The go command creates a full local project in /tmp (writes app.json, eas.json, package.json, runs npm install, git init, git commit) solely to satisfy the credentials setup and produce files for the workflow upload. This is unnecessary overhead — credentials operate entirely through remote APIs and the workflow can generate its own project.

This is a step toward having the workflow create its own project server-side, removing the dependency on user-uploaded project files.

How

  • In-memory ExpoConfig: Construct the exp object directly instead of writing app.json to disk and reading it back with getPrivateExpoConfigAsync
  • No-op VcsClient: Pass NoVcsClient to CredentialsContext since none of the iOS credential actions (SetUpBuildCredentials, SetUpAscApiKey, SetUpPushKey) use it
  • No npm install / git init: The workflow doesn't need node_modules or a git repo
  • Direct tarball creation: Use tar.create() on a minimal temp directory instead of going through VCS-based uploadAccountScopedProjectSourceAsync
  • No process.chdir(): Removed the process.chdir(projectDir) / restore pattern entirely
  • Removed saveProjectIdToAppConfigAsync: Project ID is kept in-memory, no need to write it to disk
  • Minimal upload files: Only creates temp files (eas.json with ascAppId, package.json, app.json) right before upload, then cleans up immediately

Test Plan

  • Verify yarn tsc --noEmit passes for go.ts (confirmed: no type errors)
  • Verify yarn lint passes (confirmed: no lint issues)
  • Manual test: run eas go and verify credentials setup + workflow trigger still work

The `go` command previously created a full local project in /tmp
(app.json, eas.json, package.json, npm install, git init) to satisfy
credentials setup and workflow upload. This was unnecessary because:

- Credential setup (SetUpBuildCredentials, SetUpAscApiKey, SetUpPushKey)
  operates entirely through GraphQL/Apple APIs and never reads from disk
- CredentialsContext only needs an in-memory ExpoConfig and projectId
- The workflow can generate its own project independently

Now the command:
- Constructs ExpoConfig in-memory instead of writing/reading app.json
- Passes a no-op VcsClient since credential actions don't use it
- No longer runs npm install or git init
- Creates minimal temp files only for the workflow upload tarball
- No longer changes process.cwd() or preserves/cleans up project dirs
@github-actions
Copy link

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

@tchayen tchayen added the no changelog PR that doesn't require a changelog entry label Mar 17, 2026
SetUpBuildCredentials can trigger interactive prompts (e.g. certificate
revocation selection when Apple's cert limit is hit). Wrapping it in
withSuppressedOutputAsync hid these prompts, causing an invisible prompt
that led to an infinite retry loop.
@github-actions
Copy link

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 10.71429% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.65%. Comparing base (d5a3fc0) to head (822b703).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/go.ts 10.72% 50 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3514      +/-   ##
==========================================
+ Coverage   53.56%   53.65%   +0.09%     
==========================================
  Files         815      815              
  Lines       34566    34616      +50     
  Branches     7175     7193      +18     
==========================================
+ Hits        18513    18570      +57     
+ Misses      15971    15965       -6     
+ Partials       82       81       -1     

☔ View full report in Codecov by Sentry.
📢 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

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant