Azure / Azure/azure-rest-api-specs
Web: update a static site from `Standard` sku to `Free` sku with `PUT` dones't correctly clean up the identity
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
Given that I have a `Standard` sku static site (both `name` and `tier`), which is configured with `SystemAssigned, UserAssigned` identity. Then I send a `PUT` to this same static site with following request payload:
```json
{
"location": "eastus2",
"properties": {},
"sku": {
"name": "Free",
"tier": "Free"
},
"tags": {
"environment": "acceptance"
}
}
```
Note that the identiy block is not specified. The API returns:
```json
{
"Code": "BadRequest",
"Message": "Sku is invalid. Free SKU is invalid. Managed service identities are not allowed in this SKU.",
"Target": null,
"Details": [
{
"Message": "Sku is invalid. Free SKU is invalid. Managed service identities are not allowed in this SKU."
},
{
"Code": "BadRequest"
},
{
"ErrorEntity": {
"ExtendedCode": "51021",
"MessageTemplate": "{0} is invalid. {1}",
"Parameters": [
"Sku",
"Free SKU is invalid. Managed service identities are not allowed in this SKU."
],
"Code": "BadRequest",
"Message": "Sku is invalid. Free SKU is invalid. Managed service identities are not allowed in this SKU."
}
}
],
"Innererror": null
}
```
The expected behavior is that the static site is updated to the `Free` sku, and no `identity` is configured for it (instead of keeping what is configured before), in turns of the semantic of `PUT`.
Contributor guide
Research direction
No files or tests are named. Start by locating the Static Web Apps API PUT handling and the validation for SKU and managed identities; reproduce the Standard-to-Free update with the payload shown. Done means the site changes to the Free SKU and the omitted identity is removed rather than causing a validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100