Skip to content

feat(resourcemanager): refactor wait handler to use helper struct#6013

Open
marceljk wants to merge 2 commits intomainfrom
feat/STACKITSDK-389-refactor-resourcemanager-wait-handler
Open

feat(resourcemanager): refactor wait handler to use helper struct#6013
marceljk wants to merge 2 commits intomainfrom
feat/STACKITSDK-389-refactor-resourcemanager-wait-handler

Conversation

@marceljk
Copy link
Contributor

Description

relates to STACKITSDK-389

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)

@marceljk marceljk requested a review from a team as a code owner March 23, 2026 16:51
getFails: false,
getNotFound: false,
projectState: resourcemanager.LIFECYCLESTATE_DELETING,
wantErr: true,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
wantErr: true,
wantErr: false,

resourcemanager.LIFECYCLESTATE_DELETING is not part of the ErrorState slice, should there really be an error then?

Copy link
Contributor Author

@marceljk marceljk Mar 24, 2026

Choose a reason for hiding this comment

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

Yes it's not part of the ErrorState slice but the state remains always on the pending state, so the waiter runs into a timeout and throws an timeout error.
To prevent this we would need a different approach in the mocks, where we can set a list of responses, to simulate the transition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the tests to cover also state transitions 60157ae

@marceljk marceljk force-pushed the feat/STACKITSDK-389-refactor-resourcemanager-wait-handler branch from 60157ae to a6c8ce2 Compare March 25, 2026 12:42
@marceljk marceljk requested a review from rubenhoenle March 26, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants