-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): Source @expo/env
dotenv vars for worker deployments
#2545
Conversation
Size Change: +75.9 kB (+0.14%) Total Size: 52.9 MB
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, shouldn't we actually use server-side defined env vars for deployments? Why or why not? What is our approach here?
I believe that using @expo/env with EAS is one of the most commonly flagged pain points of EAS Update users. What I mean here is that you usually keep your local dev env vars in .env.local
, but when you trigger a prod update they will unknowingly be used with the highest priority for you in your prod update bundle, so you need to be very careful when using EAS Update.
By using @expo/env for worker deployments we might introduce the same confusion here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested locally, the env vars from .env
are available in api routes ✔️
@kadikraman @kitten |
7d62955
to
9c82487
Compare
✅ Thank you for adding the changelog entry! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2545 +/- ##
==========================================
- Coverage 52.34% 52.34% -0.00%
==========================================
Files 554 554
Lines 20885 20889 +4
Branches 4274 4274
==========================================
+ Hits 10931 10933 +2
- Misses 9097 9099 +2
Partials 857 857 ☔ View full report in Codecov by Sentry. |
Why
Deployments should allow environment variables to be added to them.
How
Source environment variables using
@expo/env
, add them to the manifest, and send them to the deployment API to upload environment variables for deployments.Test Plan