Skip to content

[build-tools] read and check the stored signing credentials of an iOS build - #4963

Open
hSATAC wants to merge 1 commit into
ash/eng-29203-native-xcode-detectionfrom
ash/eng-29203-stored-ios-credentials
Open

hSATAC wants to merge 1 commit into
ash/eng-29203-native-xcode-detectionfrom
ash/eng-29203-stored-ios-credentials

Conversation

@hSATAC

@hSATAC hSATAC commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

A build job with builder: xcode carries no certificate and no provisioning profile. The worker must read the credentials that are stored on EAS and check them before it prepares the keychain.

How

  • Add resolveStoredIosBuildCredentialsAsync, which reads the certificate and the profile of each target through GraphQL and returns them in the form that IosCredentialsManager takes.
  • Select the distribution type with eas-cli's non-interactive rule. All targets must use one type.
  • Check each certificate and profile: present, not expired, for the bundle identifier of its target, and of a type that the distribution accepts.
  • Export resolveDistributionType, so the check reads the profile type as the export does.
  • Report every target with a problem in one error that says how to fix it.
  • Keep the text of a network error out of the error of a failed read: urql puts the body of a response that it cannot parse into that text, and this response holds the certificate. The error holds the code and the HTTP status.

Test Plan

Added unit coverage for the two GraphQL reads, the rules, and the function. The GraphQL read against www ran in the local end-to-end runs of 2026-11-30. Not run yet: a build with an enterprise profile.

@linear-code

linear-code Bot commented Nov 25, 2026

Copy link
Copy Markdown

ENG-29203

@hSATAC
hSATAC added this pull request to stack #4964 November 25, 2026 08:19
@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.37838% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.14%. Comparing base (ee39c2b) to head (1ee71e6).

Files with missing lines Patch % Lines
...ps/utils/ios/credentials/storedCredentialsRules.ts 98.22% 2 Missing ⚠️
.../utils/ios/credentials/storedCredentialsQueries.ts 97.88% 1 Missing ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           ash/eng-29203-native-xcode-detection    #4963      +/-   ##
========================================================================
+ Coverage                                 78.06%   78.14%   +0.08%     
========================================================================
  Files                                      1154     1159       +5     
  Lines                                     59098    59275     +177     
  Branches                                  13147    13189      +42     
========================================================================
+ Hits                                      46130    46315     +185     
+ Misses                                    12848    12840       -8     
  Partials                                    120      120              

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

@hSATAC
hSATAC force-pushed the ash/eng-29203-stored-ios-credentials branch 2 times, most recently from 03e0cfb to 8b5e9e4 Compare November 26, 2026 06:37
@hSATAC
hSATAC marked this pull request as ready for review November 26, 2026 07:38
@hSATAC
hSATAC force-pushed the ash/eng-29203-stored-ios-credentials branch 2 times, most recently from 8701ccc to 704a0f6 Compare December 1, 2026 08:31
@hSATAC
hSATAC requested review from gwdp and sswrk December 1, 2026 08:45
@hSATAC
hSATAC force-pushed the ash/eng-29203-stored-ios-credentials branch from 704a0f6 to 1ee71e6 Compare December 1, 2026 08:45
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

@sswrk sswrk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After going through your "Build job for native apps" Notion doc, I understand that the duplication between this PR and eas-cli's build:internal is by design.

This makes sense, it would be interesting to see about making non-native workflow builds also depend on this and not on eas-cli's build:internal as a follow up (cc @AHGIJMKLKKZNPJKQR this PR might be interesting for you as you're looking into how workflow builds depend on eas-cli)

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