Generate env files from EJSON with local overrides - #580
Draft
kieran-osgood-shopify wants to merge 3 commits into
Draft
Generate env files from EJSON with local overrides#580kieran-osgood-shopify wants to merge 3 commits into
kieran-osgood-shopify wants to merge 3 commits into
Conversation
11 tasks
Contributor
Author
This was referenced Aug 5, 2026
kieran-osgood-shopify
force-pushed
the
kieran-osgood/env-local-overlay
branch
from
August 5, 2026 11:06
a2ee887 to
a02421c
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
2 times, most recently
from
August 5, 2026 11:35
1aa2ce8 to
25fe0a4
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/env-local-overlay
branch
2 times, most recently
from
August 5, 2026 11:45
131eb0a to
eba4266
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 5, 2026 11:45
25fe0a4 to
acf432e
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/env-local-overlay
branch
from
August 5, 2026 12:33
eba4266 to
e94d61b
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
4 times, most recently
from
August 7, 2026 11:05
9cddd46 to
16e70ad
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/env-local-overlay
branch
2 times, most recently
from
August 7, 2026 11:27
6c4b15a to
6d1b182
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 7, 2026 11:28
16e70ad to
70b94be
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/env-local-overlay
branch
from
August 7, 2026 13:51
6d1b182 to
f69378a
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
2 times, most recently
from
August 7, 2026 14:15
9bf0306 to
d4951e0
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/env-local-overlay
branch
from
August 7, 2026 15:41
508a790 to
ab0ce29
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 7, 2026 15:41
d4951e0 to
0041792
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/env-local-overlay
branch
from
August 10, 2026 09:08
ab0ce29 to
4f132b4
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 10, 2026 09:08
0041792 to
191de7a
Compare
This was referenced Aug 14, 2026
kieran-osgood-shopify
force-pushed
the
kieran-osgood/e2e-checkout-guest
branch
from
August 14, 2026 15:09
6ffb33e to
df7a799
Compare
| @@ -0,0 +1,38 @@ | |||
| appId: ${E2E_APP_ID} | |||
Contributor
Author
There was a problem hiding this comment.
Looks like a restack gone wrong as all these shouldn't be part of this stack - this looks like the work from #562 which got closed
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 14, 2026 16:24
329ae4f to
f0bbb0f
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/e2e-checkout-guest
branch
from
August 17, 2026 12:51
df7a799 to
81de4d9
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
2 times, most recently
from
August 17, 2026 13:13
854b848 to
9039d2b
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/e2e-checkout-guest
branch
2 times, most recently
from
August 18, 2026 09:27
7238234 to
111f3ea
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 18, 2026 09:27
9039d2b to
0cfc1a6
Compare
kieran-osgood-shopify
force-pushed
the
kieran-osgood/e2e-checkout-guest
branch
2 times, most recently
from
August 18, 2026 10:25
ee190fc to
4d3d211
Compare
kieran-osgood-shopify
changed the base branch from
kieran-osgood/e2e-checkout-guest
to
graphite-base/580
August 19, 2026 10:51
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 20, 2026 18:09
0cfc1a6 to
cfd107d
Compare
kieran-osgood-shopify
force-pushed
the
graphite-base/580
branch
from
August 20, 2026 18:09
4d3d211 to
816fba7
Compare
setup_storefront_env took the first match for a duplicated key while run_maestro took the last. Last-wins is the predictable rule: in a file kept by hand, the last uncommented assignment is the active one. .env.local now overrides .env per key. Nothing writes to .env.local, so it survives every sync and gives a developer a place to point the sample apps at their own store. Write decisions about .env deliberately ignore the overlay. Resolved values carry overrides, so writing them back would make an override permanent. While .env.local exists, .env is left alone and the reason is reported. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 21, 2026 10:59
cfd107d to
e017ab2
Compare
scripts/generate_env_files decrypts config/secrets/*.ejson into .env and e2e/.env, so setup_storefront_env becomes read-only towards .env. A developer who keeps their own store in .env.local now keeps it: nothing overwrites the file that a sync used to rewrite. The two optional prompt flags go away with the writing. CI callers already supply their values through the process environment, so they only needed the flag to suppress a prompt that no longer exists. scripts/migrate_env_to_local preserves a hand-written .env as .env.local on the first `dev up` after this change. STOREFRONT_MERCHANT_IDENTIFIER leaves the shared storefront config: it belongs beside each sample app's own Apple Pay entitlement. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Assisted-By: devx/252dfd24-6c25-4bb4-8463-27702ec564eb
kieran-osgood-shopify
force-pushed
the
kieran-osgood/ejson-generate-env-files
branch
from
August 21, 2026 11:17
e017ab2 to
1c51847
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stack Context
This PR is two phased with #582 to achieve: Local and E2E runs will now always run the same configs - no drift.
#580 generate
.envfrom .ejson#582 generate
e2e/.envfrom ejson, use thee2e/.envin Bitrise, meaning we can delete all the secrets in the bitrise UI as they're sourced from ejson now, and developers can have the exact config of bitrise locallyWhy?
Relying on sharing 1password files around was slow and prone to drift
We had no solution for running the same config as CI locally
The encrypted files provide one reviewable source for shared configuration
.env.localkeeps personal overrides persistent acrossdev upruns.The generator remains separate from
setup_storefront_env, so public contributors do not need EJSON access and their hand-written.envremains untouched.What?
.envande2e/.envare now generated from committed encrypted EJSON files duringdev upscripts/setup_storefront_envread-only toward.env..env.localas an override on top of the.env(last key wins).envby migrating it to.env.local**For outside contributors the workflow remains the same, copy
.env.exampleto.env, fill it in, and run the samplesAlso noticed there was some
--skip-optional-promptsthat are stale/were removed recently so did some clean upHow to test
run:
dev upYou should now see the following changes:
your existing
.envwill be copied to.env.local.envhas been generated from the storedconfig/secrets/demo.ejsone2e/.envgenerated fromconfig/secrets/e2e.ejsonCompare the
.envand.env.local- consider whether you need the .local overrides and remove unnecessary overrides to receive same config as the rest of the team