Skip to content

Commit

Permalink
chore: sync release v1.39.3 to main branch (#5393)
Browse files Browse the repository at this point in the history
  • Loading branch information
devops-github-rudderstack authored Dec 23, 2024
1 parent 471d492 commit b417005
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.39.3](https://github.com/rudderlabs/rudder-server/compare/v1.39.2...v1.39.3) (2024-12-23)


### Bug Fixes

* replay tracking plan bug ([#5389](https://github.com/rudderlabs/rudder-server/issues/5389)) ([74056f8](https://github.com/rudderlabs/rudder-server/commit/74056f8211b3ed5b4c3d0485753401371bc53751))

## [1.39.2](https://github.com/rudderlabs/rudder-server/compare/v1.39.1...v1.39.2) (2024-12-18)


Expand Down
31 changes: 15 additions & 16 deletions processor/trackingplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func (proc *Handle) validateEvents(groupedEventsBySourceId map[SourceIDT][]trans
continue
}

transformerEvent := eventList[0]
destination := &transformerEvent.Destination
commonMetaData := makeCommonMetadataFromTransformerEvent(&transformerEvent)

validationStart := time.Now()
response := proc.transformer.Validate(context.TODO(), eventList, proc.config.userTransformBatchSize.Load())
validationStat.tpValidationTime.Since(validationStart)
Expand All @@ -103,15 +107,9 @@ func (proc *Handle) validateEvents(groupedEventsBySourceId map[SourceIDT][]trans
}

enhanceWithViolation(response, eventList[0].Metadata.TrackingPlanID, eventList[0].Metadata.TrackingPlanVersion)

transformerEvent := eventList[0]
destination := &transformerEvent.Destination
sourceID := transformerEvent.Metadata.SourceID
commonMetaData := makeCommonMetadataFromTransformerEvent(&transformerEvent)

// Set trackingPlanEnabledMap for the sourceID to true.
// This is being used to distinguish the flows in reporting service
trackingPlanEnabledMap[SourceIDT(sourceID)] = true
trackingPlanEnabledMap[sourceId] = true

var successMetrics []*types.PUReportedMetric
eventsToTransform, successMetrics, _, _ := proc.getTransformerEvents(response, commonMetaData, eventsByMessageID, destination, backendconfig.Connection{}, types.DESTINATION_FILTER, types.TRACKINGPLAN_VALIDATOR) // Note: Sending false for usertransformation enabled is safe because this stage is before user transformation.
Expand Down Expand Up @@ -146,15 +144,16 @@ func (proc *Handle) validateEvents(groupedEventsBySourceId map[SourceIDT][]trans
func makeCommonMetadataFromTransformerEvent(transformerEvent *transformer.TransformerEvent) *transformer.Metadata {
metadata := transformerEvent.Metadata
commonMetaData := transformer.Metadata{
SourceID: metadata.SourceID,
SourceName: metadata.SourceName,
SourceType: metadata.SourceType,
SourceCategory: metadata.SourceCategory,
WorkspaceID: metadata.WorkspaceID,
Namespace: config.GetKubeNamespace(),
InstanceID: misc.GetInstanceID(),
DestinationID: metadata.DestinationID,
DestinationType: metadata.DestinationType,
SourceID: metadata.SourceID,
SourceName: metadata.SourceName,
SourceType: metadata.SourceType,
SourceCategory: metadata.SourceCategory,
WorkspaceID: metadata.WorkspaceID,
Namespace: config.GetKubeNamespace(),
InstanceID: misc.GetInstanceID(),
DestinationID: metadata.DestinationID,
DestinationType: metadata.DestinationType,
OriginalSourceID: metadata.OriginalSourceID,
}
return &commonMetaData
}
Expand Down

0 comments on commit b417005

Please sign in to comment.