boto3 integration broken
See original GitHub issueHey, I’ve recently started seeing boto3 related failures in my unit tests. The recordings had been working previously, but it seems that something has changed in boto, and the vcrpy support is no longer working.
------------------------------------------------------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------------------------------------------------------
/Users/analogj/repos/lexicon/venv/lib/python2.7/site-packages/urllib3/connectionpool.py:857: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Developers - boto3 integration broken - - Bountysource
boto3 integration broken ... Hey, I've recently started seeing boto3 related failures in my unit tests. The recordings had been working previously, but...
Read more >boto's Glacier-to-S3 restore() function not working
I'm fairly new to both python and the S3/Glacier integration interface that boto provides. ... Or is there something innately broken about boto...
Read more >class ACM. Client - Boto3 Docs 1.26.32 documentation
Imports a certificate into Certificate Manager (ACM) to use with services that are integrated with ACM. Note that integrated services allow only certificate ......
Read more >Python : Pipe is broken - RPA Discussions - UiPath Forum
import base64 import boto3 def encrypt(secret): session = boto3.session. ... Thanks! Python Integration (Pipe is broken).
Read more >Migrating to Boto3 | AWS Developer Tools Blog
To make the process of migrating to Boto3 easier, we released Boto3 under the boto3 namespace so that you can use Boto and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jeshan I have some debug information for the issue The biggest obstacle for the issue is that
vcrpy
does not have muchlogging
botocore
does not use vendored requests for all calls it usesbotocore.awsrequest
which usesurllib3
https://github.com/boto/botocore/blob/develop/botocore/awsrequest.py#L254Any call from
botocore
orbotocore.vendored.requests
does not invokevcr.request
vcr.request.Request
is never called when usingboto3
@kevin1024 I’d need more info how does the lib work internally because I could not figure it out what is called when.
It might be something with
vcr.patch
which importsbotocore.verndored.requests
~3 timeshttps://github.com/kevin1024/vcrpy/blob/master/vcr/patch.py#L410
becausebotocore.awsrequest
has bit different implementationand then
_urllib3_patchers
https://github.com/kevin1024/vcrpy/blob/master/vcr/patch.py#L306 is looking forHTTPSConnection
but botocore has prefixAWS
->AWSHTTPSConnection
after couple modification I was able to get
vcr.request.Request
invoked and request recorded.So in the end it was enough to patch this part https://github.com/kevin1024/vcrpy/blob/master/vcr/patch.py#L315 as:
It is not very elegant and it’s tested now only on my dev env and boto 1 call. I will do couple more tests and then run the CI to see if tests pass.
Same here! Thanks for everyone involved! 👏