Skip to content

Commit a91b2b0

Browse files
authored
chore: remove response rules (#6612)
🔒 Scanned for secrets using gitleaks 8.29.1 # Description This PR removes the legacy `DestinationDefinitionT.ResponseRules` / router destination response-rules handling. We already support a transformer proxy, so this path is unused and adds unnecessary configuration and code complexity. Changes: - Removed `ResponseRules` from backend-config destination definition types and eliminated all references. - Removed the router destination response handler plumbing (and deleted the legacy handler + its tests). - Updated affected tests and JSON/YAML fixtures/templates to drop `responseRules`. Related Integrations Config cleanup: rudderlabs/rudder-integrations-config#2310 ## Linear Ticket - Resolves https://linear.app/rudderstack/issue/INT-5687/cleanup-responserules ## Security - [x] The code changed/added as part of this pull request won't create any security issues with how the software is being used. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes the unused destination response-rules path and simplifies routing. > > - Drops `responseRules` from backend config: removes `DestinationDefinitionT.ResponseRules` and all references > - Deletes legacy router response handler (`router/destinationReponseHandler.go` and tests) and removes related wiring from router init/lifecycle and worker response processing > - Updates affected tests and JSON/YAML fixtures to exclude `responseRules`; adjusts structs and test payloads accordingly > - Minor signature/field cleanups (e.g., `prepareRouterJobResponses`), with corresponding callsites updated > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 71af0d8. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent a80db01 commit a91b2b0

28 files changed

+23
-330
lines changed

app/cluster/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func TestDynamicClusterManager(t *testing.T) {
8080
workspaceID = uuid.New().String()
8181
gaDestinationDefinition = backendConfig.DestinationDefinitionT{
8282
ID: GADestinationDefinitionID, Name: "GA",
83-
DisplayName: "Google Analytics", Config: nil, ResponseRules: nil,
83+
DisplayName: "Google Analytics", Config: nil,
8484
}
8585
sampleBackendConfig = backendConfig.ConfigT{
8686
WorkspaceID: workspaceID,

backend-config/testdata/sample_namespace.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@
396396
}
397397
}
398398
},
399-
"responseRules": null,
400399
"options": null,
401400
"id": "1Q8kZOyJE87ECoQ8kc26TOpgpXl",
402401
"name": "GA",
@@ -814,7 +813,6 @@
814813
}
815814
}
816815
},
817-
"responseRules": null,
818816
"options": null,
819817
"id": "1Q8kZOyJE87ECoQ8kc26TOpgpXl",
820818
"name": "GA",
@@ -952,7 +950,6 @@
952950
}
953951
}
954952
},
955-
"responseRules": null,
956953
"options": null,
957954
"id": "1ZDvxpIGSOU9pLRavMf0GuVnWV3",
958955
"name": "WEBHOOK",

backend-config/types.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ const (
3737
)
3838

3939
type DestinationDefinitionT struct {
40-
ID string
41-
Name string
42-
DisplayName string
43-
Config map[string]interface{}
44-
ResponseRules map[string]interface{}
40+
ID string
41+
Name string
42+
DisplayName string
43+
Config map[string]interface{}
4544
}
4645

4746
type SourceDefinitionT struct {

integration_test/docker_test/testdata/workspaceConfigTemplate.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
"saveDestinationResponse": false
7474
},
7575
"configSchema": null,
76-
"responseRules": null,
7776
"id": "xxxyyyzzSOU9pLRavMf0GuVnWV3",
7877
"name": "WEBHOOK",
7978
"displayName": "Webhook",
@@ -457,7 +456,6 @@
457456
},
458457
"additionalProperties": true
459458
},
460-
"responseRules": null,
461459
"id": "xxxyyyzzNdkvBTzotNh0zta5jDm",
462460
"name": "POSTGRES",
463461
"displayName": "Postgres",
@@ -533,7 +531,6 @@
533531
"saveDestinationResponse": true
534532
},
535533
"configSchema": null,
536-
"responseRules": {},
537534
"id": "xxxyyyzzl28zT3nxr8SWZp6xaWT",
538535
"name": "REDIS",
539536
"displayName": "Redis",
@@ -615,7 +612,6 @@
615612
"saveDestinationResponse": true
616613
},
617614
"configSchema": null,
618-
"responseRules": null,
619615
"id": "xxxyyyzzsyAyCQ2QIxrKU9X5AoR",
620616
"name": "KAFKA",
621617
"displayName": "Apache Kafka",
@@ -684,7 +680,6 @@
684680
"saveDestinationResponse": false
685681
},
686682
"configSchema": null,
687-
"responseRules": null,
688683
"id": "xxxyyyzzSOU9pLRavMf0GuVnWV3",
689684
"name": "WEBHOOK",
690685
"displayName": "Webhook",

processor/internal/transformer/destination_transformer/embedded/warehouse/benchmark/deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ spec:
120120
"ID": "",
121121
"Name": "POSTGRES",
122122
"DisplayName": "",
123-
"Config": null,
124-
"ResponseRules": null
123+
"Config": null
125124
},
126125
"Config": {
127126
"allowUsersContextTraits": true

processor/internal/transformer/user_transformer/user_transformer_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -785,9 +785,8 @@ func TestTransformerEvent_ToUserTransformerEvent(t *testing.T) {
785785
"key3": []interface{}{"value"},
786786
},
787787
DestinationDefinition: backendconfig.DestinationDefinitionT{
788-
Name: "destination-definition-name",
789-
Config: map[string]interface{}{},
790-
ResponseRules: map[string]interface{}{},
788+
Name: "destination-definition-name",
789+
Config: map[string]interface{}{},
791790
},
792791
},
793792
},
@@ -828,9 +827,8 @@ func TestTransformerEvent_ToUserTransformerEvent(t *testing.T) {
828827
"key3": []interface{}{"value"},
829828
},
830829
DestinationDefinition: backendconfig.DestinationDefinitionT{
831-
Name: "destination-definition-name",
832-
Config: map[string]interface{}{},
833-
ResponseRules: map[string]interface{}{},
830+
Name: "destination-definition-name",
831+
Config: map[string]interface{}{},
834832
},
835833
},
836834
},

processor/testdata/goldenUtMirrorClientEvents.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
"ID": "enabled-destination-b-definition-id",
3939
"Name": "MINIO",
4040
"DisplayName": "enabled-destination-b-definition-display-name",
41-
"Config": {},
42-
"ResponseRules": null
41+
"Config": {}
4342
},
4443
"Config": null,
4544
"Enabled": true,
@@ -103,8 +102,7 @@
103102
"ID": "enabled-destination-b-definition-id",
104103
"Name": "MINIO",
105104
"DisplayName": "enabled-destination-b-definition-display-name",
106-
"Config": {},
107-
"ResponseRules": null
105+
"Config": {}
108106
},
109107
"Config": null,
110108
"Enabled": true,
@@ -166,8 +164,7 @@
166164
"ID": "enabled-destination-b-definition-id",
167165
"Name": "MINIO",
168166
"DisplayName": "enabled-destination-b-definition-display-name",
169-
"Config": {},
170-
"ResponseRules": null
167+
"Config": {}
171168
},
172169
"Config": null,
173170
"Enabled": true,

processor/testdata/procIsolationTestTemplate.json.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
"saveDestinationResponse": false
7777
},
7878
"configSchema": null,
79-
"responseRules": null,
8079
"id": "xxxyyyzzSOU9pLRavMf0GuVnWV3",
8180
"name": "WEBHOOK",
8281
"displayName": "Webhook",

processor/testdata/procProcessingDelayTestTemplate.json.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"saveDestinationResponse": false
7575
},
7676
"configSchema": null,
77-
"responseRules": null,
7877
"id": "xxxyyyzzSOU9pLRavMf0GuVnWV3",
7978
"name": "WEBHOOK",
8079
"displayName": "Webhook",

router/batchrouter/batchrouter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const (
5959

6060
var testTimeout = 10 * time.Second
6161

62-
var s3DestinationDefinition = backendconfig.DestinationDefinitionT{ID: S3DestinationDefinitionID, Name: "S3", DisplayName: "S3", Config: nil, ResponseRules: nil}
62+
var s3DestinationDefinition = backendconfig.DestinationDefinitionT{ID: S3DestinationDefinitionID, Name: "S3", DisplayName: "S3", Config: nil}
6363

6464
var workspaceID = `workspaceID`
6565

0 commit comments

Comments
 (0)