Skip to content

Commit

Permalink
Fix aks fleet 2023 06 15 preview patchasync from 0615 (#25131)
Browse files Browse the repository at this point in the history
* do the breaking change only from 0615

* fix patch

* compile to get examples

* remove sample
  • Loading branch information
serbrech authored Aug 2, 2023
1 parent ffc2a73 commit 628448f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@
"provisioningState": "Succeeded"
}
}
},
"202": {
"headers": {
"Retry-After": "20",
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2022-02-01"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@
"provisioningState": "Succeeded"
}
}
},
"202": {
"headers": {
"Retry-After": "20",
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2022-02-01"
}
}
}
}
17 changes: 16 additions & 1 deletion specification/containerservice/Fleet.Management/fleet.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,27 @@ interface Fleets {
IfNoneMatchParameters<Fleet>
>;

update is ArmCustomPatchAsync<
#suppress "@azure-tools/typespec-providerhub/non-breaking-versioning" "Actual breaking change"
@sharedRoute
@removed(Versions.v2023_06_15_preview)
update is ArmCustomPatchSync<
Fleet,
FleetPatch,
BaseParameters<Fleet> & IfMatchParameters<Fleet>
>;

#suppress "@azure-tools/typespec-azure-core/no-operation-id" "Use operationId to keep same name as deprecated sync operation"
@added(Versions.v2023_06_15_preview)
@operationId("Fleets_Update")
@sharedRoute
updateAsync is ArmCustomPatchAsync<
Fleet,
FleetPatch,
BaseParameters<Fleet> & IfMatchParameters<Fleet>
>;

@sharedRoute // why do we need to set shared route on delete? compiler complains with an error
// All shared routes must agree on the value of the shared parameter.TypeSpec(@typespec/http/shared-inconsistency)
delete is ArmResourceDeleteAsync<
Fleet,
BaseParameters<Fleet> & IfMatchParameters<Fleet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@
"provisioningState": "Succeeded"
}
}
},
"202": {
"headers": {
"Retry-After": "20",
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2022-02-01"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,6 @@
"$ref": "#/definitions/Fleet"
}
},
"202": {
"description": "Resource update request accepted.",
"headers": {
"Retry-After": {
"type": "integer",
"format": "int32",
"description": "The Retry-After header can indicate how long the client should wait before polling the operation status."
},
"Location": {
"type": "string",
"description": "The Location header contains the URL where the status of the long running operation can be checked."
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
Expand All @@ -380,11 +366,7 @@
"Update a Fleet.": {
"$ref": "./examples/Fleets_PatchTags.json"
}
},
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-long-running-operation": true
}
},
"delete": {
"operationId": "Fleets_Delete",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@
"provisioningState": "Succeeded"
}
}
},
"202": {
"headers": {
"Retry-After": "20",
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2022-02-01"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -358,20 +358,6 @@
"$ref": "#/definitions/Fleet"
}
},
"202": {
"description": "Resource update request accepted.",
"headers": {
"Retry-After": {
"type": "integer",
"format": "int32",
"description": "The Retry-After header can indicate how long the client should wait before polling the operation status."
},
"Location": {
"type": "string",
"description": "The Location header contains the URL where the status of the long running operation can be checked."
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
Expand All @@ -383,11 +369,7 @@
"Update a Fleet.": {
"$ref": "./examples/Fleets_PatchTags.json"
}
},
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-long-running-operation": true
}
},
"delete": {
"operationId": "Fleets_Delete",
Expand Down

0 comments on commit 628448f

Please sign in to comment.