fix: adjust timeouts to 90 mins
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Failing after 1m2s
CI Workflow / Prepare GO cache (pull_request) Successful in 5m33s
CI Workflow / Test readiness for publishing provider (pull_request) Has been skipped
CI Workflow / CI run tests (pull_request) Has been skipped
CI Workflow / CI run build and linting (pull_request) Has been skipped
CI Workflow / Code coverage report (pull_request) Has been skipped
TF Acceptance Tests Workflow / Acceptance Tests (pull_request) Failing after 1h39m47s

This commit is contained in:
Marcel S. Henselin 2026-03-25 09:40:44 +01:00
parent 97645d7a66
commit 83b0860115
9 changed files with 38 additions and 33 deletions

View file

@ -281,8 +281,8 @@ func GetDatabaseByIdWaitHandler(
if databaseID > math.MaxInt32 {
return false, nil, fmt.Errorf("databaseID too large for int32")
}
dbId32 := int32(databaseID) //nolint:gosec // is checked above
s, err := a.GetDatabaseRequest(ctx, projectID, region, instanceID, dbId32).Execute()
dbID32 := int32(databaseID) //nolint:gosec // is checked above
s, err := a.GetDatabaseRequest(ctx, projectID, region, instanceID, dbID32).Execute()
if err != nil {
var oapiErr *oapierror.GenericOpenAPIError
ok := errors.As(err, &oapiErr)
@ -290,6 +290,7 @@ func GetDatabaseByIdWaitHandler(
return false, nil, fmt.Errorf("could not convert error to oapierror.GenericOpenAPIError")
}
switch oapiErr.StatusCode {
// TODO: work-around
case http.StatusBadGateway, http.StatusGatewayTimeout, http.StatusServiceUnavailable:
tflog.Warn(
ctx, "api responded with 50[2,3,4] status", map[string]interface{}{

View file

@ -94,6 +94,7 @@ func CreateInstanceWaitHandler(
case http.StatusNotFound:
return false, nil, nil
default:
// TODO: work-around
if strings.Contains(err.Error(), "is not a valid InstanceEdition") {
tflog.Info(ctx, "API WORKAROUND", map[string]interface{}{"err": err})
return false, nil, nil
@ -263,7 +264,6 @@ func DeleteInstanceWaitHandler(
return true, nil, nil
},
)
handler.SetTimeout(30 * time.Minute)
return handler
}
@ -405,7 +405,5 @@ func DeleteUserWaitHandler(
}
},
)
handler.SetTimeout(15 * time.Minute)
handler.SetSleepBeforeWait(15 * time.Second)
return handler
}