Skip to content
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

fix: add date time support to hs #3906

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/build-push-docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Transformer Docker Image

Check warning on line 1 in .github/workflows/build-push-docker-image.yml

View workflow job for this annotation

GitHub Actions / Check for formatting & lint errors

File ignored by default.

on:
workflow_call:
Expand Down Expand Up @@ -96,15 +96,15 @@
with:
ref: ${{ needs.get_sha.outputs.sha }}
fetch-depth: 1

- name: Setup Docker Buildx
uses: docker/[email protected]


- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Setup Docker Buildx
uses: docker/[email protected]

- name: Build Docker Image
uses: docker/[email protected]
Expand Down Expand Up @@ -149,16 +149,16 @@
with:
ref: ${{ needs.get_sha.outputs.sha }}
fetch-depth: 1

- name: Setup Docker Buildx
uses: docker/[email protected]


- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Setup Docker Buildx
uses: docker/[email protected]

- name: Build Docker Image
uses: docker/[email protected]
with:
Expand Down Expand Up @@ -198,15 +198,15 @@
needs: [build-transformer-image-amd64, build-transformer-image-arm64]

steps:
- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Create multi-arch manifest
run: |
docker buildx imagetools create -t ${{ inputs.push_tags }} ${{ inputs.push_tags }}-amd64 ${{ inputs.push_tags }}-arm64
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

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.86.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.85.1...v1.86.0) (2024-12-09)


### Features

* add support for getting anonymousId by note attributes array ([53d2bef](https://github.com/rudderlabs/rudder-transformer/commit/53d2bef38ad5d7bc5504111ec797b3c3973546dd))
* add support for getting anonymousId by note attributes array ([#3893](https://github.com/rudderlabs/rudder-transformer/issues/3893)) ([d7f390c](https://github.com/rudderlabs/rudder-transformer/commit/d7f390cb471e44afb276484b8b804d1f257c539c))


### Bug Fixes

* braze subscription group fixes ([#3901](https://github.com/rudderlabs/rudder-transformer/issues/3901)) ([ebcf84e](https://github.com/rudderlabs/rudder-transformer/commit/ebcf84e07bf121d882c99df973af265a915a1ce1))
* remove redundant ids and userIdentifier when gbraid or wbraid are there ([#3910](https://github.com/rudderlabs/rudder-transformer/issues/3910)) ([313710c](https://github.com/rudderlabs/rudder-transformer/commit/313710ca725538e5ffe357216d9c88e444f995c8))
* skipping users events for snowpipe streaming ([#3836](https://github.com/rudderlabs/rudder-transformer/issues/3836)) ([12621c8](https://github.com/rudderlabs/rudder-transformer/commit/12621c8eee641f5a03a997e95ed016cff0eefde7))

### [1.85.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.85.0...v1.85.1) (2024-11-21)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder-transformer",
"version": "1.85.1",
"version": "1.86.0",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
1 change: 0 additions & 1 deletion src/v0/destinations/braze/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ const processBatch = (transformedEvents) => {
prepareGroupAndAliasBatch(mergeUsersArrayChunks, responseArray, destination, 'merge');

if (successMetadata.length > 0) {
console.log(`Response 1 batchRequest ${JSON.stringify(responseArray)}`);
finalResponse.push({
batchedRequest: responseArray,
metadata: successMetadata,
Expand Down
4 changes: 4 additions & 0 deletions src/v0/destinations/hs/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@
let propValue = isNull(traits[traitsKey]) ? '' : traits[traitsKey];
if (propertyMap[hsSupportedKey] === 'date') {
propValue = getUTCMidnightTimeStampValue(propValue);
} else if (propertyMap[hsSupportedKey] === 'datetime') {
propValue = new Date(propValue).getTime();

Check warning on line 241 in src/v0/destinations/hs/util.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/hs/util.js#L241

Added line #L241 was not covered by tests
}

rawPayload[hsSupportedKey] = validatePayloadDataTypes(
Expand Down Expand Up @@ -828,6 +830,8 @@
const value = populatedTraits[key];
if (propertyToTypeMap[key] === 'date') {
populatedTraits[key] = getUTCMidnightTimeStampValue(value);
} else if (propertyToTypeMap[key] === 'datetime') {
populatedTraits[key] = new Date(value).getTime();

Check warning on line 834 in src/v0/destinations/hs/util.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/hs/util.js#L834

Added line #L834 was not covered by tests
}
});

Expand Down
Loading