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(router): panic sources grouped together #1846

Merged
merged 2 commits into from Apr 13, 2022

Conversation

fracasula
Copy link
Collaborator

@fracasula fracasula commented Apr 13, 2022

Description of the change

I was able to replicate the panic mentioned in the Notion ticket and noticed that the comparison with the source ID in each destination was done considering only the first sourceID encountered (i.e. sourceID := destinationJob.JobMetadataArray[0].SourceID) which made the following code fail.

Then I also realized that the sourceID is not really used by SendData so there shouldn't be a bug there. To make it more clear I dropped sourceID altogether.

Notion Link

Notion Link

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit tests for the code
  • I have made corresponding changes to the documentation

Security

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

@fracasula fracasula marked this pull request as ready for review April 13, 2022 08:51
@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #1846 (fd2b825) into master (cd32fb7) will increase coverage by 0.04%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #1846      +/-   ##
==========================================
+ Coverage   24.26%   24.30%   +0.04%     
==========================================
  Files         122      122              
  Lines       24336    24347      +11     
==========================================
+ Hits         5904     5918      +14     
+ Misses      18088    18085       -3     
  Partials      344      344              
Impacted Files Coverage Δ
...stomdestinationmanager/customdestinationmanager.go 0.00% <0.00%> (ø)
router/router.go 64.10% <52.94%> (+0.13%) ⬆️
gateway/gateway.go 48.55% <0.00%> (+0.20%) ⬆️
services/debugger/uploader.go 100.00% <0.00%> (+4.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd32fb7...fd2b825. Read the comment docs.

@cisse21
Copy link
Member

cisse21 commented Apr 13, 2022

LGTM

Copy link
Contributor

@atzoum atzoum left a comment

Choose a reason for hiding this comment

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

My only comment is about the pull request's title

@fracasula fracasula changed the title Fix.panic sources grouped together fix: panic sources grouped together Apr 13, 2022
@fracasula fracasula changed the title fix: panic sources grouped together fix(router): panic sources grouped together Apr 13, 2022
@fracasula fracasula merged commit 69344c6 into master Apr 13, 2022
@fracasula fracasula deleted the fix.panicSourcesGroupedTogether branch April 13, 2022 11:06
This was referenced Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants