Azure / Azure/azure-rest-api-specs

[DataBoxEdge] - API Response does not include `provisioningState`

Open
#23,749 2 comments 0 reactions 0 assignees View on GitHub
customer-reported needs-triage question
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

Sending this Request:

```
:authority: management.azure.com
:method: PUT
:path: /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/acctestRG-databoxedge-230427135816576590/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/acctest-dd-thfdb?api-version=2020-12-01
:scheme: https
content-type: application/json
user-agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 devices/2020-12-01) HashiCorp Terraform/1.3.4 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
authorization: Bearer XXXXX
x-ms-correlation-request-id: 8c888868-7050-5015-1d56-bcbdeadf32df
content-length: 79
accept-encoding: gzip

{"location":"eastus","sku":{"name":"EdgeP_Base","tier":"Standard"},"tags":null}
```

Returns this Response:

```
:status: 200
cache-control: no-cache
pragma: no-cache
content-type: application/json; charset=utf-8
content-encoding: gzip
expires: -1
vary: Accept-Encoding
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id: 8c888868-7050-5015-1d56-bcbdeadf32df
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-ms-request-id: 8c888868-7050-5015-1d56-bcbdeadf32df
x-ms-client-request-id: 6342f638-4b44-4a62-a29d-505fb56c7fc7
x-ms-routing-request-id: GERMANYWESTCENTRAL:20230427T115901Z:fea349bf-2e5a-4ddd-b603-0fdfc2f890e3
date: Thu, 27 Apr 2023 11:59:00 GMT

{
"location": "eastus",
"tags": {},
"sku": {
"name": "EdgeP_Base",
"tier": "Standard"
},
"etag": "W/\"datetime'2023-04-27T11%3A59%3A00.5019716Z'\"_W/\"datetime'2023-04-27T11%3A59%3A00.5109652Z'\"",
"kind": "AzureStackEdge",
"properties": {
"isIoTRoleAllowed": false,
"dataBoxEdgeDeviceStatus": "ReadyToSetup",
"deviceType": "DataBoxEdgeDevice",
"deviceLocalCapacity": 0,
"nodeCount": 0,
"resourceMoveDetails": {
"operationInProgress": "None"
},
"edgeProfile": {
"subscription": {
"state": "Registered"
}
},
"licenseState": "None"
},
"id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/acctestRG-databoxedge-230427135816576590/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/acctest-dd-thfdb",
"name": "acctest-dd-thfdb",
"type": "Microsoft.DataBoxEdge/dataBoxEdgeDevices"
}
```

Note that this API Response does not include a `provisioningState` field which is required (at least in my understanding) by the ARM Specification.

---

Doing a GET request to the same resource also returns no `provisioningState` field:

Request:

```
:authority: management.azure.com
:method: GET
:path: /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/acctestRG-databoxedge-230427135816576590/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/acctest-dd-thfdb?api-version=2020-12-01
:scheme: https
content-type: application/json; charset=utf-8
user-agent: HashiCorp/go-azure-sdk (Go-http-Client/1.1 devices/2020-12-01) HashiCorp Terraform/1.3.4 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
odata-maxversion: 4.0
odata-version: 4.0
accept: application/json; charset=utf-8; IEEE754Compatible=false
authorization: Bearer XXXX
x-ms-correlation-request-id: 8c888868-7050-5015-1d56-bcbdeadf32df
accept-encoding: gzip
```

Response:

```
:status: 200
cache-control: no-cache
pragma: no-cache
content-type: application/json; charset=utf-8
content-encoding: gzip
expires: -1
vary: Accept-Encoding
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-correlation-request-id: 8c888868-7050-5015-1d56-bcbdeadf32df
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-ms-request-id: 8c888868-7050-5015-1d56-bcbdeadf32df
x-ms-client-request-id: 064b37c9-d3e9-4f12-a84c-6d228527c07f
x-ms-routing-request-id: GERMANYWESTCENTRAL:20230427T115911Z:7e6d3bba-3770-4d71-baf3-a346ef388ef5
date: Thu, 27 Apr 2023 11:59:11 GMT

{
"location": "eastus",
"tags": {},
"sku": {
"name": "EdgeP_Base",
"tier": "Standard"
},
"etag": "W/\"datetime'2023-04-27T11%3A59%3A03.0715128Z'\"_W/\"datetime'2023-04-27T11%3A59%3A03.079507Z'\"",
"kind": "AzureStackEdge",
"properties": {
"isIoTRoleAllowed": false,
"dataBoxEdgeDeviceStatus": "ReadyToSetup",
"deviceType": "DataBoxEdgeDevice",
"deviceLocalCapacity": 0,
"nodeCount": 0,
"edgeProfile": {
"subscription": {
"registrationId": "59376907-0002-4013-6155-8839f52118d8",
"state": "Registered",
"subscriptionId": "7376ff73-bb37-4234-6f5b-d35dc6023121"
}
},
"licenseState": "None"
},
"id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/acctestRG-databoxedge-230427135816576590/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/acctest-dd-thfdb",
"name": "acctest-dd-thfdb",
"type": "Microsoft.DataBoxEdge/dataBoxEdgeDevices"
}
```

Should this API be returning a `provisioningState` field? To the best of my knowledge every other Resource Manager API does, so this appears to be a bug?

From our side this is causing issues when validating the API Response, since we're expecting a `provisioningState` field to be present (to confirm this is marked as `Successful`) - which works in other API's but appears to be missing from this API.

Contributor guide

Open the contributing guide

Research direction

Start with the Microsoft.DataBoxEdge/dataBoxEdgeDevices API at api-version 2020-12-01, comparing the PUT and GET responses in the issue with the corresponding Azure REST specification. Determine whether provisioningState is required in the contract or missing from the service, and consider the issue done when the specification or service behavior is brought into agreement and validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, backend-api-design, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.