Skip to content

Commit

Permalink
chore(release): pull hotfix-release/v1.41.1 into main (#2616)
Browse files Browse the repository at this point in the history
  • Loading branch information
krishna2020 authored Sep 14, 2023
2 parents 9fc4545 + 80beb1e commit 83cba60
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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.41.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.41.0...v1.41.1) (2023-09-14)


### Bug Fixes

* **redis:** add destination_id in the key ([55629d6](https://github.com/rudderlabs/rudder-transformer/commit/55629d6d871d275de601a11ec223e0c283641d7b))

## [1.41.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.40.2...v1.41.0) (2023-09-11)


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.41.0",
"version": "1.41.1",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
7 changes: 4 additions & 3 deletions src/v0/destinations/redis/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const isSubEventTypeProfiles = (message) => {
return sources.profiles_entity && sources.profiles_id_type && sources.profiles_model;
};

const transforrmSubEventTypeProfiles = (message, workspaceId) => {
const transformSubEventTypeProfiles = (message, workspaceId, destinationId) => {
// form the hash
const hash = `${workspaceId}:${message.context.sources.profiles_entity}:${message.context.sources.profiles_id_type}:${message.userId}`;
const hash = `${workspaceId}:${destinationId}:${message.context.sources.profiles_entity}:${message.context.sources.profiles_id_type}:${message.userId}`;
const key = `${message.context.sources.profiles_model}`;
const value = JSON.stringify(message.traits);
return {
Expand All @@ -59,11 +59,12 @@ const process = (event) => {
}

const { prefix } = destination.Config;
const destinationId = destination.ID;
const keyPrefix = isEmpty(prefix) ? '' : `${prefix.trim()}:`;

if (isSubEventTypeProfiles(message)) {
const { workspaceId } = metadata;
return transforrmSubEventTypeProfiles(message, workspaceId);
return transformSubEventTypeProfiles(message, workspaceId, destinationId);
}

const hmap = {
Expand Down
2 changes: 1 addition & 1 deletion test/__tests__/data/redis_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
},
{
"message": {
"hash": "some-workspace-id:some-entity:some-id-type:some-user-id",
"hash": "some-workspace-id:1WhcOCGgj9asZu850HvugU2C3Aq:some-entity:some-id-type:some-user-id",
"key": "some-model",
"value": "{\"MODEL_ID\":\"1691755780\",\"VALID_AT\":\"2023-08-11T11:32:44.963062Z\",\"USER_MAIN_ID\":\"rid5530313526204a95efe71d98cd17d5a1\",\"CHURN_SCORE_7_DAYS\":0.027986,\"PERCENTILE_CHURN_SCORE_7_DAYS\":0}"
},
Expand Down

0 comments on commit 83cba60

Please sign in to comment.