Skip to content

fix: add safety checks and filtering to resource operations#1046

Open
james00012 wants to merge 2 commits intomasterfrom
jk/resource-safety-fixes
Open

fix: add safety checks and filtering to resource operations#1046
james00012 wants to merge 2 commits intomasterfrom
jk/resource-safety-fixes

Conversation

@james00012
Copy link
Contributor

@james00012 james00012 commented Mar 8, 2026

Summary

  • Add nil checks in tag conversion helpers (util/tag.go) to prevent panics on nil Key/Value
  • Add ShouldInclude filtering to SageMaker Studio domain lister (was appending unconditionally)
  • Simplify SageMaker Studio ConfigGetter to pass full ResourceType instead of partial copy
  • Refactor IAM Service-Linked Role deletion polling to use shared util.PollUntil helper
  • Warn instead of error when unsupported --resource-type flags are passed to GCP commands
  • Add explanatory comment on GCS bucket panic recovery pattern

Test plan

  • go build ./... passes
  • go vet ./... passes
  • golangci-lint passes
  • Existing unit tests pass (go test ./aws/... ./util/... ./commands/... -short)

- Add nil checks in tag conversion helpers to prevent panics
- Add ShouldInclude filtering to SageMaker Studio lister
- Add timeout and context check to IAM SLR deletion polling
- Warn instead of error for unsupported GCP resource-type flags
- Add explanatory comment for GCS bucket panic recovery
@james00012 james00012 requested a review from denis256 as a code owner March 8, 2026 18:04
Replace hand-rolled polling loop with the shared PollUntil utility,
which handles context cancellation, timeout, and interval properly.
@james00012 james00012 force-pushed the jk/resource-safety-fixes branch from efef054 to ecf4684 Compare March 10, 2026 00:54
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.

1 participant