feat(cdn) refactor waiters to use WaiterHelper#6824
feat(cdn) refactor waiters to use WaiterHelper#6824cgoetz-inovex wants to merge 4 commits intomainfrom
Conversation
| return true, nil, nil | ||
| waitConfig := wait.WaiterHelper[cdn.CustomDomain, cdn.DomainStatus]{ | ||
| FetchInstance: func() (*cdn.CustomDomain, error) { | ||
| resp, err := a.GetCustomDomainExecute(ctx, projectId, distributionId, domain) |
There was a problem hiding this comment.
| resp, err := a.GetCustomDomainExecute(ctx, projectId, distributionId, domain) | |
| _, err := a.GetCustomDomainExecute(ctx, projectId, distributionId, domain) | |
| return nil, err |
The return value shouldn't actually be needed. The Get call is only done to check for a HTTP 404 status code. Isn't it? 😅
CC @marceljk
There was a problem hiding this comment.
Did not want to change the signature. DeleteCDNCustomDomainWaitHandler returns *wait.AsyncActionHandler[cdn.CustomDomain]. resp is used down below to get CustomDomain.
| } | ||
| return resp.CustomDomain, nil | ||
| }, | ||
| GetState: func(response *cdn.CustomDomain) (cdn.DomainStatus, error) { |
There was a problem hiding this comment.
Do we have to actually specify a "GetState" here? It's a delete wait handler.
CC @marceljk ?
There was a problem hiding this comment.
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
Description
relates to #1234
Checklist
make fmtexamples/directory)make test(will be checked by CI)make lint(will be checked by CI)