[eas-cli] Use an isolated env for local builds - #4244
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## @ramonclaudio/dvt-119-eas-cli-env-mode #4244 +/- ##
==========================================================================
+ Coverage 63.90% 63.91% +0.01%
==========================================================================
Files 1033 1033
Lines 47555 47566 +11
Branches 10002 10004 +2
==========================================================================
+ Hits 30384 30395 +11
+ Misses 17070 17069 -1
- Partials 101 102 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
| }; | ||
| process.on('SIGINT', interruptHandler); | ||
| try { | ||
| const processEnv = getEnvWithoutInheritedDotenvValues(process.env); |
There was a problem hiding this comment.
EXPO_UNSAFE_DOTENV_KEYS and this utility is something I'm not familiar with 🤔 maybe @sjchmiela or @szdziedzic can evaluate this better. I believe, this may be similar to a utility for original-env we have in @expo/env, so not sure if we need to reconsolidate?
There was a problem hiding this comment.
Revisiting this; assuming we're keeping parity here with EAS Build, is there any way we could just not inherit any env vars and issue a major bump? It might be easier to build up parity than it is to try to pass through filtered process.env vars, and treat the spawned sub-process as "isolated"
There was a problem hiding this comment.
Yea, that makes sense! I tested local ios and android builds with the runtime var list I added, but can we confirm these are all the vars we want to keep in the isolated env?
743749d to
b0bb4d2
Compare
30b16eb to
41cf11b
Compare
|
✅ Thank you for adding the changelog entry! |
Stacked on #4229.
Why
eas build --localpasses every var from the shell to the local-build plugin, which can make local builds behave differently from EAS Build.How
I updated the local-build plugin process to start with an isolated env, then added the EAS env, local runtime vars, and the local build settings it needs.
Test Plan
Tests, package checks, and local Android and iOS builds pass.