Skip to content

Conversation

@redbugz
Copy link

@redbugz redbugz commented Jun 14, 2019

When deployed REMOTE_ENV config was overriding TARGET_ENV causing
apps to fail to work correctly outside of beta.
The scopes the env var overrides and other work to only happen when setProxies
is called and when in local dev mode, to remove impact on deployed apps

Tested by running locally with frontier-app-react and the proxies still worked fine. Need to confirm when deployed.

2 primary changes:

  • All the logic around setting up the proxies was moved inside the setProxies call so it will not execute except when using the proxies. Previously it would execute when required, which happens even when not in dev mode
  • As an extra measure of protection, TARGET_ENV is now only overridden if it equals local, so we only overwrite that value in local dev mode.
When deployed REMOTE_ENV config was overriding TARGET_ENV causing apps to fail to work correctly outside of beta. The scopes the env var overrides and other work to only happen when setProxies is called and when in local dev mode, to remove impact on deployed apps
@redbugz
Copy link
Author

redbugz commented Jun 14, 2019

The most commonly visible behavior is that auth gets broken in prod because we do not have REMOTE_ENV set in fs-config, so it always defaults to beta, and then overrides TARGET_ENV even when not in dev mode.

@redbugz redbugz merged commit 06729d3 into develop Jun 14, 2019
@redbugz redbugz deleted the remote-env branch June 14, 2019 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants