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

[COST-5796] handle Customer.DoesNotExist exception #5431

Merged
merged 8 commits into from
Jan 14, 2025

Conversation

djnakabaale
Copy link
Contributor

@djnakabaale djnakabaale commented Dec 23, 2024

Jira Ticket

COST-5796

Description

This change adds logging for the IntegrityError to troubleshoot Customer.DoesNotExist exception

Testing

  1. Checkout Branch
  2. Restart Koku
  3. Run unit test and see log message
python3 koku/manage.py test koku.test_middleware.IdentityHeaderMiddlewareTest.test_create_customer_integrity_error_existing_customer

Release Notes

  • log IntegrityError to troubleshoot Customer.DoesNotExist exception
* [COST-5796](https://issues.redhat.com/browse/COST-5796) log IntegrityError to troubleshoot Customer.DoesNotExist exception

@djnakabaale djnakabaale added the smoke-tests pr_check will build the image and run minimal required smokes label Dec 23, 2024
@djnakabaale djnakabaale requested review from a team as code owners December 23, 2024 15:18
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.2%. Comparing base (966454e) to head (d272732).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #5431   +/-   ##
=====================================
  Coverage   94.2%   94.2%           
=====================================
  Files        370     370           
  Lines      31537   31539    +2     
  Branches    3378    3378           
=====================================
+ Hits       29696   29699    +3     
+ Misses      1197    1196    -1     
  Partials     644     644           

- update logging
- add unit tests
@djnakabaale djnakabaale changed the title handle Customer.DoesNotExist exception [COST-5796] handle Customer.DoesNotExist exception Jan 3, 2025
koku/koku/middleware.py Outdated Show resolved Hide resolved
koku/koku/middleware.py Outdated Show resolved Hide resolved
@djnakabaale djnakabaale merged commit fd3f76e into main Jan 14, 2025
15 checks passed
@djnakabaale djnakabaale deleted the stage-handle-customer-exception branch January 14, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smoke-tests pr_check will build the image and run minimal required smokes smokes-required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants