Closed rohkhann closed 1 month ago
/azp run
Ran an integration test with two config files and an environment variable in the child file.
can this be added as integration test?
Ran an integration test with two config files and an environment variable in the child file.
can this be added as integration test?
Maybe bit tricky as we dont have any test structure in the pipelines right now that can take 2 config files. Given dab's ga deadline and we want this fix to go in, maybe better to invest in that testing all up for multi-db post GA.
/azp run
PR description needs more details.
dab-config.json
and child dab-child-config.json
? (perhaps these files are already in the test project, perhaps just sample dab start
command? Need to open issue to track adding a test: here are some notes for whoever picks it up:
ConfigurationTests.cs
class:
child-conf-connstring
and put a valuepublic RuntimeConfig(string? Schema, DataSource DataSource, RuntimeEntities Entities, RuntimeOptions? Runtime = null, DataSourceFiles? DataSourceFiles = null)
/azp run
Why make this change?
When we are loading child config files, we were not setting replace env variable to true and hence child config environment variables were not being obeyed. This meant that when users were using @env('variable') instead of searching for the environment variable, the code took @env('vairable') as the literal string. This fix ensures that environment variables can be used for multi-db scenario. You need to add in parent config a data-source-files referencing a child config with connection string referencing a env variable:
What is this change?
Adding true to runtimeconfig file.
How was this tested?
Ran an integration test with two config files and an environment variable in the child file.