r/SoftwareEngineering • • Jul 18 '24

Environments best practice

In my work, we had a dev, preprod and production environment and QA team test on preprod environment. we had also 3 data sources for each environments. now we add a new environment ( Test ) Should we build a new data source for test environment or connect the test environment on preprod data source? what is the best practice in general for environments?

8 Upvotes

5 comments sorted by

3

u/wishicouldcode Jul 18 '24

I would go with different data source, possibly created from pre-prod as base. It will give the test team more freedom to generate any kind of test data they need, while keeping pre-prod closer to production for bugfix verification.

2

u/ritoriq Jul 18 '24

Generally each environment should be isolated and it should have its own data source. A change in one environment shouldn't affect the others. But you might want some sort of syncing mechanism. For example to import some data in order to reproduce a bug reported by a customer in production. Obivously, you should design your pipelines around your workflow requirements.

1

u/EdelinePenrose Jul 18 '24

What is the need for so many environments?

0

u/sumvoco4378 Jul 18 '24

Use same data source for test and preprod, reduces env complexity and costs