Azure / Azure/azure-rest-api-specs
`machinelearningservice/registry`: `Registries_Update` operation not stable
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
the Result of GET is not stable after updating the tags of registry.
How to reproduce:
1. call `PUT` to create a registry
2. call `Patch` to upadte tags
3. call `GET` to get the registry content. the `tags` field can be the old version, or the new tags. it will be the new one at last. But the patch operation is not LRO.
below is a example Patch to update the tag from `key: example` to `key: example2`:
```http
PATCH https://management.azure.com/subscriptions/xx/resourceGroups/acctestRG-230808113231774073/providers/Microsoft.MachineLearningServices/registries/accmlc-230808113231774073?api-version=2023-04-01 HTTP/2.0
content-type: application/json; charset=utf-8
user-agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 registrymanagement/2023-04-01) HashiCorp Terraform/1.3.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
authorization: Bearer xxx
x-ms-correlation-request-id: 7e61818b-e822-8e66-c263-dbe8c7a7cc36
content-length: 27
accept-encoding: gzip
{"tags":{"key":"example2"}}
HTTP/2.0 200
cache-control: no-cache
content-type: application/json; charset=utf-8
x-ms-request-id: 07c6e3cc-bba6-4d1e-ba2b-94e048ba58cc
request-context: appId=cid-v1:6a27ce65-5555-41a3-85f7-b7a1ce31fd6b
x-ms-correlation-request-id: 7e61818b-e822-8e66-c263-dbe8c7a7cc36
x-ms-routing-request-id: EASTASIA:20230808T033434Z:07c6e3cc-bba6-4d1e-ba2b-94e048ba58cc
date: Tue, 08 Aug 2023 03:34:33 GMT <== updated time
content-length: 3658
{
"tags": {
"key": "example2"
},
"location": "westeurope",
xxx
"systemData": null
}
```
then a GET request still got the old tag:
```http
GET https://management.azure.com/subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-230808113231774073/providers/Microsoft.MachineLearningServices/registries/accmlc-230808113231774073?api-version=2023-04-01 HTTP/2.0
content-type: application/json; charset=utf-8
user-agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 registrymanagement/2023-04-01) HashiCorp Terraform/1.3.7 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
authorization: Bearer xxx
x-ms-correlation-request-id: 7e61818b-e822-8e66-c263-dbe8c7a7cc36
accept-encoding: gzip
content-length: 0
HTTP/2.0 200
content-type: application/json; charset=utf-8
x-ms-request-id: 6a4305c6-b5ee-495e-add6-f0ea3defeaa9
request-context: appId=cid-v1:6a27ce65-5555-41a3-85f7-b7a1ce31fd6b
strict-transport-security: max-age=31536000; includeSubDomains
x-request-time: 0.037
x-ms-correlation-request-id: 7e61818b-e822-8e66-c263-dbe8c7a7cc36
x-ms-routing-request-id: EASTASIA:20230808T033437Z:6a4305c6-b5ee-495e-add6-f0ea3defeaa9
date: Tue, 08 Aug 2023 03:34:36 GMT
content-length: 3657
{
"tags": {
"key": "example" <== got the old value
},
"location": "westeurope",
"systemData": null
}
```
then another GET got the new value
```http
GET https://management.azure.com/subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-230808113231774073/providers/Microsoft.MachineLearningServices/registries/accmlc-230808113231774073?api-version=2023-04-01 HTTP/2.0
x-ms-correlation-request-id: 7e61818b-e822-8e66-c263-dbe8c7a7cc36
content-type: application/json; charset=utf-8
user-agent: xx
authorization: Bearer xx
accept-encoding: gzip
content-length: 0
HTTP/2.0 200
x-ms-request-id: e77b0bb6-0817-4792-87e1-99027a1e0752
x-ms-ratelimit-remaining-subscription-reads: 11999
request-context: appId=cid-v1:6a27ce65-5555-41a3-85f7-b7a1ce31fd6b
x-ms-correlation-request-id: 7e61818b-e822-8e66-c263-dbe8c7a7cc36
x-ms-routing-request-id: EASTASIA:20230808T033440Z:e77b0bb6-0817-4792-87e1-99027a1e0752
date: Tue, 08 Aug 2023 03:34:40 GMT
content-length: 3658
{
"tags": {
"key": "example2" <== now got the new value
},
"location": "westeurope",
xxxx
"systemData": null
}
```
seems the Get response with different `x-aml-cluster` header, one can be `x-aml-cluster: vienna-westeurope-02` the other is `x-aml-cluster: vienna-westeurope-01`. maybe it is a cache inconsistency issue?
Contributor guide
Research direction
Start by reproducing the PATCH-then-GET sequence for the `machinelearningservice/registry` `Registries_Update` operation described here, comparing responses from the different `x-aml-cluster` values. Determine whether the API specification or service behavior needs to change; done should mean the expected consistency behavior is identified and captured in an actionable resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- api
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100