Azure / Azure/azure-rest-api-specs

Microsoft.Automation/automationAccounts/sourceControls/sourceControlSyncJobs@2020-01-13-preview - LRO Invalid Terminal State

Open
#20,085 2 comments 2 reactions 0 assignees View on GitHub
Automation Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

## Microsoft.Automation/automationAccounts/sourceControls/sourceControlSyncJobs@2020-01-13-preview - LRO Invalid Terminal State

### Description

In its polling response, the final provisionState is `Completed` which is not a valid terminal state.

> The provisioningState property has only three terminal states: Succeeded , Failed and Canceled. If the resource returns no provisioningState, it is assumed to be Succeeded.

refs: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#provisioningstate-property

```
{
"id": "/subscriptions/0000/resourceGroups/henglu82/providers/Microsoft.Automation/automationAccounts/henglu82/sourceControls/henglu82/sourceControlSyncJobs/d8a1f5af-884d-0d98-5edd-7137408b59ec",
"properties": {
"sourceControlSyncJobId": "d8a1f5af-884d-0d98-5edd-7137408b59ec",
"provisioningState": "Completed",
"exception": null,
"creationTime": "2022-08-03T02:13:46.9049144+00:00",
"startTime": "2022-08-03T02:13:57.0066464+00:00",
"endTime": "2022-08-03T02:14:19.1472112+00:00",
"syncType": "FullSync"
}
}
```

### Details

1. ARM Fully-Qualified Resource Type
```
Microsoft.Automation/automationAccounts/sourceControls/sourceControlSyncJobs
```

2. API Version
```
2020-01-13-preview
```

3. Swagger issue type
```
Swagger Correctness
```

4. OperationId
```
SourceControlSyncJob_Create
```

5. Swagger GitHub permalink
```
https://github.com/Azure/azure-rest-api-specs/blob/88e7838a09868a51de3894114355c75929847a46/specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/sourceControlSyncJob.json#L303
```

6. Error code
```
```

7. Request traces
```
PUT https://management.azure.com/subscriptions/0000/resourceGroups/henglu82/providers/Microsoft.Automation/automationAccounts/henglu82/sourceControls/henglu82/sourceControlSyncJobs/d8a1f5af-884d-0d98-5edd-7137408b59ec?api-version=2020-01-13-preview HTTP/2.0
accept: application/json
content-type: application/json
user-agent: HashiCorp Terraform/1.2.0 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azapi/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
x-ms-correlation-request-id: 727a95de-9dbf-9c3c-55e5-288d37b5b044
authorization: Bearer XXX
content-length: 30
accept-encoding: gzip

{"properties":{"commitId":""}}

HTTP/2.0 201
cache-control: no-cache
pragma: no-cache
content-length: 440
content-type: application/json; charset=utf-8
expires: -1
location: https://management.azure.com/subscriptions/0000/resourceGroups/henglu82/providers/Microsoft.Automation/automationAccounts/henglu82/sourceControls/henglu82/sourceControlSyncJobs/d8a1f5af-884d-0d98-5edd-7137408b59ec?api-version=2020-01-13-preview
x-ms-request-id: bcaff1d2-b543-4717-a616-d6b2ad0f474f
x-ms-ratelimit-remaining-subscription-writes: 1199
server: Microsoft-HTTPAPI/2.0
x-ms-correlation-request-id: 727a95de-9dbf-9c3c-55e5-288d37b5b044
x-ms-routing-request-id: SOUTHEASTASIA:20220803T021347Z:28426cd6-6b01-470d-ab84-c6cce6d4ea78
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
date: Wed, 03 Aug 2022 02:13:46 GMT

{"id":"/subscriptions/0000/resourceGroups/henglu82/providers/Microsoft.Automation/automationAccounts/henglu82/sourceControls/henglu82/sourceControlSyncJobs/d8a1f5af-884d-0d98-5edd-7137408b59ec","properties":{"sourceControlSyncJobId":"d8a1f5af-884d-0d98-5edd-7137408b59ec","provisioningState":"Running","creationTime":"2022-08-03T02:13:46.9049144+00:00","startTime":null,"endTime":null,"syncType":"FullSync"}}
--------------------------------------------------------------------------------

GET https://management.azure.com/subscriptions/0000/resourceGroups/henglu82/providers/Microsoft.Automation/automationAccounts/henglu82/sourceControls/henglu82/sourceControlSyncJobs/d8a1f5af-884d-0d98-5edd-7137408b59ec?api-version=2020-01-13-preview HTTP/2.0
user-agent: HashiCorp Terraform/1.2.0 (+https://www.terraform.io) Terraform Plugin SDK/2.8.0 terraform-provider-azapi/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
x-ms-correlation-request-id: 727a95de-9dbf-9c3c-55e5-288d37b5b044
authorization: Bearer XXXX
accept-encoding: gzip
content-length: 0

HTTP/2.0 200
cache-control: no-cache
pragma: no-cache
content-type: application/json; charset=utf-8
expires: -1
vary: Accept-Encoding
x-ms-request-id: 1854d413-bd80-4c40-b293-6fb4e0460f90
x-ms-ratelimit-remaining-subscription-reads: 11988
server: Microsoft-HTTPAPI/2.0
x-ms-correlation-request-id: 727a95de-9dbf-9c3c-55e5-288d37b5b044
x-ms-routing-request-id: SOUTHEASTASIA:20220803T021517Z:963f1985-3d93-4303-af9c-150f7a2e36ba
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
date: Wed, 03 Aug 2022 02:15:17 GMT
content-length: 521

{"id":"/subscriptions/0000/resourceGroups/henglu82/providers/Microsoft.Automation/automationAccounts/henglu82/sourceControls/henglu82/sourceControlSyncJobs/d8a1f5af-884d-0d98-5edd-7137408b59ec","properties":{"sourceControlSyncJobId":"d8a1f5af-884d-0d98-5edd-7137408b59ec","provisioningState":"Completed","exception":null,"creationTime":"2022-08-03T02:13:46.9049144+00:00","startTime":"2022-08-03T02:13:57.0066464+00:00","endTime":"2022-08-03T02:14:19.1472112+00:00","syncType":"FullSync"}}
```

### Links
1. [Semantic and Model Violations Reference](https://github.com/Azure/azure-rest-api-specs/blob/main/documentation/Semantic-and-Model-Violations-Reference.md)
2. [S360 action item generator for Swagger issues](https://aka.ms/swaggers360)

Contributor guide

Open the contributing guide

Research direction

Start with the linked sourceControlSyncJob.json file around line 303 and the SourceControlSyncJob_Create operation. Compare its long-running-operation definition with the async API reference, focusing on how the service's Completed provisioningState is handled. Done means the API specification accurately represents the observed terminal-state behavior or documents the required service correction.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.