Closed MeltyBot closed 3 weeks ago
This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen
label, or request that it be added.
Still relevant
This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen
label, or request that it be added.
Migrated from GitLab: https://gitlab.com/meltano/sdk/-/issues/347
Originally created by @cwegener on 2022-03-10 12:23:07
Summary
The
requests
library allows usage of certain environment variables to control its behaviour.One of these environment variables is
REQUESTS_CA_BUNDLE
that is used to override the default CA bundle that ships with therequests
library. Which is a needed feature in order to work with SSL-inspection devices and other 'man-in-the-middle' proxy systems.As per
requests
documentation, in order to provide the same behaviour in regards to environment variables when using thePreparedRequest
class instead of theSession
class, additional preparation is needed via themerge_environment_settings
API method, which provides the compatible behaviour.Link
Proposed benefits
Provide the same behaviour to Meltano SDK users that is already afforded to users of the
requests
library.Proposal details
Use
merge_environment_settings
API before callingsend
on thePreparedRequest
object.Best reasons not to build
Existing users who are relying on this unexpected behaviour (i.e. that Meltano RESTStream class is "ignoring" the otherwise respected
REQUESTS_CA_BUNDLE
,CURL_CA_BUNDLE
,HTTP_PROXY
,HTTPS_PROXY
andNO_PROXY
environment variables) might have their set ups broken by enabling this usually expected behaviour of the standardrequests
functionality.