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: rsources dropped jobs at processor #3905

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

Sidddddarth
Copy link
Member

@Sidddddarth Sidddddarth commented Sep 22, 2023

Description

fix for recent r-sources dropped jobs PR

Linear Ticket

Ensure drop events are marked as failed in source [job-status endpoint]

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

failedJobs, failedMetrics, failedCountMap := proc.getFailedEventJobs(response, commonMetaData, eventsByMessageID, transformer.EventFilterStage, transformationEnabled, trackingPlanEnabled)
droppedJobs = append(droppedJobs, append(proc.getDroppedJobs(response, eventsToTransform), failedJobs...)...)
eventsToTransform, successMetrics, successCountMap, successCountMetadataMap = proc.getDestTransformerEvents(response, commonMetaData, eventsByMessageID, destination, transformer.EventFilterStage, trackingPlanEnabled, transformationEnabled)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was that change in order purposeful?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah.
eventsToTransform is modified after a call to proc.getDestTransformerEvents(...).
proc. getDroppedJobs needs the total list of events sent to transformer/event filter.

@@ -2354,6 +2355,7 @@ func (proc *Handle) transformSrcDest(
errorsPerDestID: procErrorJobsByDestID,
reportMetrics: reportMetrics,
routerDestIDs: routerDestIDs,
droppedJobs: droppedJobs,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't we have a test for dropped jobs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed this one😓
will post some more test cases soon.

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02% ⚠️

Comparison is base (be0a62e) 69.16% compared to head (cc07e71) 69.15%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3905      +/-   ##
==========================================
- Coverage   69.16%   69.15%   -0.02%     
==========================================
  Files         353      353              
  Lines       52903    52905       +2     
==========================================
- Hits        36589    36584       -5     
- Misses      13998    14001       +3     
- Partials     2316     2320       +4     
Files Changed Coverage Δ
processor/processor.go 87.39% <100.00%> (+0.01%) ⬆️

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sidddddarth Sidddddarth force-pushed the fix.rsourcesProcessorDroppedJobs branch from 17e1e58 to cc07e71 Compare September 25, 2023 08:37
@Sidddddarth Sidddddarth merged commit 1c4fc5e into master Sep 25, 2023
35 checks passed
@Sidddddarth Sidddddarth deleted the fix.rsourcesProcessorDroppedJobs branch September 25, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants