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

🐛🎨 Fixes formatting error in payments and enhances logging and error handling #5037

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Nov 16, 2023

What do these changes do?

A fix, some refactoring and a series of improvements specially in error handling and logging based on manual exploratory testing of payments workflows

  • 🐛 Fixes wrong formatting in PaymentsGatewayError
  • ✨ new liveness probes (only functionality)
  • ♻️ refactored payments rpc. Uses implementation in services.payments
  • 🎨 adds rpc for list-payments
  • 🎨 improved logging in rpc init&pay flows
  • 🎨 Improved error handling on payments-gateway

Related issue/s

How to test

Driving tests

  • packages/service-library/tests/fastapi/test_http_client.py
  • services/payments/tests/unit/test_services_payments_gateway.py
  • services/payments/tests/unit/api/test__one_time_payment_workflows.py

Dev Checklist

DevOps

None

@pcrespov pcrespov self-assigned this Nov 16, 2023
@pcrespov pcrespov added the a:payments payments service label Nov 16, 2023
@pcrespov pcrespov added this to the 7peaks milestone Nov 16, 2023
Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Merging #5037 (f171caa) into master (8f207be) will decrease coverage by 4.1%.
The diff coverage is 70.4%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5037      +/-   ##
=========================================
- Coverage    86.4%   82.3%    -4.1%     
=========================================
  Files        1256     528     -728     
  Lines       51552   21170   -30382     
  Branches     1108     540     -568     
=========================================
- Hits        44547   17431   -27116     
+ Misses       6766    3617    -3149     
+ Partials      239     122     -117     
Flag Coverage Δ
integrationtests 75.3% <ø> (+15.8%) ⬆️
unittests 86.6% <70.4%> (+1.5%) ⬆️

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

Files Coverage Δ
.../src/simcore_service_payments/api/rpc/_payments.py 100.0% <100.0%> (+6.5%) ⬆️
...core_service_payments/api/rpc/_payments_methods.py 100.0% <100.0%> (ø)
.../src/simcore_service_payments/services/payments.py 93.7% <100.0%> (+21.8%) ⬆️
...core_service_payments/services/payments_gateway.py 99.0% <95.4%> (+1.2%) ⬆️
.../models-library/src/models_library/healthchecks.py 83.3% <83.3%> (ø)
.../src/simcore_service_payments/services/postgres.py 77.4% <36.3%> (-22.6%) ⬇️
.../simcore_service_payments/services/healthchecks.py 0.0% <0.0%> (ø)

... and 815 files with indirect coverage changes

@pcrespov pcrespov force-pushed the is4657/payment-liveness-probes branch from cf2e12f to f3e4704 Compare November 17, 2023 00:57
@pcrespov pcrespov changed the title WIP: 🎨 Is4657/payment liveness probes 🐛🎨 Fixes formatting error in payments and enhances logging and error handling Nov 17, 2023
@pcrespov pcrespov marked this pull request as ready for review November 17, 2023 00:59
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 nice! thanks.

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

👍

@pcrespov pcrespov force-pushed the is4657/payment-liveness-probes branch from c1f797e to 5d7ce09 Compare November 17, 2023 14:14
@pcrespov pcrespov requested a review from GitHK November 17, 2023 14:19
Copy link

codeclimate bot commented Nov 17, 2023

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

View more on Code Climate.

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.4% 0.4% Duplication

@pcrespov pcrespov enabled auto-merge (squash) November 17, 2023 15:53
@pcrespov pcrespov merged commit 58eb4fd into ITISFoundation:master Nov 17, 2023
55 checks passed
@pcrespov pcrespov deleted the is4657/payment-liveness-probes branch November 17, 2023 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:payments payments service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants