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 for pending transactions #5852

Conversation

matusdrobuliak66
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 commented May 22, 2024

What do these changes do?

  • 🐛 In the previous PR, I introduced an option to run the pricing unit with a cost of 0 credits. This PR fixes an issue with the if statement that would evaluate bool(Decimal(0)) as False, which is not intended.

Related issue/s

How to test

services/resource-usage-tracker/tests/unit/with_dbs/test_process_rabbitmq_message_with_billing_cost_0.py

Dev-ops checklist

@matusdrobuliak66 matusdrobuliak66 self-assigned this May 22, 2024
@matusdrobuliak66 matusdrobuliak66 added this to the Leeroy Jenkins milestone May 22, 2024
Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.0%. Comparing base (cafbf96) to head (aff537f).
Report is 219 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5852      +/-   ##
=========================================
- Coverage    84.5%   65.0%   -19.6%     
=========================================
  Files          10     593     +583     
  Lines         214   29515   +29301     
  Branches       25     205     +180     
=========================================
+ Hits          181   19189   +19008     
- Misses         23   10274   +10251     
- Partials       10      52      +42     
Flag Coverage Δ
integrationtests 64.0% <ø> (?)
unittests 87.0% <100.0%> (+2.4%) ⬆️

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

Files Coverage Δ
..._usage_tracker/resource_tracker_background_task.py 95.0% <100.0%> (ø)
...usage_tracker/resource_tracker_process_messages.py 81.2% <100.0%> (ø)

... and 601 files with indirect coverage changes

@matusdrobuliak66 matusdrobuliak66 marked this pull request as ready for review May 22, 2024 19:57
@matusdrobuliak66 matusdrobuliak66 changed the title WIP: 🐛 fix for pending transactions 🐛 fix for pending transactions May 22, 2024
Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Thanks for the fix 😄

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

you do not cover the case where the pricing_unit_cost would be None with this fix. Please check my comment, thanks!

@matusdrobuliak66 matusdrobuliak66 enabled auto-merge (squash) May 23, 2024 09:50
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

@matusdrobuliak66 matusdrobuliak66 merged commit 47408c3 into ITISFoundation:master May 23, 2024
55 checks passed
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 12, 2024
30 tasks
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.

5 participants