Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Browse files Browse the repository at this point in the history
…to dependabot/npm_and_yarn/aws-sdk/client-personalize-3.616.0
  • Loading branch information
Sai Sankeerth committed Jul 25, 2024
2 parents 23f70b2 + 99123f1 commit b6fa98f
Show file tree
Hide file tree
Showing 176 changed files with 12,382 additions and 1,200 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build-push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ jobs:
fetch-depth: 1

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
uses: docker/setup-buildx-action@v3.4.0

- name: Login to DockerHub
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3.2.0
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Build Docker Image
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6.4.1
with:
context: .
file: ${{ inputs.dockerfile }}
Expand All @@ -67,7 +67,7 @@ jobs:
docker run ${{ inputs.build_tag }} npm run test:ts:ci
- name: Build and Push Multi-platform Images
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6.4.1
with:
context: .
file: ${{ inputs.dockerfile }}
Expand All @@ -93,16 +93,16 @@ jobs:
fetch-depth: 1

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
uses: docker/setup-buildx-action@v3.4.0

- name: Login to DockerHub
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3.2.0
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Build Docker Image
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6.4.1
with:
context: .
file: ${{ inputs.dockerfile }}
Expand All @@ -118,7 +118,7 @@ jobs:
docker run ${{ inputs.build_tag }} npm run test:ts:ci
- name: Build and Push Multi-platform Images
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v6.4.1
with:
context: .
file: ${{ inputs.dockerfile }}
Expand All @@ -140,10 +140,10 @@ jobs:

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
uses: docker/setup-buildx-action@v3.4.0

- name: Login to DockerHub
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3.2.0
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fetch-depth: 0

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].3
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/component-test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fetch-depth: 1

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dt-test-and-report-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 1

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fetch-depth: 0

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ut-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
go-version: 1.17

Expand All @@ -26,7 +26,7 @@ jobs:
fetch-depth: 1

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-server-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fetch-depth: 1

