Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
0953622 to
85d5174
Compare
|
Size Change: +977 B (0%) Total Size: 53.4 MB
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2951 +/- ##
==========================================
- Coverage 52.64% 52.61% -0.03%
==========================================
Files 590 590
Lines 23300 23310 +10
Branches 4634 4638 +4
==========================================
- Hits 12265 12263 -2
- Misses 11001 11013 +12
Partials 34 34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
50c1faa to
68a8a3e
Compare
8037cf6 to
0a22f90
Compare
|
Subscribed to pull request
Generated by CodeMention |
wschurman
left a comment
There was a problem hiding this comment.
How does this relate to EAS Environment Variables? (the environment flag in eas update). I was under the assumption that we didn't add the environment flag to eas build since this was specified in the eas json profile and they were automatically loaded. As a point of reference, for doing something similar in the github action we use eas env:exec: https://github.com/expo/expo-github-action/blob/main/src/fingerprintUtils.ts#L72
|
(requesting changes mainly to put back on your queue for discussion of environment variables, not for inline comments) |
|
@wschurman makes sense (i see this pattern in a lot of other eas cli commands too), i updated the command so that it takes the environment arg instead of |
| let env: Env | undefined; | ||
| if (environment) { | ||
| env = environment | ||
| ? { ...(await getServerSideEnvironmentVariablesAsync()), EXPO_NO_DOTENV: '1' } | ||
| : {}; | ||
| } |
There was a problem hiding this comment.
| let env: Env | undefined; | |
| if (environment) { | |
| env = environment | |
| ? { ...(await getServerSideEnvironmentVariablesAsync()), EXPO_NO_DOTENV: '1' } | |
| : {}; | |
| } | |
| const env = environment | |
| ? { ...(await getServerSideEnvironmentVariablesAsync()), EXPO_NO_DOTENV: '1' } | |
| : undefined; |
There was a problem hiding this comment.
Also regarding EXPO_NO_DOTENV, I see this is the behavior for eas update for calling into the expo cli (which I assume fingerprint does under the hood hence why we add it to this call), but is it also the behavior for eas build?
There was a problem hiding this comment.
i passed EXPO_NO_DOTENV because it is also passed to grab the config elsewhere in eas-cli (npx expo config is a shim over expo/config):
eas-cli/packages/eas-cli/src/project/expoConfig.ts
Lines 59 to 72 in 22bc21e
under the hood, the fingerprint library calls into the expo/config library
eas-cli/packages/eas-cli/src/project/expoConfig.ts
Lines 59 to 72 in 22bc21e
Temporary Commit at 3/16/2025, 6:31:01 PM Temporary Commit at 3/16/2025, 6:37:24 PM Temporary Commit at 3/16/2025, 7:59:29 PM Temporary Commit at 3/16/2025, 8:01:21 PM Temporary Commit at 3/18/2025, 2:38:20 PM Temporary Commit at 3/18/2025, 3:21:52 PM
8cd7554 to
bfc296d
Compare

How you can help
This is my current understanding of how a build profile can affect a project's fingerprint. @szdziedzic and @sjchmiela, please let me know if it is correct, or if there are any nuances I am missing!
eas.json, we have a bunch of build profiles which define a bunch of parameters like build machine types, update channels, etc. However, it is the set of environment variables produced (specifying build profile parameter as input) which ultimately affects the fingerprint. Is there any other way a build profile can affect a fingerprint?For example, I can define the TEST env var to differ based on the build profile that is chosen:

Next, I configure my
app.config.jsto determine the bundleIdentifier based on theTESTenv var:Since the fingerprint relies on the app config, I can see the fingerprint is changed when I run
eas fingerprint:generate -p ios --profile productionvseas fingerprint:generate -p ios --profile developmenthereWhy
This PR adds support for build profiles in
eas fingeprint:generateby allowing the user to pass in the--profileflag.How
After a build profile is chosen, the cli takes the generated Env and temporarily sets those env vars while calculating the fingerprint
Tests
eas fingerprint:generate -p ios --profile productionvseas fingerprint:generate -p ios --profile developmenthere