Skip to content

test: handle missing RETAIN_MODE context gracefully in e2e CDK apps#619

Merged
go-to-k merged 1 commit intomainfrom
fix/retain-mode-nil-panic
Mar 30, 2026
Merged

test: handle missing RETAIN_MODE context gracefully in e2e CDK apps#619
go-to-k merged 1 commit intomainfrom
fix/retain-mode-nil-panic

Conversation

@go-to-k
Copy link
Copy Markdown
Owner

@go-to-k go-to-k commented Mar 30, 2026

Summary

Fix panic when running delstack cdk without -c RETAIN_MODE=... context.

TryGetContext returns nil when the context key is not set, and the unsafe type assertion .(string) panics. Use comma-ok idiom instead.

Affected files:

  • e2e/cdk_cross_region/cdk/cdk.go
  • e2e/cdk_integration/cdk/cdk.go

@go-to-k go-to-k changed the title fix: handle missing RETAIN_MODE context gracefully in e2e CDK apps test: handle missing RETAIN_MODE context gracefully in e2e CDK apps Mar 30, 2026
@go-to-k go-to-k merged commit 73c45a3 into main Mar 30, 2026
4 checks passed
@go-to-k go-to-k deleted the fix/retain-mode-nil-panic branch March 30, 2026 12:14
@github-actions github-actions bot mentioned this pull request Mar 30, 2026
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.

1 participant