feat (intake): refactor wait handler to use helper struct#7163
Open
GokceGK wants to merge 10 commits into
Open
feat (intake): refactor wait handler to use helper struct#7163GokceGK wants to merge 10 commits into
GokceGK wants to merge 10 commits into
Conversation
relates to STACKITSDK-375
Member
|
One nitpick regarding the commit message: - feat (intake): refactor wait handler to use helper struct
+ feat(intake): refactor wait handler to use helper struct |
rubenhoenle
reviewed
May 6, 2026
Co-authored-by: Ruben Hönle <Ruben.Hoenle@digits.schwarz>
relates to STACKITSDK-375
rubenhoenle
reviewed
May 13, 2026
| // it never becomes active. | ||
| return false, nil, nil | ||
| }) | ||
| func CreateOrUpdateIntakeUserWaitHandler(ctx context.Context, client intake.DefaultAPI, projectId, region, intakeId, intakeUserId string) *wait.AsyncActionHandler[intake.IntakeUserResponse] { |
Member
There was a problem hiding this comment.
You can directly apply the thing I mentioned in the daily here
// Deprecated: Will be removed after YYYY-MM-DD. Use the CreateIntakeUserWaitHandler or UpdateIntakeUserWaitHandler instead
func CreateOrUpdateIntakeUserWaitHandler(...) ... {
// TODO: mark function as private after deprecation period
// keep the existing logic
}
func CreateIntakeUserWaitHandler(...) ... {
return CreateOrUpdateIntakeUserWaitHandler(...)
}
func UpdateIntakeUserWaitHandler(...) ... {
return CreateOrUpdateIntakeUserWaitHandler(...)
}Deprecation period: now + 6 months
rubenhoenle
reviewed
May 13, 2026
| if ik.Id == intakeId && ik.State == INTAKERESPONSESTATE_FAILED { | ||
| return true, ik, fmt.Errorf("create/update failed for Intake %s", intakeId) | ||
| } | ||
| func CreateOrUpdateIntakeWaitHandler(ctx context.Context, client intake.DefaultAPI, projectId, region, intakeId string) *wait.AsyncActionHandler[intake.IntakeResponse] { |
rubenhoenle
reviewed
May 13, 2026
| return true, runner, nil | ||
| } | ||
|
|
||
| func CreateOrUpdateIntakeRunnerWaitHandler(ctx context.Context, client intake.DefaultAPI, projectId, region, intakeRunnerId string) *wait.AsyncActionHandler[intake.IntakeRunnerResponse] { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
relates to STACKITSDK-375
Checklist
make fmtexamples/directory)make test(will be checked by CI)make lint(will be checked by CI)