-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sns): adding support for firehose subscription protocol #15764
Changes from 7 commits
8627c08
c7cc346
a8ba85d
8348cfe
08f1647
5eb7c1b
25568c3
5199c25
1fcbaaa
6808fb5
08843e3
e0ad6ce
a4b05fb
1961e11
90bb458
3dd9347
6061ad0
d6bd259
5ea9c8b
33a75bf
a0fe2a8
202fe78
9d71a12
9004bb1
1ffb015
d431894
4975593
71f1ba4
26947bb
d6319e7
3c675e1
58697d6
b5a6080
abe81a7
3ee446a
3d1b5a8
35a024c
b845e75
0208d15
0dda976
5cbad9b
fe01679
e050d6a
18c2fe7
a05e73a
f17a42a
12c2801
8071d47
02df3c3
d6f42db
9610854
996d246
0ac8baf
e2cd51c
c4051d7
a48ed33
4c9b053
cfd333a
3b374d5
cc9a17a
3686eea
f29f4d5
5fb6364
84836f9
b121653
c7654bd
9ed8af0
693cf23
26b811f
f839bd7
05a6617
95376e0
bc4c0bf
0251976
1fa1d99
f690d13
df20ffa
9ada96d
305e232
110e34d
d5df2b4
8af0042
7be414f
9eeb8fe
a520f28
5df6fa4
302e62a
0dd6f83
73693d8
e4edbad
94ad895
679b1a8
6918312
dca8c01
f7e22cc
4118739
1a508c3
58d2a65
ad17dd9
a505893
4d621d2
0da1df4
3364f98
2047fca
6e6acc8
3ee2ec2
3369bc6
28cee85
c47f288
7ba828f
154dbf4
29f49ae
4daad67
da01d0f
2df6783
5ec9576
d551049
7a0f11e
81372df
1aa42cb
df1dcf0
ebe4a2a
668534e
4d46349
542d325
b3ac7d2
0065318
5bd4aca
e83d13f
326ebd0
8b975c3
26e1907
86b571a
f30466b
e8f9e6c
fb7cf73
e384a23
ad2b167
f804d63
4217f58
090edfb
2a52d4a
7172ee2
7420e33
d7ba92d
79c5adf
6d00c85
a69ff4c
05aca34
4eb1378
aa82bed
2755d87
92308e6
868ec96
169d492
e605123
bef3a6e
9044e6a
831019d
665d038
a076d24
ffbdcd1
098c014
77d5b75
290bce3
e33d8c6
b5a1258
7d928a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -176,7 +176,7 @@ describe('Subscription', () => { | |||||||
|
||||||||
}); | ||||||||
|
||||||||
test('throws with raw delivery for protocol other than http, https or sqs', () => { | ||||||||
test('throws with raw delivery for lambda protocol', () => { | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Why did you make this change? While the text more accurately describes the specifics of the test, they lose the intent behind the test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @njlynch , the choice was between changing the name to "protocol other than http, https, sqs, or firehose" (since firehose supports raw delivery) or changing it to "lambda protocol", which has the advantage of being more accurate. As it is, the test name is misleading - it doesn't cover email or sms which also don't support raw delivery. Better just to name it more transparently. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah. If Firehose supports raw delivery, then it looks like this check needs to be updated: aws-cdk/packages/@aws-cdk/aws-sns/lib/subscription.ts Lines 84 to 86 in b838f95
You're accurate the test name is now more accurate, but it points out the inadequacy of it. Could you swap it to use a |
||||||||
// GIVEN | ||||||||
const stack = new cdk.Stack(); | ||||||||
const topic = new sns.Topic(stack, 'Topic'); | ||||||||
|
@@ -232,4 +232,17 @@ describe('Subscription', () => { | |||||||
})).toThrow(/\(120\) must not exceed 100/); | ||||||||
|
||||||||
}); | ||||||||
|
||||||||
test('throws an error when subscription role arn is not entered with firehose subscription protocol', () => { | ||||||||
// GIVEN | ||||||||
const stack = new cdk.Stack(); | ||||||||
const topic = new sns.Topic(stack, 'Topic'); | ||||||||
|
||||||||
//THEN | ||||||||
expect(() => new sns.Subscription(stack, 'Subscription', { | ||||||||
endpoint: 'endpoint', | ||||||||
protocol: sns.SubscriptionProtocol.FIREHOSE, | ||||||||
topic, | ||||||||
})).toThrow(/Subscription role arn is required field for subscriptions with a firehose protocol./); | ||||||||
}); | ||||||||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~
(Nit) This is okay, if we're going to leave this implementation as the basics only. I'd greatly prefer we document it as part of aFirehoseSubscription
in theaws-sns-subscriptions
README instead though.