Azure / arm-template-whatif

A repository to track issues related to what-if noise suppression
MIT License
85 stars 12 forks source link

Microsoft.Sql/servers/databases SKU #178

Open danbrad opened 3 years ago

danbrad commented 3 years ago

Describe the noise

Resource type

Microsoft.Sql/servers/databases

apiVersion

2020-08-01-preview

Client (PowerShell, Azure CLI, or API)

Bicep

Relevant ARM Template code

resource sqlDB 'Microsoft.Sql/servers/databases@2020-08-01-preview' = {
  location: 'uksouth'
  tags: {}
  name: 'sqlservername/sqldbname'
  properties: {
    collation: 'Latin1_General_CI_AI'
    maxSizeBytes: 268435456000
    zoneRedundant: false
    readScale: 'Disabled'
    storageAccountType: 'GRS'
    maintenanceConfigurationId: '/subscriptions/xxxxxxxxxxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_UKSouth_DB_2'
  }
  sku: {
    name: 'S2'
    tier: 'Standard'
  }
}

Expected response

I expected no noise since the template has not been modified since the resources were deployed)

Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text)

  ~ Microsoft.Sql/servers/sqlservername/databases/sqldbname [2020-08-01-preview]
    ~ sku.name: "Standard" => "S2"
simonech commented 2 years ago

Indeed, I have the same problem with Azure CLI. It always shows as if I'm changing SKU while I'm not

jikuja commented 2 years ago

Same with other tiers:

Scope: /subscriptions/8a4fb900-f5b3-4645-a52b-7faf38f07f51/resourceGroups/sqltest-rg

  ~ Microsoft.Sql/servers/xyz-test-sqlserver/databases/my-sql [2020-11-01-preview]
    - sku.family: "Gen5"
    ~ sku.name:   "GP_S_Gen5" => "GP_S_Gen5_2"

5 months without triage?

alex-frankel commented 2 years ago

The reason we have stopped triaging is because there is now a pipeline for detecting REST API spec violations for resolving the issue that is handled by a separate team.

w.r.t. this specific case, it looks like there are two things happening:

The sku.name sku is being normalized. You should be able to safely replace "S2" with "Standard" and replace "GP_S_Gen5_2" with "GP_S_Gen5" in the template. I'd be curious why this is being normalized, but that is a question for the SQL team. I will send them this issue and see if they can add context.

The sku.family property is a default value. You can add that property to your template to remove the noise, but it should be fixed in their API spec.

jikuja commented 2 years ago

Using sku.family: 'Gen5' + name: 'GP_S_Gen5' or name: 'GP_S_Gen5' alone without family property did not work:

Looks like this needs some attention from the product team to be fixed.

@alex-frankel Can you forward findings to the correct team(s)?