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

chore: sync release v1.39.3 to main branch #5393

Merged
merged 7 commits into from
Dec 23, 2024
Merged
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
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
Loading