Skip to content

Commit c124341

Browse files
tphoneyactions-user
authored andcommitted
ensure that we are using the sqs queue arn attribute when linking (#2720)
We are missing a link from aws. sqs queu to lambda event source mapping. This is aiming to fix that. I checked that the adapter actually creates this attribute. <img width="609" height="723" alt="Screenshot 2025-09-25 at 17 59 19" src="https://github.com/user-attachments/assets/0a8edb2d-62e2-4cb8-8961-c1e129849f48" /> GitOrigin-RevId: beaf6e74d0a35b6c46be88c205e04bae64624fd9
1 parent dee2e78 commit c124341

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

aws-source/adapters/sqs-queue.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ func getFunc(ctx context.Context, client sqsClient, scope string, input *sqs.Get
7272
Scope: scope,
7373
},
7474
BlastPropagation: &sdp.BlastPropagation{
75-
// If the SQS queue is updated, event source mappings will be affected
76-
In: true,
7775
// If event source mappings change, it doesn't affect the queue itself
78-
Out: false,
76+
In: false,
77+
// If the SQS queue is updated, event source mappings will be affected
78+
Out: true,
7979
},
8080
})
8181
}

aws-source/adapters/sqs-queue_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ func TestGetFunc(t *testing.T) {
7777
if httpLink.GetQuery().GetMethod() != sdp.QueryMethod_SEARCH {
7878
t.Errorf("Expected HTTP link method to be SEARCH, got %v", httpLink.GetQuery().GetMethod())
7979
}
80+
// Test HTTP link blast propagation (bidirectional)
81+
if httpLink.GetBlastPropagation().GetIn() != true {
82+
t.Errorf("Expected HTTP link blast propagation In to be true, got %v", httpLink.GetBlastPropagation().GetIn())
83+
}
84+
if httpLink.GetBlastPropagation().GetOut() != true {
85+
t.Errorf("Expected HTTP link blast propagation Out to be true, got %v", httpLink.GetBlastPropagation().GetOut())
86+
}
8087

8188
// Test Lambda Event Source Mapping link
8289
lambdaLink := item.GetLinkedItemQueries()[1]
@@ -89,6 +96,13 @@ func TestGetFunc(t *testing.T) {
8996
if lambdaLink.GetQuery().GetQuery() != "arn:aws:sqs:us-west-2:123456789012:MyQueue" {
9097
t.Errorf("Expected Lambda link query to be the Queue ARN, got %s", lambdaLink.GetQuery().GetQuery())
9198
}
99+
// Test Lambda Event Source Mapping link blast propagation (outgoing only)
100+
if lambdaLink.GetBlastPropagation().GetIn() != false {
101+
t.Errorf("Expected Lambda link blast propagation In to be false, got %v", lambdaLink.GetBlastPropagation().GetIn())
102+
}
103+
if lambdaLink.GetBlastPropagation().GetOut() != true {
104+
t.Errorf("Expected Lambda link blast propagation Out to be true, got %v", lambdaLink.GetBlastPropagation().GetOut())
105+
}
92106
}
93107

94108
func TestNewQueueAdapter(t *testing.T) {

0 commit comments

Comments
 (0)