Merged
Conversation
dc7a696 to
e9402f0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the SNS subscription system and introduces a new type-safe dead-letter queue builder for SQS. The changes replace the old string-based subscription mechanism with strongly-typed builders that leverage CDK's native ITopicSubscription interface.
Key Changes
- Added five new SNS subscription builders (
lambdaSubscription,sqsSubscription,emailSubscription,smsSubscription,urlSubscription) that returnITopicSubscriptionand can be implicitly yielded into topics - Introduced a
deadLetterQueuebuilder in SQS that createsIDeadLetterQueueconfigurations for proper DLQ setup - Removed the old
SubscriptionOpandSubscriptionSpectypes along with the string-based subscription mechanism from Stack.fs - Updated topic builder to support subscriptions via implicit yield, explicit
subscriptionoperation, andsubscriptionslist operation
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/SNS.fs | Complete rewrite of subscription system with five new type-safe builders (Lambda, SQS, Email, SMS, URL) and updated TopicBuilder to support subscriptions |
| src/SQS.fs | Added DeadLetterBuilder for creating IDeadLetterQueue configurations; updated QueueBuilder to use IDeadLetterQueue instead of string-based DLQ references |
| src/Stack.fs | Removed old SubscriptionOp and processSubscription logic; added subscription processing in TopicOp that iterates through subscriptions and calls topic.AddSubscription |
| src/Stage.fs | Fixed typo in comment ("onfiguration" → "configuration") |
| tests/SNSTests.fs | Comprehensive test suite for all new subscription builders with 100+ test cases covering standalone usage, integration with stack CE, and various configuration options |
| tests/SQSTests.fs | Added tests for deadLetterQueue builder both standalone and within stack CE; updated existing DLQ test to use new builder pattern |
| tests/SecurityDefaultsTests.fs | Added testSequenced to all test lists for sequential execution consistency |
| tests/FsCdk.Tests.fsproj | Added SNSTests.fs to compilation order |
| tests/AppTests.fs | Updated example to use new deadLetterQueue builder with let! binding pattern |
| docs/sns-sqs-messaging.fsx | Extensive documentation rewrite with examples for all subscription builders, filter policies, fan-out patterns, and comprehensive reference tables |
| docs/index.fsx | Updated example to use new deadLetterQueue builder pattern |
| CHANGELOG.md | Added v0.2.0 release notes documenting new features and fixes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.