Fix swig template memory leak #859
Build #20240523.1 had test failures
Details
- Failed: 178 (48.24%)
- Passed: 189 (51.22%)
- Other: 2 (0.54%)
- Total: 369
- 4057 of 6855 branches covered (59.18%)
- 4707 of 5779 lines covered (81.45%)
Annotations
Check failure on line 78970 in Build log
azure-pipelines / Azure.sonic-swss-common
Build log #L78970
Bash exited with code '123'.
Check failure on line 1 in test_AclTableCreationDeletion
azure-pipelines / Azure.sonic-swss-common
test_AclTableCreationDeletion
test setup failure
Raw output
self = <docker.transport.unixconn.UnixHTTPAdapter object at 0x7fa65603afa0>
request = <PreparedRequest [GET]>, stream = False, timeout = 60, verify = True
cert = None, proxies = OrderedDict()
def send(
self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
):
"""Sends PreparedRequest object. Returns Response object.
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
:param stream: (optional) Whether to stream the request content.
:param timeout: (optional) How long to wait for the server to send
data before giving up, as a float, or a :ref:`(connect timeout,
read timeout) <timeouts>` tuple.
:type timeout: float or tuple or urllib3 Timeout object
:param verify: (optional) Either a boolean, in which case it controls whether
we verify the server's TLS certificate, or a string, in which case it
must be a path to a CA bundle to use
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:param proxies: (optional) The proxies dictionary to apply to the request.
:rtype: requests.Response
"""
try:
> conn = self.get_connection_with_tls_context(
request, verify, proxies=proxies, cert=cert
)
/usr/local/lib/python3.8/dist-packages/requests/adapters.py:555:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <docker.transport.unixconn.UnixHTTPAdapter object at 0x7fa65603afa0>
request = <PreparedRequest [GET]>, verify = True, proxies = OrderedDict()
cert = None
def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
"""Returns a urllib3 connection for the given request and TLS settings.
This should not be called from user code, and is only exposed for use
when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param request: The :class:`PreparedRequest <PreparedRequest>` object
to be sent over the connection.
:param verify: Either a boolean, in which case it controls whether
we verify the server's TLS certificate, or a string, in which case it
must be a path to a CA bundle to use.
:param proxies: (optional) The proxies dictionary to apply to the request.
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:rtype: urllib3.ConnectionPool
"""
proxy = select_proxy(request.url, proxies)
try:
host_params, pool_kwargs = _urllib3_request_context(request, verify, cert)
except ValueError as e:
raise InvalidURL(e, request=request)
if proxy:
proxy = prepend_scheme_if_needed(proxy, "http")
proxy_url = parse_url(proxy)
if not proxy_url.host:
raise InvalidProxyURL(
"Please check proxy URL. It is malformed "
"and could be missing the host."
)
proxy_manager = self.proxy_manager_for(proxy)
conn = proxy_manager.connection_from_host(
**host_params, pool_kwargs=pool_kwargs
)
else:
# Only scheme should be lower case
> conn = self.poolmanager.connection_from_host(
**host_params, pool_kwargs=pool_kwargs
)
/usr/local/lib/python3.8/dist-packages/requests/adapters.py:411:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.poolmanager.PoolManager object at 0x7fa65603abe0>
host = 'localhost', port = 80, scheme = 'http+docker'
pool_kwargs = {'cert_reqs': 'CERT_REQUIRED', 'ssl_context': <ssl.SSLContext object at 0x7fa6578c69c0>}
def connection_from_host(
self,
host: str | None,
port: int | None = None,
scheme: str | None = "http",
Check failure on line 1 in test_InvalidAclTableCreationDeletion
azure-pipelines / Azure.sonic-swss-common
test_InvalidAclTableCreationDeletion
test setup failure
Raw output
self = <docker.transport.unixconn.UnixHTTPAdapter object at 0x7fa65603afa0>
request = <PreparedRequest [GET]>, stream = False, timeout = 60, verify = True
cert = None, proxies = OrderedDict()
def send(
self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
):
"""Sends PreparedRequest object. Returns Response object.
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
:param stream: (optional) Whether to stream the request content.
:param timeout: (optional) How long to wait for the server to send
data before giving up, as a float, or a :ref:`(connect timeout,
read timeout) <timeouts>` tuple.
:type timeout: float or tuple or urllib3 Timeout object
:param verify: (optional) Either a boolean, in which case it controls whether
we verify the server's TLS certificate, or a string, in which case it
must be a path to a CA bundle to use
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:param proxies: (optional) The proxies dictionary to apply to the request.
:rtype: requests.Response
"""
try:
> conn = self.get_connection_with_tls_context(
request, verify, proxies=proxies, cert=cert
)
/usr/local/lib/python3.8/dist-packages/requests/adapters.py:555:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <docker.transport.unixconn.UnixHTTPAdapter object at 0x7fa65603afa0>
request = <PreparedRequest [GET]>, verify = True, proxies = OrderedDict()
cert = None
def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
"""Returns a urllib3 connection for the given request and TLS settings.
This should not be called from user code, and is only exposed for use
when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param request: The :class:`PreparedRequest <PreparedRequest>` object
to be sent over the connection.
:param verify: Either a boolean, in which case it controls whether
we verify the server's TLS certificate, or a string, in which case it
must be a path to a CA bundle to use.
:param proxies: (optional) The proxies dictionary to apply to the request.
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:rtype: urllib3.ConnectionPool
"""
proxy = select_proxy(request.url, proxies)
try:
host_params, pool_kwargs = _urllib3_request_context(request, verify, cert)
except ValueError as e:
raise InvalidURL(e, request=request)
if proxy:
proxy = prepend_scheme_if_needed(proxy, "http")
proxy_url = parse_url(proxy)
if not proxy_url.host:
raise InvalidProxyURL(
"Please check proxy URL. It is malformed "
"and could be missing the host."
)
proxy_manager = self.proxy_manager_for(proxy)
conn = proxy_manager.connection_from_host(
**host_params, pool_kwargs=pool_kwargs
)
else:
# Only scheme should be lower case
> conn = self.poolmanager.connection_from_host(
**host_params, pool_kwargs=pool_kwargs
)
/usr/local/lib/python3.8/dist-packages/requests/adapters.py:411:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.poolmanager.PoolManager object at 0x7fa65603abe0>
host = 'localhost', port = 80, scheme = 'http+docker'
pool_kwargs = {'cert_reqs': 'CERT_REQUIRED', 'ssl_context': <ssl.SSLContext object at 0x7fa6578c69c0>}
def connection_from_host(
self,
host: str | None,
port: int | None = None,
scheme: str | None = "http",
Check failure on line 1 in test_InvalidAclRuleCreation[egress]
azure-pipelines / Azure.sonic-swss-common
test_InvalidAclRuleCreation[egress]
test setup failure
Raw output
self = <docker.transport.unixconn.UnixHTTPAdapter object at 0x7fa65603afa0>
request = <PreparedRequest [GET]>, stream = False, timeout = 60, verify = True
cert = None, proxies = OrderedDict()
def send(
self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
):
"""Sends PreparedRequest object. Returns Response object.
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
:param stream: (optional) Whether to stream the request content.
:param timeout: (optional) How long to wait for the server to send
data before giving up, as a float, or a :ref:`(connect timeout,
read timeout) <timeouts>` tuple.
:type timeout: float or tuple or urllib3 Timeout object
:param verify: (optional) Either a boolean, in which case it controls whether
we verify the server's TLS certificate, or a string, in which case it
must be a path to a CA bundle to use
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:param proxies: (optional) The proxies dictionary to apply to the request.
:rtype: requests.Response
"""
try:
> conn = self.get_connection_with_tls_context(
request, verify, proxies=proxies, cert=cert
)
/usr/local/lib/python3.8/dist-packages/requests/adapters.py:555:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <docker.transport.unixconn.UnixHTTPAdapter object at 0x7fa65603afa0>
request = <PreparedRequest [GET]>, verify = True, proxies = OrderedDict()
cert = None
def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
"""Returns a urllib3 connection for the given request and TLS settings.
This should not be called from user code, and is only exposed for use
when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param request: The :class:`PreparedRequest <PreparedRequest>` object
to be sent over the connection.
:param verify: Either a boolean, in which case it controls whether
we verify the server's TLS certificate, or a string, in which case it
must be a path to a CA bundle to use.
:param proxies: (optional) The proxies dictionary to apply to the request.
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:rtype: urllib3.ConnectionPool
"""
proxy = select_proxy(request.url, proxies)
try:
host_params, pool_kwargs = _urllib3_request_context(request, verify, cert)
except ValueError as e:
raise InvalidURL(e, request=request)
if proxy:
proxy = prepend_scheme_if_needed(proxy, "http")
proxy_url = parse_url(proxy)
if not proxy_url.host:
raise InvalidProxyURL(
"Please check proxy URL. It is malformed "
"and could be missing the host."
)
proxy_manager = self.proxy_manager_for(proxy)
conn = proxy_manager.connection_from_host(
**host_params, pool_kwargs=pool_kwargs
)
else:
# Only scheme should be lower case
> conn = self.poolmanager.connection_from_host(
**host_params, pool_kwargs=pool_kwargs
)
/usr/local/lib/python3.8/dist-packages/requests/adapters.py:411:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.poolmanager.PoolManager object at 0x7fa65603abe0>
host = 'localhost', port = 80, scheme = 'http+docker'
pool_kwargs = {'cert_reqs': 'CERT_REQUIRED', 'ssl_context': <ssl.SSLContext object at 0x7fa6578c69c0>}
def connection_from_host(
self,
host: str | None,
port: int | None = None,
scheme: str | None = "http",
Check failure on line 1 in test_InvalidAclRuleCreation[ingress]
azure-pipelines / Azure.sonic-swss-common
test_InvalidAclRuleCreation[ingress]
test setup failure
Raw output
self = <docker.transport.unixconn.UnixHTTPAdapter object at 0x7fa65603afa0>
request = <PreparedRequest [GET]>, stream = False, timeout = 60, verify = True
cert = None, proxies = OrderedDict()
def send(
self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None
):
"""Sends PreparedRequest object. Returns Response object.
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
:param stream: (optional) Whether to stream the request content.
:param timeout: (optional) How long to wait for the server to send
data before giving up, as a float, or a :ref:`(connect timeout,
read timeout) <timeouts>` tuple.
:type timeout: float or tuple or urllib3 Timeout object
:param verify: (optional) Either a boolean, in which case it controls whether
we verify the server's TLS certificate, or a string, in which case it
must be a path to a CA bundle to use
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:param proxies: (optional) The proxies dictionary to apply to the request.
:rtype: requests.Response
"""
try:
> conn = self.get_connection_with_tls_context(
request, verify, proxies=proxies, cert=cert
)
/usr/local/lib/python3.8/dist-packages/requests/adapters.py:555:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <docker.transport.unixconn.UnixHTTPAdapter object at 0x7fa65603afa0>
request = <PreparedRequest [GET]>, verify = True, proxies = OrderedDict()
cert = None
def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
"""Returns a urllib3 connection for the given request and TLS settings.
This should not be called from user code, and is only exposed for use
when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param request: The :class:`PreparedRequest <PreparedRequest>` object
to be sent over the connection.
:param verify: Either a boolean, in which case it controls whether
we verify the server's TLS certificate, or a string, in which case it
must be a path to a CA bundle to use.
:param proxies: (optional) The proxies dictionary to apply to the request.
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:rtype: urllib3.ConnectionPool
"""
proxy = select_proxy(request.url, proxies)
try:
host_params, pool_kwargs = _urllib3_request_context(request, verify, cert)
except ValueError as e:
raise InvalidURL(e, request=request)
if proxy:
proxy = prepend_scheme_if_needed(proxy, "http")
proxy_url = parse_url(proxy)
if not proxy_url.host:
raise InvalidProxyURL(
"Please check proxy URL. It is malformed "
"and could be missing the host."
)
proxy_manager = self.proxy_manager_for(proxy)
conn = proxy_manager.connection_from_host(
**host_params, pool_kwargs=pool_kwargs
)
else:
# Only scheme should be lower case
> conn = self.poolmanager.connection_from_host(
**host_params, pool_kwargs=pool_kwargs
)
/usr/local/lib/python3.8/dist-packages/requests/adapters.py:411:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <urllib3.poolmanager.PoolManager object at 0x7fa65603abe0>
host = 'localhost', port = 80, scheme = 'http+docker'
pool_kwargs = {'cert_reqs': 'CERT_REQUIRED', 'ssl_context': <ssl.SSLContext object at 0x7fa6578c69c0>}
def connection_from_host(
self,
host: str | None,
port: int | None = None,
scheme: str | None = "http",