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

@ -308,7 +308,7 @@ func (r *userResource) Create(
region,
userId,
).SetSleepBeforeWait(
90 * time.Second,
10 * time.Second,
).SetTimeout(
90 * time.Minute,
).WaitWithContext(ctx)
@ -459,23 +459,23 @@ func (r *userResource) Delete(
ctx = core.InitProviderContext(ctx)
projectId := model.ProjectId.ValueString()
instanceId := model.InstanceId.ValueString()
userId := model.UserId.ValueInt64()
projectID := model.ProjectId.ValueString()
instanceID := model.InstanceId.ValueString()
userID := model.UserId.ValueInt64()
region := model.Region.ValueString()
ctx = tflog.SetField(ctx, "project_id", projectId)
ctx = tflog.SetField(ctx, "instance_id", instanceId)
ctx = tflog.SetField(ctx, "user_id", userId)
ctx = tflog.SetField(ctx, "project_id", projectID)
ctx = tflog.SetField(ctx, "instance_id", instanceID)
ctx = tflog.SetField(ctx, "user_id", userID)
ctx = tflog.SetField(ctx, "region", region)
// Delete existing record set
// err := r.client.DeleteUserRequest(ctx, projectId, region, instanceId, userId).Execute()
err := r.client.DefaultAPI.DeleteUserRequest(ctx, projectId, region, instanceId, userId).Execute()
err := r.client.DefaultAPI.DeleteUserRequest(ctx, projectID, region, instanceID, userID).Execute()
if err != nil {
var oapiErr *oapierror.GenericOpenAPIError
ok := errors.As(err, &oapiErr)
if !ok {
// TODO err handling
core.LogAndAddError(ctx, &resp.Diagnostics, "User Delete Error", fmt.Sprintf("error is no oapi error: %v", err))
return
}
@ -487,12 +487,14 @@ func (r *userResource) Delete(
// tflog.Warn(ctx, "[delete user] Wait handler got error 500")
// return false, nil, nil
default:
// TODO err handling
core.LogAndAddError(ctx, &resp.Diagnostics, "User Delete Error", fmt.Sprintf("Unexpected API error: %v", err))
return
}
}
// Delete existing record set
_, err = sqlserverflexbetaWait.DeleteUserWaitHandler(ctx, r.client.DefaultAPI, projectId, region, instanceId, userId).
_, err = sqlserverflexbetaWait.DeleteUserWaitHandler(ctx, r.client.DefaultAPI, projectID, region, instanceID, userID).
SetTimeout(90 * time.Minute).
SetSleepBeforeWait(10 * time.Second).
WaitWithContext(ctx)
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "User Delete Error", fmt.Sprintf("Calling API: %v", err))