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

✨ introduce rabbit exchange for reaching 0 credits #4887

Conversation

matusdrobuliak66
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 commented Oct 18, 2023

What do these changes do?

  • ✨ RUT publish to rabbit exchange when wallet credits reach 0 credits
  • BONUS: 🐛 Correctly store project_name to the service run table (before we stored product_name)

Related issue/s

How to test

cd services/resource-usage-tracker
make install-dev
pytest tests/unit/with_dbs/test_process_rabbitmq_message_with_billing.py

DevOps Checklist

@matusdrobuliak66 matusdrobuliak66 self-assigned this Oct 18, 2023
@matusdrobuliak66 matusdrobuliak66 added this to the Microhistory milestone Oct 18, 2023
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #4887 (e9b5d9e) into master (90a73d7) will decrease coverage by 1.5%.
The diff coverage is 95.1%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #4887     +/-   ##
========================================
- Coverage    86.8%   85.4%   -1.5%     
========================================
  Files        1191    1000    -191     
  Lines       49660   44761   -4899     
  Branches     1072     532    -540     
========================================
- Hits        43142   38249   -4893     
- Misses       6283    6393    +110     
+ Partials      235     119    -116     
Flag Coverage Δ
integrationtests 65.1% <ø> (-0.1%) ⬇️
unittests 84.9% <95.1%> (+0.3%) ⬆️

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

Files Coverage Δ
...racker/modules/db/repositories/resource_tracker.py 83.9% <100.0%> (+7.6%) ⬆️
...usage_tracker/resource_tracker_process_messages.py 90.9% <100.0%> (+0.2%) ⬆️
...e_resource_usage_tracker/resource_tracker_utils.py 100.0% <100.0%> (ø)
..._tracker/services/resource_tracker_service_runs.py 92.8% <ø> (ø)
...ls-library/src/models_library/rabbitmq_messages.py 89.6% <86.6%> (-0.4%) ⬇️

... and 251 files with indirect coverage changes

@matusdrobuliak66 matusdrobuliak66 marked this pull request as ready for review October 18, 2023 19:20
@matusdrobuliak66 matusdrobuliak66 changed the title WIP: ✨ introduce rabbit exchange for reaching 0 credits ✨ introduce rabbit exchange for reaching 0 credits Oct 18, 2023
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

thx!

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.

Very good, but please have a look at my comments, there are a few questions.

GitHK

This comment was marked as off-topic.

@matusdrobuliak66 matusdrobuliak66 enabled auto-merge (squash) October 23, 2023 09:31
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codeclimate
Copy link

codeclimate bot commented Oct 23, 2023

Code Climate has analyzed commit e9b5d9e and detected 0 issues on this pull request.

View more on Code Climate.

@matusdrobuliak66 matusdrobuliak66 merged commit a48e192 into ITISFoundation:master Oct 23, 2023
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Oct 31, 2023
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.

4 participants