- name: Setup Node
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Setup Node
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4.0.3
with:
node-version-file: .nvmrc
cache: 'npm'
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.72.3](https://github.com/rudderlabs/rudder-transformer/compare/v1.72.2...v1.72.3) (2024-07-24)


### Bug Fixes

* add validation for cordial destination ([#3599](https://github.com/rudderlabs/rudder-transformer/issues/3599)) ([b7860a5](https://github.com/rudderlabs/rudder-transformer/commit/b7860a5b2b87fb61aaff8c68a904ac996d63efd3))
* update getConversionActionId function for gaoc ([#3594](https://github.com/rudderlabs/rudder-transformer/issues/3594)) ([68367f5](https://github.com/rudderlabs/rudder-transformer/commit/68367f5227c96f2700a773018b991b1e87a0774d))

### [1.72.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.72.1...v1.72.2) (2024-07-23)

### [1.72.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.72.0...v1.72.1) (2024-07-23)


### Bug Fixes

* garl get auth err category ([#3590](https://github.com/rudderlabs/rudder-transformer/issues/3590)) ([475ebc1](https://github.com/rudderlabs/rudder-transformer/commit/475ebc104c69a52eaa425a9ed564ea9aca1ecd9c))

## [1.72.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.71.3...v1.72.0) (2024-07-22)


### Features

* add support for subscribing for RETL flow ([#3195](https://github.com/rudderlabs/rudder-transformer/issues/3195)) ([cc56004](https://github.com/rudderlabs/rudder-transformer/commit/cc560044ceb769da1f0090da4f690933552b6347))
* braze source event mapping ([#3527](https://github.com/rudderlabs/rudder-transformer/issues/3527)) ([e357141](https://github.com/rudderlabs/rudder-transformer/commit/e357141d22e5296b6d1cda2e763ac24abfcb66e6))
* introduces new user fields in titkok ads ([#3575](https://github.com/rudderlabs/rudder-transformer/issues/3575)) ([6304abb](https://github.com/rudderlabs/rudder-transformer/commit/6304abb2346f331b78e927b73e7c2ca17e94f4cf))
* onboard cordial destination ([#3581](https://github.com/rudderlabs/rudder-transformer/issues/3581)) ([fbcdcd6](https://github.com/rudderlabs/rudder-transformer/commit/fbcdcd609888150efa0da33eec60a4cc7b436d06))
* onboarding new destination zoho ([#3555](https://github.com/rudderlabs/rudder-transformer/issues/3555)) ([20aa7f3](https://github.com/rudderlabs/rudder-transformer/commit/20aa7f35e13ad89e8a43fbbb743df73b0c103975)), closes [#3566](https://github.com/rudderlabs/rudder-transformer/issues/3566)
* update webhook destination to support all datatypes ([#3541](https://github.com/rudderlabs/rudder-transformer/issues/3541)) ([448f574](https://github.com/rudderlabs/rudder-transformer/commit/448f57484c57d4a55147e9566149c8b714a191c9))


### Bug Fixes

* add optional chaining to webengage page event ([#3570](https://github.com/rudderlabs/rudder-transformer/issues/3570)) ([20205d6](https://github.com/rudderlabs/rudder-transformer/commit/20205d66298f5633d3971888f0866db2c38a50e2))
* add validation for type in google pubsub ([#3578](https://github.com/rudderlabs/rudder-transformer/issues/3578)) ([1bef212](https://github.com/rudderlabs/rudder-transformer/commit/1bef2126a75324598c2af0ecaffcf582f038af11))
* adding readiness probe annotations for openfaas ([#3529](https://github.com/rudderlabs/rudder-transformer/issues/3529)) ([2eb92e3](https://github.com/rudderlabs/rudder-transformer/commit/2eb92e3332ef0e8b2f83621fe0130fbc1356fa91))
* **gainsight:** replace myAxios utility with handleHttpRequest utility ([#3241](https://github.com/rudderlabs/rudder-transformer/issues/3241)) ([04be1aa](https://github.com/rudderlabs/rudder-transformer/commit/04be1aaf438f824ddf61fc2f4d13eb7d8a223a9d))
* job ordering for hs ([#3319](https://github.com/rudderlabs/rudder-transformer/issues/3319)) ([f840d54](https://github.com/rudderlabs/rudder-transformer/commit/f840d54dcbdc011eeb716dce74f2ecb36e99d0e9))
* update authErrorCategory for 2 step verification issue for google ads destinations ([#3552](https://github.com/rudderlabs/rudder-transformer/issues/3552)) ([5a0392e](https://github.com/rudderlabs/rudder-transformer/commit/5a0392ee24301486b7973531be28f8178ef03eab))
* update python transformation fn ([#3491](https://github.com/rudderlabs/rudder-transformer/issues/3491)) ([f363f35](https://github.com/rudderlabs/rudder-transformer/commit/f363f3512f690e0745165f46587efdbe88f48683))

### [1.71.3](https://github.com/rudderlabs/rudder-transformer/compare/v1.71.2...v1.71.3) (2024-07-15)


Expand Down
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ src/features.json @rudderlabs/integrations
constants/ @rudderlabs/integrations
warehouse/ @rudderlabs/warehouse
src/util/ @rudderlabs/integrations @rudderlabs/data-management
*/trackingPlan.ts @rudderlabs/data-management
*/userTransform.ts @rudderlabs/data-management
**/trackingPlan.ts @rudderlabs/data-management
**/userTransform.ts @rudderlabs/data-management
2 changes: 2 additions & 0 deletions go/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
go.work
go.work.sum
23 changes: 23 additions & 0 deletions go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# GO libraries

## webhook/testdata

To generate the test files use:

```bash
go generate ./...
```

Work against local rudder-server:

```bash
go work init
go work use .
go work use ../../rudder-server
```

Then run the webhook tests:

```bash
go test github.com/rudderlabs/rudder-server/gateway/webhook -count 1 -timeout 2m
```
11 changes: 11 additions & 0 deletions go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module github.com/rudderlabs/rudder-transformer/go

go 1.22.4

require github.com/stretchr/testify v1.9.0

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
9 changes: 9 additions & 0 deletions go/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
99 changes: 99 additions & 0 deletions go/webhook/testcases/testcases.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package testcases

import (
"embed"
"encoding/json"
"io/fs"
"testing"
"time"

"github.com/stretchr/testify/require"
)

type Setup struct {
Context Context
Cases []Case
}

type Context struct {
Now time.Time
RequestIP string `json:"request_ip"`
}

type Case struct {
Name string
Description string
Skip string
Input Input
Output Output
}

type Input struct {
Request Request
}
type Request struct {
Method string
RawQuery string `json:"query"`
Headers map[string]string
Body json.RawMessage
}

type Output struct {
Response Response
Queue []json.RawMessage
ErrQueue []json.RawMessage `json:"err_queue"`
}

type Response struct {
Body json.RawMessage
StatusCode int `json:"status"`
}

//go:generate npx ts-node ../../../test/scripts/generateJson.ts sources ./testdata/testcases
//go:generate npx prettier --write ./testdata/**/*.json

//go:embed testdata/context.json
var contextData []byte

//go:embed testdata/testcases/**/*.json
var testdata embed.FS

func Load(t *testing.T) Setup {
t.Helper()

var tc Context
err := json.Unmarshal(contextData, &tc)
require.NoError(t, err)

var tcs []Case
err = fs.WalkDir(testdata, ".", func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
}

if d.IsDir() {
return nil
}

f, err := testdata.Open(path)
if err != nil {
return err
}
defer f.Close()

var tc Case
err = json.NewDecoder(f).Decode(&tc)
if err != nil {
return err
}
tcs = append(tcs, tc)

return nil
})
require.NoError(t, err)

return Setup{
Context: tc,
Cases: tcs,
}
}
5 changes: 5 additions & 0 deletions go/webhook/testcases/testdata/context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"request_ip_comment": "192.0.2.x/24 - This block is assigned as \"TEST-NET\" for use in documentation and example code.",
"request_ip": "192.0.2.30",
"now": "2024-03-03T04:48:29.000Z"
}
Loading

0 comments on commit b6fa98f

Please sign in to comment.