aio-libs / aiobotocore

asyncio support for botocore library using aiohttp
https://aiobotocore.rtfd.io
Apache License 2.0
1.14k stars 179 forks source link

Fix race condition in S3 Express identity cache #1073

Closed jakob-keller closed 7 months ago

jakob-keller commented 7 months ago

Description of Change

A race condition in the S3 Express identity cache was introduced in 110b0a2a. This change modifies the cache to hold asyncio.Task instances instead of actual credentials to mitigate the issue without introducing locking.

Assumptions

Replace this text with any assumptions made (if any)

Checklist for All Submissions

Checklist when updating botocore and/or aiohttp versions

codecov[bot] commented 7 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (110b0a2) 86.13% compared to head (9097884) 86.25%.

Files Patch % Lines
aiobotocore/utils.py 50.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1073 +/- ## ========================================== + Coverage 86.13% 86.25% +0.12% ========================================== Files 60 60 Lines 5863 5858 -5 ========================================== + Hits 5050 5053 +3 + Misses 813 805 -8 ``` | [Flag](https://app.codecov.io/gh/aio-libs/aiobotocore/pull/1073/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/aio-libs/aiobotocore/pull/1073/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `86.25% <50.00%> (+0.12%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jakob-keller commented 7 months ago

@thehesiod: I'm looking forward to your review.

thehesiod commented 7 months ago

mind just bumping the release date then I'll merge and deploy. Thanks! very nice implementation