Skip to content

Conversation

@Benjosh95
Copy link
Contributor

@Benjosh95 Benjosh95 commented Oct 29, 2025

Description

Jira-Ticket: https://jira.schwarz/browse/STACKITSDK-262

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)

@Benjosh95 Benjosh95 requested a review from a team as a code owner October 29, 2025 17:13
switch *response.State {
case kms.VERSIONSTATE_DISABLED:
return true, response, nil
case kms.VERSIONSTATE_ACTIVE:
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
case kms.VERSIONSTATE_ACTIVE:
case kms.VERSIONSTATE_ACTIVE, VERSIONSTATE_CREATING, VERSIONSTATE_KEY_MATERIAL_UNAVAILABLE:

Just combine the cases which have the same effect. Saves you code and is way easier to read

return false, nil, nil
case kms.VERSIONSTATE_KEY_MATERIAL_UNAVAILABLE:
return false, nil, nil
case kms.VERSIONSTATE_DESTROYED:
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
case kms.VERSIONSTATE_DESTROYED:
case kms.VERSIONSTATE_DESTROYED, VERSIONSTATE_KEY_MATERIAL_INVALID:

same here

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.

3 participants