Skip to content

Runtime config changes for multiple database support#1639

Merged
rohkhann merged 54 commits intomainfrom
rohkhann/RuntimeConfigSupportForMultipleDatasources
Aug 31, 2023
Merged

Runtime config changes for multiple database support#1639
rohkhann merged 54 commits intomainfrom
rohkhann/RuntimeConfigSupportForMultipleDatasources

Conversation

@rohkhann
Copy link
Copy Markdown
Contributor

@rohkhann rohkhann commented Aug 18, 2023

Why make this change?

  1. In this pr, RuntimeConfig object is extended to support multiple database scenario. Along with this all the class objects are respectively extended to be able to take multiple database input.
  2. Consequently, there are downstream changes done in the different executors. Currently each executor will use the default datasource to run their queries.
  3. In subsequent pr's through Named dependency injection, the executors will be able to choose which db to act against.
  4. Please see RFC: RFC: Multiple data sources #1638

What is this change?

  • This change is meant to be part of a series of changes that will enable multiple database support on data api builder.
  • This first change ensures compatibility of runtimeconfig with multiple database approach.
  • This change does not unlock any new scenario as of now. (there will be further pr's that will build on this change to fully support multiple database scenario). It just extends runtimeconfig while ensuring that the single datasource scenario works as expected.

How was this tested?

  • Existing integration tests cover all execution paths to test for backword compatibility.
  • Ran dab locally as well to test that it works.
  • Existing unit tests cover all execution paths to test for backword compatibility.

@rohkhann rohkhann changed the title First commit - runtime config changes for multiple database support Runtime config changes for multiple database support Aug 18, 2023
Comment thread src/Config/RuntimeConfigLoader.cs Outdated
Comment thread src/Config/RuntimeConfigLoader.cs Outdated
Comment thread src/Config/RuntimeConfigLoader.cs Outdated
Comment thread src/Config/RuntimeConfigLoader.cs Outdated
@rohkhann rohkhann requested a review from seantleonard August 25, 2023 00:39
Copy link
Copy Markdown
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for driving and implementing this new capability!

Comment thread src/Config/RuntimeConfigLoader.cs
Copy link
Copy Markdown
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testfiles code review remaining.

Comment thread src/Config/RuntimeConfigLoader.cs
Comment thread src/Core/Configurations/RuntimeConfigValidator.cs Outdated
Comment thread src/Core/Resolvers/IQueryEngine.cs
Comment thread src/Core/Resolvers/SqlQueryEngine.cs Outdated
Comment thread src/Core/Resolvers/SqlQueryEngine.cs
Comment thread src/Core/Resolvers/QueryExecutor.cs Outdated
Comment thread src/Core/Resolvers/QueryExecutor.cs Outdated
Comment thread src/Core/Resolvers/MsSqlQueryExecutor.cs Outdated
Comment thread src/Core/Resolvers/PostgreSqlExecutor.cs Outdated
Comment thread src/Core/Configurations/RuntimeConfigProvider.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Core/Resolvers/CosmosClientProvider.cs Outdated
Comment thread src/Core/Resolvers/CosmosClientProvider.cs Outdated
@rohkhann rohkhann requested a review from Aniruddh25 August 30, 2023 05:51
Comment thread src/Config/ObjectModel/RuntimeConfig.cs
Comment thread src/Config/ObjectModel/RuntimeConfig.cs Outdated
Copy link
Copy Markdown
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, and your patience while it took time for us to review! LGTM after last bit of comments are resolved.

@rohkhann rohkhann enabled auto-merge (squash) August 31, 2023 23:08
@rohkhann rohkhann merged commit f8373b8 into main Aug 31, 2023
@rohkhann rohkhann deleted the rohkhann/RuntimeConfigSupportForMultipleDatasources branch August 31, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants