Skip to content

Commit

Permalink
Work around TLS errors on CircleCI
Browse files Browse the repository at this point in the history
For some reason the ssl module is hitting an infinite recursion error.
This might be CircleCI-specific, depending on the openssl lib they used
to compile python. The 3.7.0 version is supposed to be even more robust,
so it could also be something about v3.6.13. I have not reproduced the
error elsewhere, however.

The error began appearing after we updated requests from v2.23.0 to
v2.25.1 in StackStorm/st2#5215
In requests v2.24.0, it defaulted to using the python ssl module instead
of PyOpenSSL due to various SELinux issues. Before that it used
PyOpenSSL whenever it was installed. Since it worked with pyopenssl, we
just revert to using it for the tests in this repo.
See: psf/requests#5443
  • Loading branch information
cognifloyd committed May 29, 2021
1 parent 145e176 commit aea6117
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/vault_action_tests_base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# workaround messed up ssl module on CircleCI (it hits an infinite recursion loop).
# this restores behavior of requests <=2.23.0 (see https://github.com/psf/requests/pull/5443)
from urllib3.contrib import pyopenssl

pyopenssl.inject_into_urllib3()

from st2tests.base import BaseActionTestCase

from tests.utils import get_config_file_path
Expand Down

0 comments on commit aea6117

Please sign in to comment.