Skip to content

[eas-cli] Add --refresh-ad-hoc-provisioning-profile for non-interactive builds#3716

Merged
sswrk merged 6 commits into
mainfrom
szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in
May 22, 2026
Merged

[eas-cli] Add --refresh-ad-hoc-provisioning-profile for non-interactive builds#3716
sswrk merged 6 commits into
mainfrom
szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in

Conversation

@sswrk
Copy link
Copy Markdown
Contributor

@sswrk sswrk commented May 12, 2026

Why

When a new device is added to an account, and a non-interactive development build is run (e.g. invoked by CI or by a workflow job), even without the freeze-credentials flag, the provisioning profile is not refreshed, and the internal build is not available for the newly registered device. See the Linear issue: https://linear.app/expo/issue/ENG-7041/allow-including-all-eas-registered-devices-automatically-in-non

How

Added an opt-in ad-hoc provisioning profile refresh to non-interactive builds with flag --refresh-ad-hoc-provisioning-profile.

When the flag is present, we hit www GQL API to get the ASC API key (the submission key), and we invoke the ad-hoc profile sync with all devices selected. packages/eas-cli/src/credentials/ios/actions/SetUpAdhocProvisioningProfile.ts is where this logic happens.

The flag mustn't be present when --freeze-credentials is present, these are conflicting flags.

I'm leaning towards an opt-in flag instead of extending the default behavior because of the extra credentials configuration requirements and side effects of the provisioning profile refresh logic.

Test Plan

Added/amended tests.

Manual verification:

  1. Did easd build --platform ios --profile development --non-interactive --refresh-ad-hoc-credential, verified the provisioning profile matches the set of Apple devices on my account.
  2. Changed the set of Apple devices on my account.
  3. easd build --platform ios --profile development --non-interactive --refresh-ad-hoc-credential again, verified the re-generated provisioning profile matches the Apple devices on my account.

@linear
Copy link
Copy Markdown

linear Bot commented May 12, 2026

ENG-7041

Copy link
Copy Markdown
Contributor Author

sswrk commented May 12, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch 2 times, most recently from 5896f86 to 6a7e606 Compare May 12, 2026 19:20
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.88%. Comparing base (fa6c877) to head (588f136).

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/build/index.ts 0.00% 2 Missing and 3 partials ⚠️
...eas-cli/src/credentials/ios/actions/DeviceUtils.ts 82.36% 3 Missing ⚠️
...tials/ios/actions/SetUpAdhocProvisioningProfile.ts 91.90% 3 Missing ⚠️
packages/eas-cli/src/build/createContext.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3716      +/-   ##
==========================================
+ Coverage   56.80%   56.88%   +0.09%     
==========================================
  Files         904      904              
  Lines       39112    39177      +65     
  Branches     8173     8202      +29     
==========================================
+ Hits        22214    22283      +69     
+ Misses      15428    15422       -6     
- Partials     1470     1472       +2     

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

@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch from 6a7e606 to 3ace75d Compare May 12, 2026 19:36
@sswrk sswrk changed the title [eas-cli] Add --refresh-ad-hoc-provisioning-profile for non-interactive builds [eas-cli] Add --refresh-ad-hoc-provisioning-profile for non-interactive builds May 12, 2026
@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch 2 times, most recently from cf3043f to b9c092e Compare May 12, 2026 19:56
@sswrk sswrk marked this pull request as ready for review May 12, 2026 20:36
@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder
packages/eas-cli/src/commands/build/** @sjchmiela
packages/eas-cli/src/build/** @sjchmiela

Generated by CodeMention

@sswrk sswrk requested review from quinlanj and sjchmiela May 12, 2026 20:37
@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch from b9c092e to 98ce5be Compare May 18, 2026 13:03
Copy link
Copy Markdown
Contributor

@sjchmiela sjchmiela left a comment

Choose a reason for hiding this comment

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

this looks good to me, but i'd also wait for Quin to take a look

Comment thread packages/eas-cli/src/credentials/ios/actions/SetUpAdhocProvisioningProfile.ts Outdated
Copy link
Copy Markdown
Member

@quinlanj quinlanj left a comment

Choose a reason for hiding this comment

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

requesting changes because we should filter devices based on the target type

Comment thread packages/eas-cli/src/credentials/ios/actions/SetUpAdhocProvisioningProfile.ts Outdated
@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch 2 times, most recently from 701b7d7 to 4c939d9 Compare May 20, 2026 11:57
@sswrk sswrk requested a review from quinlanj May 20, 2026 12:53
@sswrk sswrk force-pushed the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch from d20291d to d4b4bf6 Compare May 21, 2026 11:37
@github-actions
Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@sswrk sswrk merged commit fce2a77 into main May 22, 2026
11 checks passed
@sswrk sswrk deleted the szymonswierk/eng-7041-allow-including-all-eas-registered-devices-automatically-in branch May 22, 2026 08:41
sswrk added a commit that referenced this pull request May 25, 2026
<!-- If this PR requires a changelog entry, add it by commenting the PR with the command `/changelog-entry [breaking-change|new-feature|bug-fix|chore] [message]`. -->
<!-- You can skip the changelog check by labeling the PR with "no changelog". -->

# Why

ENG-21094 needs a job field to carry ad-hoc provisioning profile refresh intent for git-based/workflow builds; #3716 added CLI behavior on eas build; this PR is schema-only.

# How

Updated `packages/eas-build-job/src/ios.ts` interface + Joi schema.

# Test Plan

`cd packages/eas-build-job && yarn test src/__tests__/ios.test.ts`
`yarn typecheck`
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.

3 participants