microsoft / Analysis-Services

Git repo for Analysis Services samples and community projects
MIT License
608 stars 417 forks source link

Bug: The Skip option in the Data Source still requests credential update #244

Closed JonatanTorres closed 10 months ago

JonatanTorres commented 10 months ago

Hello,

Using ALM with Azure Analysis Services, there's the Data Source type.

I have DEV and PRD environments.

When deploying to DEV, the Data Source doesn't change (Status = Same Definition), and the deployment occurs directly without needing to redo credentials.

However, when deploying in the PRD environment, where the Data Source is different (Status = Different Definitions), upon changing the Action to Skip, the ALM Toolkit asks me to redo the credentials, requiring me to re-enter the username and password.

The ALM correctly doesn't overwrite the server address but does redo the credentials. I've tested by entering any credentials, and indeed, it overwrites them, so there's a bug in the Skip Action when the Type Data Source Status is "Different Definitions".

The desired behavior would be not to request new credentials, just as it happens when the Status is "Same Definition".

Thank you a lot!

christianwade commented 10 months ago

Hi, can you please run a test as follows?

  1. Instead of applying the change on production (with skip data source), script it out using the Generate Script toolbar button
  2. Execute the script from SSMS and check if resetting credentials is necessary (e.g. perform a refresh for that data source)

It may need to reset creds anyway even without changes to the data source in order to succeed. IIRC, that's a security thing in AS for metadata transactions.

JonatanTorres commented 10 months ago

Hello, Christian! Thank you very much for the quick response.

I did the test you asked for and SSMS did not request credentials. However, it cleared the credential, so when updating the source, it gives an error and I needed to manually redo the credential. So through the ALM Toolkit (Update button) it’s even safer, since it asks me to redo the credential on the spot.

So, I analyzed the XMLA and noticed that it always writes the Data Source, regardless of being set as Skip.

I tried to delete manually and, when executing the Script, the Data Source is deleted, so you are correct: The XMLA apparently requires that the connection be redone even when nothing has been changed.

Therefore, the behavior of the ALM Toolkit is perfect. Much better than SSMS itself, since ALM asks me to redo the credential instead of waiting for an error hehehe

Can I close the Issue?

THANK YOU very much for the support!

christianwade commented 10 months ago

Sounds good. It's great to know you're unblocked!