Skip to content

Commit 8253a2d

Browse files
authored
Merge pull request #1790 from k8s-infra-cherrypick-robot/cherry-pick-1789-to-release-1.14
[release-1.14] Change OPERATION_CANCELED_BY_USER to Canceled instead of Aborted
2 parents 4ea3e06 + 6ef5ecd commit 8253a2d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/gce-cloud-provider/compute/gce-compute.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ func codeForGCEOpError(err computev1.OperationErrorErrors) codes.Code {
11291129
"RESOURCE_NOT_FOUND": codes.NotFound,
11301130
"RESOURCE_ALREADY_EXISTS": codes.AlreadyExists,
11311131
"RESOURCE_IN_USE_BY_ANOTHER_RESOURCE": codes.InvalidArgument,
1132-
"OPERATION_CANCELED_BY_USER": codes.Aborted,
1132+
"OPERATION_CANCELED_BY_USER": codes.Canceled,
11331133
"QUOTA_EXCEEDED": codes.ResourceExhausted,
11341134
"ZONE_RESOURCE_POOL_EXHAUSTED": codes.Unavailable,
11351135
"ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS": codes.Unavailable,

pkg/gce-cloud-provider/compute/gce-compute_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func TestCodeForGCEOpError(t *testing.T) {
122122
{
123123
name: "OPERATION_CANCELED_BY_USER error",
124124
inputErr: computev1.OperationErrorErrors{Code: "OPERATION_CANCELED_BY_USER"},
125-
expCode: codes.Aborted,
125+
expCode: codes.Canceled,
126126
},
127127
{
128128
name: "QUOTA_EXCEEDED error",

0 commit comments

Comments
 (0)