Skip to content

Commit

Permalink
Merge pull request #7304 from mtrqq/fix/reservations-consumption-error
Browse files Browse the repository at this point in the history
Register new GCE reservations error message regexp to correctly categorize error.
  • Loading branch information
k8s-ci-robot committed Sep 23, 2024
2 parents 04b1402 + 552f49f commit b066117
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ var (
regexp.MustCompile("Reservation (.*) is incorrect for the requested resources"),
regexp.MustCompile("Zone does not currently have sufficient capacity for the requested resources"),
regexp.MustCompile("Reservation (.*) does not have sufficient capacity for the requested resources."),
regexp.MustCompile("Specified reservation (.*) does not have available resources for the request."),
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ func TestErrors(t *testing.T) {
expectedErrorCode: "OTHER",
expectedErrorClass: cloudprovider.OtherErrorClass,
},
{
errorCodes: []string{"CONDITION_NOT_MET"},
errorMessage: "Specified reservation 'rsv-name' does not have available resources for the request.",
expectedErrorCode: "INVALID_RESERVATION",
expectedErrorClass: cloudprovider.OtherErrorClass,
},
}
for _, tc := range testCases {
for _, errorCode := range tc.errorCodes {
Expand Down

0 comments on commit b066117

Please sign in to comment.