liprec / vsts-release-aas

Repository for my Analysis Service Azure pipelines tasks related to Azure Analysis Service or Power BI Premium
Other
27 stars 28 forks source link

Database credentials incorrect #70

Closed rkoumans closed 2 years ago

rkoumans commented 2 years ago

It seems that after the last update there is something wrong with updating the connection credentials. We use the option 'Azure SQL (single connection)'. The connectionstring isn't updated with the credentials proviced in the release pipeline. Instead of this the original credentials are deployed.

Can you look into this?

Regards, Ralph

liprec commented 2 years ago

Can you run the pipeline with an extra variable System.Debug and set it to true? And what kind of datasource connection is defined in the model.bim?

rkoumans commented 2 years ago

I added the extra variable. What info do you need from the logging? We defined a Azure Synapse database connection (SQL authentication)

liprec commented 2 years ago

Can you share the logs? You can alter server urls, usernames and so. Main reason is to see which code path is triggered.

rkoumans commented 2 years ago

Release_log.txt

liprec commented 2 years ago

Looks like your model definition doesn't have a name property (or it is an empty string) for your (first) datasource. The new version (due to the support for multiple datasources) searches for the datasource by name and cannot find the datasource (Applying datasouce credentials for ''). Can you validate if the name property exist in your bim file?

"dataSources": [
      {
        "type": "structured",
        "name": "WideWorldImporters",
...
rkoumans commented 2 years ago

The name property exists. See code below

"dataSources": [
  {
    "type": "structured",
    "name": "AzureSynapse",
    "connectionDetails": {
      "protocol": "tds",
      "address": {
        "server": "xxxxxxx.database.windows.net",
        "database": "xxxxxxx"
      },
      "authentication": null,
      "query": null
    },
    "credential": {
      "AuthenticationKind": "UsernamePassword",
      "kind": "SQL",
      "path": "xxxxxxx.database.windows.net;xxxxxxx",
      "Username": "xxxxxxx",
      "EncryptConnection": true
    }
  }
liprec commented 2 years ago

My bad, just realized that there is something going wrong with the default of the new dataSources option: it is not empty and used to replace the datasource credentials. Will provide a fix for this anytime soon.

What you can do for now is to migrate to the new 'Advanced' option and use the dataSources option instead of the 'Azure SQL (single connection)' details:

[
  {
    "name": "AzureSynapse",
    "authenticationKind": "UsernamePassword",
    "connectionDetails": {
      "address": {
        "server": "xxxxxxx.database.windows.net",
        "database": "xxxxxxx"
      }
    },
    "credential": {
      "Username": "xxxxxxx",
      'Password": "xxxxx",
    }
  }
]
rkoumans commented 2 years ago

Thanks for the update. We will wait for the fix and update the credentials in AAS ourselves.

liprec commented 2 years ago

The extension had been updated to version 1.5.3 and will be available anytime soon.

rkoumans commented 2 years ago

Just to let you know. The change worked. Thanks for the quick response.