Skip to content

Adding application Name for mssql connections#1620

Merged
abhishekkumams merged 27 commits intomainfrom
dev/abhishekkuma/add_app_name_to_mssql
Aug 17, 2023
Merged

Adding application Name for mssql connections#1620
abhishekkumams merged 27 commits intomainfrom
dev/abhishekkuma/add_app_name_to_mssql

Conversation

@abhishekkumams
Copy link
Copy Markdown
Contributor

@abhishekkumams abhishekkumams commented Aug 2, 2023

Why make this change?

What is this change?

  • Checking if Application Name is already present in the MsSql connection stirng
    • if yes, we append DAB APP NAME with ',' as seperator
    • else, we add a Application Name property to connection string.
  • Parsing happens only once, and the runtimeConfig object is updated with the connectionString with Application name.
  • So, subsequent calls do not do manipulation on conn_string.

How was this tested?

  • Kusto Queries
  • Unit Tests

Sample Request(s)

  • Application Name for Dab will be appended while connecting to Azure SQL DB for telemetry.
  • if Application Name is specified by the developer then DAB will append to it,
  • else will add Application Name property

Below are the Kusto Logs
image

image

@abhishekkumams abhishekkumams added the enhancement New feature or request label Aug 3, 2023
@abhishekkumams abhishekkumams added this to the 0.9rc milestone Aug 3, 2023
@abhishekkumams abhishekkumams marked this pull request as ready for review August 3, 2023 18:27
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 these changes, few questions..

Comment thread src/Config/RuntimeConfigLoader.cs Outdated
Comment thread src/Config/RuntimeConfigLoader.cs
Comment thread src/Config/RuntimeConfigLoader.cs Outdated
Comment thread src/Config/Azure.DataApiBuilder.Config.csproj
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Config/RuntimeConfigLoader.cs
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Config/RuntimeConfigLoader.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.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.

A check on Connstring builder, otherwise lgtm

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.

some nits and questions.

Comment thread src/Product/ProductInfo.cs
Comment thread src/Product/ProductInfo.cs
Comment thread src/Product/ProductInfo.cs
Comment thread src/Config/RuntimeConfigLoader.cs Outdated
Comment thread src/Config/RuntimeConfigLoader.cs
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs
Comment thread src/Cli.Tests/EndToEndTests.cs
Comment thread src/Config/ObjectModel/DataSource.cs Outdated
@abhishekkumams abhishekkumams merged commit 927fd21 into main Aug 17, 2023
@abhishekkumams abhishekkumams deleted the dev/abhishekkuma/add_app_name_to_mssql branch August 17, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Identify how DAB is hosted for connections to MSSQL

3 participants