We have three environments that can be used for testing:

  • Local dev environment, running all containers via Docker Desktop with a docker compose file
  • Proxy dev environment, run the service we are actively using locally, and all requests to other services are proxied to production.
  • Production environment, which is live to all our retailers.

There are some cases where there’s a gap between proxy dev environment and production environment, and the feature cannot be tested unless deployed in production. I was lucky enough to have one of these: I am implementing an origin validation security feature to ensure the message events come from the legitimate payment provider. However, the integrated payment provider is only happy to work with our production domain.

After working with our QA engineer, the solution is: use a feature flag in front of the feature!

Feature flags help decouple deployment from release letting you manage the full lifecycle of a feature.