Skip to content

feat (intake): refactor wait handler to use helper struct#7163

Open
GokceGK wants to merge 10 commits into
mainfrom
feat/STACKITSDK-375-intake-refactor-wait-handler
Open

feat (intake): refactor wait handler to use helper struct#7163
GokceGK wants to merge 10 commits into
mainfrom
feat/STACKITSDK-375-intake-refactor-wait-handler

Conversation

@GokceGK
Copy link
Copy Markdown
Contributor

@GokceGK GokceGK commented May 6, 2026

Description

relates to STACKITSDK-375

Checklist

  • Issue was linked above
  • No generated code was adjusted manually (check comments in file header)
  • Changelogs
    • Changelog in the root directory was adjusted (see here)
    • Changelog(s) of the service(s) were adjusted (see e.g. here)
  • VERSION file(s) of the service(s) were adjusted
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@GokceGK GokceGK requested a review from a team as a code owner May 6, 2026 09:20
@rubenhoenle
Copy link
Copy Markdown
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

Comment thread services/intake/VERSION Outdated
// 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] {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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] {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here :)

return true, runner, nil
}

func CreateOrUpdateIntakeRunnerWaitHandler(ctx context.Context, client intake.DefaultAPI, projectId, region, intakeRunnerId string) *wait.AsyncActionHandler[intake.IntakeRunnerResponse] {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants