Skip to content

Only run processors in decom microservice #1019

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

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Conversation

ryanmelt
Copy link
Member

@ryanmelt ryanmelt commented Jan 7, 2024

closes #838

@ryanmelt ryanmelt requested a review from jmthomas January 7, 2024 22:37
Copy link

codecov bot commented Jan 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b67066d) 75.28% compared to head (e2751d5) 75.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1019      +/-   ##
==========================================
+ Coverage   75.28%   75.31%   +0.02%     
==========================================
  Files         588      588              
  Lines       42990    42990              
  Branches      749      749              
==========================================
+ Hits        32367    32376       +9     
+ Misses      10545    10536       -9     
  Partials       78       78              
Flag Coverage Δ
frontend 55.22% <ø> (+0.09%) ⬆️
python 83.63% <100.00%> (+0.03%) ⬆️
ruby-api 48.69% <ø> (ø)
ruby-backend 80.43% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

sonarqubecloud bot commented Jan 7, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@jmthomas jmthomas left a comment

Choose a reason for hiding this comment

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

See comment:

@@ -100,6 +100,7 @@ def decom_packet(topic, msg_id, msg_hash, _redis)
packet.extra = extra
end
packet.buffer = msg_hash["buffer"]
packet.process # Run processors
Copy link
Member

Choose a reason for hiding this comment

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

So previously they were run on any buffer assignment but not it's only run explicitly. Did processors previously run multiple times in the packet processing chain? What are the side effects of this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

In COSMOS 5, they were being run in both the Interface and the Decom microservices before this change.
Now they will only run once in Decom.
Side effects are if you needed them in the Interface/Protocol for some reason you will need to run them manuallly or add a "runProcessors" Protocol or something.
Now processors can be used for things like sending commands, without having them run twice.

@ryanmelt ryanmelt merged commit 2b1c022 into main Jan 8, 2024
@ryanmelt ryanmelt deleted the processors_in_decom branch January 8, 2024 15:06
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.

Processors should only be executed in the DecomMicroservice, not in the Interface on initial receive.
2 participants