Closed sondrelg closed 2 years ago
Merging #39 (24b5530) into main (0c6fd1e) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## main #39 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 11
Lines 314 353 +39
=========================================
+ Hits 314 353 +39
Impacted Files | Coverage Δ | |
---|---|---|
asgi_correlation_id/middleware.py | 100.00% <100.00%> (ø) |
|
tests/conftest.py | 100.00% <100.00%> (ø) |
|
tests/test_extension_celery.py | 100.00% <100.00%> (ø) |
|
tests/test_middleware.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0c6fd1e...24b5530. Read the comment docs.
Love this! I’ll do a review tomorrow👏
Think this addresses your comments @commentator8. If you have time and want to take another look, feel free 🙏
@sondrelg You covered all my points and it looks good. The extra defensive if on the transformer was a nice touch :)
This is mostly a reimplementation of #15, motivated by #38. It will require us to bump a major version, since we are removing some backwards compatibility, but I think it's for the best.
In short, the PR replaces the built-in uuid4 generation and validation with concepts of:
generator
function to create new ID values when neededvalidator
function to optionally validate incoming header values (and discard failed ones), andtransformer
function to optionally clean header values