From 994baaa8a950948d59cfeaffae8e3c41d45b21a1 Mon Sep 17 00:00:00 2001 From: devops-github-rudderstack <88187154+devops-github-rudderstack@users.noreply.github.com> Date: Tue, 3 Sep 2024 08:12:56 -0500 Subject: [PATCH 1/3] chore: release 1.33.0 (#5047) --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 261947248e..7f9e0a909a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [1.33.0](https://github.com/rudderlabs/rudder-server/compare/v1.32.0...v1.33.0) (2024-09-02) + + +### Features + +* add support for headers to webhooks ([#5018](https://github.com/rudderlabs/rudder-server/issues/5018)) ([15fa31f](https://github.com/rudderlabs/rudder-server/commit/15fa31f4fdbda218ad3d511e1e309cbef42c3f38)) +* onboarding lytics bulk upload ([#5000](https://github.com/rudderlabs/rudder-server/issues/5000)) ([5c38dab](https://github.com/rudderlabs/rudder-server/commit/5c38dabb4d59a060f1243a2f0f1179e00be18d66)) +* remove bugsnag for reporting panics ([#5014](https://github.com/rudderlabs/rudder-server/issues/5014)) ([d68ceb3](https://github.com/rudderlabs/rudder-server/commit/d68ceb3503bbcfd260276ebee1fa6bebe721cea1)) +* stats for schema size ([#5031](https://github.com/rudderlabs/rudder-server/issues/5031)) ([01b84f4](https://github.com/rudderlabs/rudder-server/commit/01b84f422ffffc95e77800b3655d9a5415ee01ce)) + + +### Bug Fixes + +* take tacking plan id from dgsourceTPconfig ([#5041](https://github.com/rudderlabs/rudder-server/issues/5041)) ([f6782c3](https://github.com/rudderlabs/rudder-server/commit/f6782c3a74f9ec1b3fb99fd910d088b9223c504c)) + + +### Miscellaneous + +* add sourceCategory label in event_delivery_time metric ([#5004](https://github.com/rudderlabs/rudder-server/issues/5004)) ([a5adab3](https://github.com/rudderlabs/rudder-server/commit/a5adab32e22a39f2cff50eb1d947ab0ab7a5b6b8)) +* avoid using global config ([#5001](https://github.com/rudderlabs/rudder-server/issues/5001)) ([26228d8](https://github.com/rudderlabs/rudder-server/commit/26228d80522f3ff713bd4e18c857fbb5aa788ecf)) +* avoid using warehouse global config ([26228d8](https://github.com/rudderlabs/rudder-server/commit/26228d80522f3ff713bd4e18c857fbb5aa788ecf)) +* **deps:** bump the go-deps group across 1 directory with 18 updates ([#5038](https://github.com/rudderlabs/rudder-server/issues/5038)) ([c18669b](https://github.com/rudderlabs/rudder-server/commit/c18669b6735d936323d873579c6ab47fcec83ec4)) +* ignore all x-forwarded headers ([#5032](https://github.com/rudderlabs/rudder-server/issues/5032)) ([e832eae](https://github.com/rudderlabs/rudder-server/commit/e832eaede8356634a74e6b370c5eff5a2b6e7a6f)) +* refactor warehouse integration tests ([#5021](https://github.com/rudderlabs/rudder-server/issues/5021)) ([0ca6dbf](https://github.com/rudderlabs/rudder-server/commit/0ca6dbfcd1f316ac91b826e99d9f6ef0c94bb178)) +* sync release v1.32.0 to main branch ([#5010](https://github.com/rudderlabs/rudder-server/issues/5010)) ([3865506](https://github.com/rudderlabs/rudder-server/commit/3865506850836c2bdeaf20c90bd1ab26b5b65bcd)) +* update event_delivery_time histogram buckets for warehouse ([#5015](https://github.com/rudderlabs/rudder-server/issues/5015)) ([983403c](https://github.com/rudderlabs/rudder-server/commit/983403cf74a65bdcb7a8ba7953f15567141fadad)) +* update rudder-go-kit port binding ([#4998](https://github.com/rudderlabs/rudder-server/issues/4998)) ([5327d44](https://github.com/rudderlabs/rudder-server/commit/5327d4413e8aa92ab737243bb45c5971a39e5db8)) + ## [1.32.0](https://github.com/rudderlabs/rudder-server/compare/v1.31.0...v1.32.0) (2024-08-19) From 56eca3475e24ab9ba12624d2b4015c9d15be7249 Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Fri, 6 Sep 2024 14:00:18 +0530 Subject: [PATCH 2/3] fix: revert support for webhook headers (#5064) * fix: revert support for webhook headers * chore: ran go mod tidy --- gateway/webhook/integration_test.go | 20 ++++++++++++-------- gateway/webhook/webhook.go | 20 -------------------- gateway/webhook/webhook_test.go | 6 ------ go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 15 insertions(+), 37 deletions(-) diff --git a/gateway/webhook/integration_test.go b/gateway/webhook/integration_test.go index 6a3ae97c4c..5fc9a07ed3 100644 --- a/gateway/webhook/integration_test.go +++ b/gateway/webhook/integration_test.go @@ -284,14 +284,18 @@ func TestIntegrationWebhook(t *testing.T) { assert.JSONEq(t, string(p), string(batch.Batch[0])) } - r, err = errDB.GetUnprocessed(ctx, jobsdb.GetQueryParams{ - WorkspaceID: workspaceID, - // ParameterFilters: []jobsdb.ParameterFilterT{{ - // Name: "source_id", - // Value: sourceID, - // }}, - JobsLimit: 1, - }) + require.Eventually(t, func() bool { + r, err = errDB.GetUnprocessed(ctx, jobsdb.GetQueryParams{ + WorkspaceID: workspaceID, + ParameterFilters: []jobsdb.ParameterFilterT{{ + Name: "source_id", + Value: sourceID, + }}, + JobsLimit: 1, + }) + return err == nil && len(r.Jobs) == len(tc.Output.ErrQueue) + }, time.Second, time.Millisecond*10) + require.NoError(t, err) assert.Len(t, r.Jobs, len(tc.Output.ErrQueue)) for i, p := range tc.Output.ErrQueue { diff --git a/gateway/webhook/webhook.go b/gateway/webhook/webhook.go index ccd6fc9bbf..fd05420eaf 100644 --- a/gateway/webhook/webhook.go +++ b/gateway/webhook/webhook.go @@ -269,17 +269,6 @@ func (webhook *HandleT) batchRequests(sourceDef string, requestQ chan *webhookT) } } -func getXHeaders(req *http.Request) map[string]string { - xHeaders := make(map[string]string) - for key, values := range req.Header { - lowerCaseKey := strings.ToLower(key) - if !strings.HasPrefix(lowerCaseKey, "x-forwarded-") && strings.HasPrefix(lowerCaseKey, "x-") { - xHeaders[key] = strings.Join(values, ",") - } - } - return xHeaders -} - func prepareRequestBody(req *http.Request, sourceType string, sourceListForParsingParams []string) ([]byte, error) { defer func() { _ = req.Body.Close() @@ -303,15 +292,6 @@ func prepareRequestBody(req *http.Request, sourceType string, sourceListForParsi } } - xHeaders := getXHeaders(req) - if len(xHeaders) > 0 { - body, err = sjson.SetBytes(body, "headers", xHeaders) - if err != nil { - return nil, errors.New(response.InvalidJSON) - } - - } - return body, nil } diff --git a/gateway/webhook/webhook_test.go b/gateway/webhook/webhook_test.go index 7774f651f2..5fa7a64028 100644 --- a/gateway/webhook/webhook_test.go +++ b/gateway/webhook/webhook_test.go @@ -549,12 +549,6 @@ func TestPrepareRequestBody(t *testing.T) { sourceType: "shopify", expectedResponse: `{"key":"value","query_parameters":{}}`, }, - { - name: "Some payload with headers for shopify", - req: createRequest(requestOpts{method: http.MethodPost, target: "http://example.com", body: strings.NewReader(`{"key":"value"}`), headers: map[string]string{"X-Key": "header-value"}}), - sourceType: "shopify", - expectedResponse: `{"key":"value","query_parameters":{},"headers":{"X-Key":"header-value"}}`, - }, { name: "Some payload with query parameters for Adjust", req: createRequest(requestOpts{method: http.MethodPost, target: "http://example.com", body: strings.NewReader(`{"key1":"value1"}`), params: map[string]string{"key2": "value2"}}), diff --git a/go.mod b/go.mod index 6322503170..635bcb02b8 100644 --- a/go.mod +++ b/go.mod @@ -80,7 +80,7 @@ require ( github.com/rudderlabs/rudder-go-kit v0.38.0 github.com/rudderlabs/rudder-observability-kit v0.0.3 github.com/rudderlabs/rudder-schemas v0.5.1 - github.com/rudderlabs/rudder-transformer/go v0.0.0-20240812044419-23196ec42acf + github.com/rudderlabs/rudder-transformer/go v0.0.0-20240906042448-f7783d8fb300 github.com/rudderlabs/sql-tunnels v0.1.7 github.com/rudderlabs/sqlconnect-go v1.9.0 github.com/samber/lo v1.47.0 diff --git a/go.sum b/go.sum index b1b5631f28..d56b43fbdf 100644 --- a/go.sum +++ b/go.sum @@ -1134,8 +1134,8 @@ github.com/rudderlabs/rudder-observability-kit v0.0.3 h1:vZtuZRkGX+6rjaeKtxxFE2Y github.com/rudderlabs/rudder-observability-kit v0.0.3/go.mod h1:6UjAh3H6rkE0fFLh7z8ZGQEQbKtUkRfhWOf/OUhfqW8= github.com/rudderlabs/rudder-schemas v0.5.1 h1:g4I5wp2yA6ZWQZ1MjSNn4zby3XctG/TOgbYUW3dS4z4= github.com/rudderlabs/rudder-schemas v0.5.1/go.mod h1:JoDTB9nCDXwRz+G+aYwP3Fj42HLssKARxsFFm+qqgb4= -github.com/rudderlabs/rudder-transformer/go v0.0.0-20240812044419-23196ec42acf h1:nsU2tKjPV/sbmOoIk39ncFT8D5HBDVppmrCWO0v9HsU= -github.com/rudderlabs/rudder-transformer/go v0.0.0-20240812044419-23196ec42acf/go.mod h1:3NGitPz4pYRRZ6Xt09S+8hb0tHK/9pZcKJ3OgOTaSmE= +github.com/rudderlabs/rudder-transformer/go v0.0.0-20240906042448-f7783d8fb300 h1:SmOLUqSCCcYs8QXYdZlHXCSCw77xhQ6qjNBsSA3bDKI= +github.com/rudderlabs/rudder-transformer/go v0.0.0-20240906042448-f7783d8fb300/go.mod h1:3NGitPz4pYRRZ6Xt09S+8hb0tHK/9pZcKJ3OgOTaSmE= github.com/rudderlabs/sql-tunnels v0.1.7 h1:wDCRl6zY4M5gfWazf7XkSTGQS3yjBzUiUgEMBIfHNDA= github.com/rudderlabs/sql-tunnels v0.1.7/go.mod h1:5f7+YL49JHYgteP4rAgqKnr4K2OadB0oIpUS+Tt3sPM= github.com/rudderlabs/sqlconnect-go v1.9.0 h1:icLgqvVQ15Vh+oP7epA0b0yK6sIzxRVwPlRzOoDNVRA= From c8499223fa546206b38926242463d606054eafd8 Mon Sep 17 00:00:00 2001 From: devops-github-rudderstack <88187154+devops-github-rudderstack@users.noreply.github.com> Date: Mon, 9 Sep 2024 02:25:06 -0500 Subject: [PATCH 3/3] chore: release 1.33.1 (#5065) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f9e0a909a..1aafa99c98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.33.1](https://github.com/rudderlabs/rudder-server/compare/v1.33.0...v1.33.1) (2024-09-06) + + +### Bug Fixes + +* revert support for webhook headers ([#5064](https://github.com/rudderlabs/rudder-server/issues/5064)) ([56eca34](https://github.com/rudderlabs/rudder-server/commit/56eca3475e24ab9ba12624d2b4015c9d15be7249)) + ## [1.33.0](https://github.com/rudderlabs/rudder-server/compare/v1.32.0...v1.33.0) (2024-09-02)