Skip to content

Remove redundant function (#829) #793

Remove redundant function (#829)

Remove redundant function (#829) #793

GitHub Actions / SDK integration test report failed Jan 3, 2025 in 0s

1 errors, 47 fail, 7 skipped, 224 pass in 2h 33m 48s

279 tests   224 ✔️  2h 33m 48s ⏱️
    1 suites      7 💤
    1 files      47   1 🔥

Results for commit e6715e0.

Annotations

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[True-5-_input5-True-True-False-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fef7d48f420>
test_idx = 5
_input = StorageIntegrationTestParams(bucket_url='https://sdk-tests.s3.eu-west-2.amazonaws.com', storage_location=<StorageLocat...zonaws.com/1.2.840.113619.2.283.6945.3146400.16119.1391477777.669.dcm']], audio_links=[], text_links=[], pdfs_links=[])
invalid_uris = True, ignore_errors = True, two_step_api = False
use_celery = True
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fef6b0d8ed0>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fef6b0d8f90>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:256: in impl_test_add_private_data_to_dataset
    added_data = client.add_private_data_to_dataset(
.venv/lib/python3.11/site-packages/encord/dataset.py:409: in add_private_data_to_dataset
    return self._client.add_private_data_to_dataset(integration_id, private_files, ignore_errors)
.venv/lib/python3.11/site-packages/encord/client.py:681: in add_private_data_to_dataset
    res = self.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fef6b1bcc40>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_native_image

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_upload_native_image_old_api_without_long_polling[ssh-key-authentication-firebase-user] (datasets.test_native_image) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

The above exception was the direct cause of the following exception:

self = <requests.adapters.HTTPAdapter object at 0x7fc04afb64d0>
request = <PreparedRequest [POST]>, stream = False
timeout = Timeout(connect=180, read=600, total=None), verify = True, cert = None
proxies = {}

    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
            )
        except LocationValueError as e:
            raise InvalidURL(e, request=request)
    
        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )
    
        chunked = not (request.body is None or "Content-Length" in request.headers)
    
        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
    
        try:
>           resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )

.venv/lib/python3.11/site-packages/requests/adapters.py:667: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen
    retries = retries.increment(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Retry(total=10, connect=3, read=0, redirect=None, status=0)
method = 'POST', url = '/public', response = None
error = ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
_pool = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fc04b5ba810>
_stacktrace = <traceback object at 0x7fc04b4e2880>

    def increment(
        self,
        method: str | None = None,
        url: str | None = None,
        response: BaseHTTPResponse | None = None,
        error: Exception | None = None,
        _pool: ConnectionPool | None = None,
        _stacktrace: TracebackType | None = None,
    ) -> Self:
        """Return a new Retry object with incremented retry counters.
    
        :param response: A response object, or None, if the server did not
            return a response.
        :type response: :class:`~urllib3.response.BaseHTTPResponse`
        :param Exception error: An error encountered during the request, or
            None if the response was received successfully.
    
        :return: A new ``Retry`` object.
        """
        if self.total is False and error:
            # Disabled, indicate to re-raise the error.
            raise reraise(type(error), error, _stacktrace)
    
        total = self.total
        if total is not None:
            total -= 1
    
        connect = self.connect
        read = self.read
        redirect = self.redirect
        status_count = self.status
        other = self.other
        cause = "unknown"
        status = None
        redirect_location = None
    
        if error and self._is_connection_error(error):
            # Connect retry?
            if connect is False:
                raise reraise(type(error), error, _stacktrace)
            elif connect is not None:
                connect -= 1
    
        elif error and self._is_read_error(error):
            # Read retry?
            if read is False or method is None or not self._is_method_retryable(method):
                raise reraise(type(error), error, _stacktrace)
            elif read is not None:
                read -= 1
    
        elif error:
            # Other retry?
            if other is not None:
                other -= 1
    
        elif response and response.get_redirect_location():
            # Redirect retry?
            if redirect is not None:
                redirect -= 1
            cause = "too many redirects"
            response_redirect_location = response.get_redirect_location()
            if response_redirect_location:
                redirect_location = response_redirect_location
            status = response.status
    
        else:
            # Incrementing because of a server error like a 500 in
            # status_forcelist and the given method is in the allowed_methods
            cause = ResponseError.GENERIC_ERROR
            if response and response.status:
                if status_count is not None:
                    status_count -= 1
                cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status)
                status = response.status
    
        history = self.history + (
            RequestHistory(method, url, error, status, redirect_location),
        )
    
        new_retry = self.new(
            total=total,
            connect=connect,
            read=read,
            redirect=redirect,
            status=status_count,
            other=other,
            history=history,
        )
    
        if new_retry.is_exhausted():
            reason = error or ResponseError(cause)
>           raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
E           urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='dev.api.encord.com', port=443): Max retries exceeded with url: /public (Caused by ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))

.venv/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError

During handling of the above exception, another exception occurred:

self = <encord.http.querier.Querier object at 0x7fc04b448510>
request = Request(POST, {"query_type": "singleimage", "query_method": "POST", "values": {"uid": null, "payload": {"signed_url": ...n/0.1.154 python/3.11.2 pydantic/2.10.1', 'X-Cloud-Trace-Context': '1892b40732624f30ae2131934ae368f8/1;o=1'}, 600, 180)
retryable = False, enable_logging = True

    def _execute(self, request: Request, retryable=False, enable_logging: bool = True) -> Tuple[Any, RequestContext]:
        """Execute a request."""
        if enable_logging:
            logger.info("Request: %s", (request.data[:100] + "..") if len(request.data) > 100 else request.data)
    
        req = requests.Request(
            method=str(request.http_method),
            url=self._config.endpoint,
            headers=request.headers,
            data=request.data,
        ).prepare()
    
        context = self._exception_context(req)
    
        timeouts = (request.connect_timeout, request.timeout)
    
        req_settings = self._config.requests_settings
        with create_new_session(
            max_retries=req_settings.max_retries if retryable else 0,
            backoff_factor=req_settings.backoff_factor,
            connect_retries=req_settings.connection_retries,
        ) as session:
            try:
>               res = session.send(req, timeout=timeouts)

.venv/lib/python3.11/site-packages/encord/http/querier.py:191: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <requests.adapters.HTTPAdapter object at 0x7fc04afb64d0>
request = <PreparedRequest [POST]>, stream = False
timeout = Timeout(connect=180, read=600, total=None), verify = True, cert = None
proxies = {}

    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
            )
        except LocationValueError as e:
            raise InvalidURL(e, request=request)
    
        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )
    
        chunked = not (request.body is None or "Content-Length" in request.headers)
    
        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
    
        try:
            resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )
    
        except (ProtocolError, OSError) as err:
            raise ConnectionError(err, request=request)
    
        except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)
    
            if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)
    
            if isinstance(e.reason, _ProxyError):
                raise ProxyError(e, request=request)
    
            if isinstance(e.reason, _SSLError):
                # This branch is for urllib3 v1.22 and later.
                raise SSLError(e, request=request)
    
>           raise ConnectionError(e, request=request)
E           requests.exceptions.ConnectionError: HTTPSConnectionPool(host='dev.api.encord.com', port=443): Max retries exceeded with url: /public (Caused by ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))

.venv/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError

The above exception was the direct cause of the following exception:

ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7fc04ae03c90>

    @pytest.mark.parametrize("account_type", [AccountTypeEnum.FIREBASE, AccountTypeEnum.SERVICE], indirect=True)
    def test_upload_native_image_old_api_without_long_polling(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
        # TODO remove this test ~1 year from 17 Sep 2024 after
        # TODO checking those routes are not used any more
    
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_name = directory_path / IMAGE_1
            create_image_files([file_name])
    
            if isinstance(ephemeral_cord_dataset_client, EncordClientDataset):
                config = ephemeral_cord_dataset_client._config
                querier = ephemeral_cord_dataset_client._querier
            else:
                config = ephemeral_cord_dataset_client._client._config
                querier = ephemeral_cord_dataset_client._client._querier
    
            signed_url = upload_to_signed_url_list(
                [file_name],
                config,
                querier,
                Images,
                cloud_upload_settings=CloudUploadSettings(),
            )[0]
    
            # normally we would avoid calling implementation, but we want to
            # make sure route works even if it is not used in latest SDK version
>           res = querier.basic_setter(
                SingleImage,
                uid=None,
                payload={
                    "signed_url": signed_url["signed_url"],
                    "data_hash": signed_url["data_hash"],
                    "title": CUSTOM_IMAGE_TITLE,
                    "file_link": signed_url["file_link"],
                },
            )

src/sdk_integration_tests/tests/datasets/test_native_image.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/http/querier.py:119: in basic_setter
    res, context = self._execute(request, retryable=retryable)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <encord.http.querier.Querier object at 0x7fc04b448510>
request = Request(POST, {"query_type": "singleimage", "query_method": "POST", "values": {"uid": null, "payload": {"signed_url": ...n/0.1.154 python/3.11.2 pydantic/2.10.1', 'X-Cloud-Trace-Context': '1892b40732624f30ae2131934ae368f8/1;o=1'}, 600, 180)
retryable = False, enable_logging = True

    def _execute(self, request: Request, retryable=False, enable_logging: bool = True) -> Tuple[Any, RequestContext]:
        """Execute a request."""
        if enable_logging:
            logger.info("Request: %s", (request.data[:100] + "..") if len(request.data) > 100 else request.data)
    
        req = requests.Request(
            method=str(request.http_method),
            url=self._config.endpoint,
            headers=request.headers,
            data=request.data,
        ).prepare()
    
        context = self._exception_context(req)
    
        timeouts = (request.connect_timeout, request.timeout)
    
        req_settings = self._config.requests_settings
        with create_new_session(
            max_retries=req_settings.max_retries if retryable else 0,
            backoff_factor=req_settings.backoff_factor,
            connect_retries=req_settings.connection_retries,
        ) as session:
            try:
                res = session.send(req, timeout=timeouts)
            except Exception as e:
>               raise RequestException(f"Request session.send failed {req.method=} {req.url=}", context=context) from e
E               encord.exceptions.RequestException: Request session.send failed req.method='POST' req.url='https://dev.api.encord.com/public' timestamp='2025-01-03T20:34:52.974668+00:00' trace_id='1892b40732624f30ae2131934ae368f8' span_id='1'

.venv/lib/python3.11/site-packages/encord/http/querier.py:193: RequestException

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[False-0-_input0-False-False-False-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fbb174c7420>
test_idx = 0
_input = StorageIntegrationTestParams(bucket_url='https://storage.cloud.google.com/sdk-test-bucket', storage_location=<StorageL...oud.google.com/sdk-test-bucket/dummy.html'], pdfs_links=['https://storage.cloud.google.com/sdk-test-bucket/dummy.pdf'])
invalid_uris = False, ignore_errors = False, two_step_api = False
use_celery = False
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fbb057adb90>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fbb057adad0>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:256: in impl_test_add_private_data_to_dataset
    added_data = client.add_private_data_to_dataset(
.venv/lib/python3.11/site-packages/encord/dataset.py:409: in add_private_data_to_dataset
    return self._client.add_private_data_to_dataset(integration_id, private_files, ignore_errors)
.venv/lib/python3.11/site-packages/encord/client.py:681: in add_private_data_to_dataset
    res = self.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fbb051d0c40>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_dataset_helpers

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_obtain_re_encode_video_status_and_re_encoded_link[ssh-key-authentication] (datasets.test_dataset_helpers) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7f8cdf63b0d0>

    def test_obtain_re_encode_video_status_and_re_encoded_link(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_path = directory_path / VIDEO_1
            create_mp4_file([file_path])
>           ephemeral_cord_dataset_client.upload_video(file_path)

src/sdk_integration_tests/tests/datasets/test_dataset_helpers.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:262: in upload_video
    return self._client.upload_video(
.venv/lib/python3.11/site-packages/encord/client.py:393: in upload_video
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7f8ccd590940>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_native_image

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_upload_native_image_old_api_without_long_polling[ssh-key-authentication-service-account] (datasets.test_native_image) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

The above exception was the direct cause of the following exception:

self = <requests.adapters.HTTPAdapter object at 0x7fc04b3ebfd0>
request = <PreparedRequest [POST]>, stream = False
timeout = Timeout(connect=180, read=600, total=None), verify = True, cert = None
proxies = {}

    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
            )
        except LocationValueError as e:
            raise InvalidURL(e, request=request)
    
        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )
    
        chunked = not (request.body is None or "Content-Length" in request.headers)
    
        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
    
        try:
>           resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )

.venv/lib/python3.11/site-packages/requests/adapters.py:667: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:843: in urlopen
    retries = retries.increment(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Retry(total=10, connect=3, read=0, redirect=None, status=0)
method = 'POST', url = '/public', response = None
error = ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
_pool = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7fc04b3e80d0>
_stacktrace = <traceback object at 0x7fc04bc01e00>

    def increment(
        self,
        method: str | None = None,
        url: str | None = None,
        response: BaseHTTPResponse | None = None,
        error: Exception | None = None,
        _pool: ConnectionPool | None = None,
        _stacktrace: TracebackType | None = None,
    ) -> Self:
        """Return a new Retry object with incremented retry counters.
    
        :param response: A response object, or None, if the server did not
            return a response.
        :type response: :class:`~urllib3.response.BaseHTTPResponse`
        :param Exception error: An error encountered during the request, or
            None if the response was received successfully.
    
        :return: A new ``Retry`` object.
        """
        if self.total is False and error:
            # Disabled, indicate to re-raise the error.
            raise reraise(type(error), error, _stacktrace)
    
        total = self.total
        if total is not None:
            total -= 1
    
        connect = self.connect
        read = self.read
        redirect = self.redirect
        status_count = self.status
        other = self.other
        cause = "unknown"
        status = None
        redirect_location = None
    
        if error and self._is_connection_error(error):
            # Connect retry?
            if connect is False:
                raise reraise(type(error), error, _stacktrace)
            elif connect is not None:
                connect -= 1
    
        elif error and self._is_read_error(error):
            # Read retry?
            if read is False or method is None or not self._is_method_retryable(method):
                raise reraise(type(error), error, _stacktrace)
            elif read is not None:
                read -= 1
    
        elif error:
            # Other retry?
            if other is not None:
                other -= 1
    
        elif response and response.get_redirect_location():
            # Redirect retry?
            if redirect is not None:
                redirect -= 1
            cause = "too many redirects"
            response_redirect_location = response.get_redirect_location()
            if response_redirect_location:
                redirect_location = response_redirect_location
            status = response.status
    
        else:
            # Incrementing because of a server error like a 500 in
            # status_forcelist and the given method is in the allowed_methods
            cause = ResponseError.GENERIC_ERROR
            if response and response.status:
                if status_count is not None:
                    status_count -= 1
                cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status)
                status = response.status
    
        history = self.history + (
            RequestHistory(method, url, error, status, redirect_location),
        )
    
        new_retry = self.new(
            total=total,
            connect=connect,
            read=read,
            redirect=redirect,
            status=status_count,
            other=other,
            history=history,
        )
    
        if new_retry.is_exhausted():
            reason = error or ResponseError(cause)
>           raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
E           urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='dev.api.encord.com', port=443): Max retries exceeded with url: /public (Caused by ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))

.venv/lib/python3.11/site-packages/urllib3/util/retry.py:519: MaxRetryError

During handling of the above exception, another exception occurred:

self = <encord.http.querier.Querier object at 0x7fc04b3ea750>
request = Request(POST, {"query_type": "singleimage", "query_method": "POST", "values": {"uid": null, "payload": {"signed_url": ...n/0.1.154 python/3.11.2 pydantic/2.10.1', 'X-Cloud-Trace-Context': 'dc394aeb410841ecb218fbd365a66506/1;o=1'}, 600, 180)
retryable = False, enable_logging = True

    def _execute(self, request: Request, retryable=False, enable_logging: bool = True) -> Tuple[Any, RequestContext]:
        """Execute a request."""
        if enable_logging:
            logger.info("Request: %s", (request.data[:100] + "..") if len(request.data) > 100 else request.data)
    
        req = requests.Request(
            method=str(request.http_method),
            url=self._config.endpoint,
            headers=request.headers,
            data=request.data,
        ).prepare()
    
        context = self._exception_context(req)
    
        timeouts = (request.connect_timeout, request.timeout)
    
        req_settings = self._config.requests_settings
        with create_new_session(
            max_retries=req_settings.max_retries if retryable else 0,
            backoff_factor=req_settings.backoff_factor,
            connect_retries=req_settings.connection_retries,
        ) as session:
            try:
>               res = session.send(req, timeout=timeouts)

.venv/lib/python3.11/site-packages/encord/http/querier.py:191: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <requests.adapters.HTTPAdapter object at 0x7fc04b3ebfd0>
request = <PreparedRequest [POST]>, stream = False
timeout = Timeout(connect=180, read=600, total=None), verify = True, cert = None
proxies = {}

    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
            )
        except LocationValueError as e:
            raise InvalidURL(e, request=request)
    
        self.cert_verify(conn, request.url, verify, cert)
        url = self.request_url(request, proxies)
        self.add_headers(
            request,
            stream=stream,
            timeout=timeout,
            verify=verify,
            cert=cert,
            proxies=proxies,
        )
    
        chunked = not (request.body is None or "Content-Length" in request.headers)
    
        if isinstance(timeout, tuple):
            try:
                connect, read = timeout
                timeout = TimeoutSauce(connect=connect, read=read)
            except ValueError:
                raise ValueError(
                    f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, "
                    f"or a single float to set both timeouts to the same value."
                )
        elif isinstance(timeout, TimeoutSauce):
            pass
        else:
            timeout = TimeoutSauce(connect=timeout, read=timeout)
    
        try:
            resp = conn.urlopen(
                method=request.method,
                url=url,
                body=request.body,
                headers=request.headers,
                redirect=False,
                assert_same_host=False,
                preload_content=False,
                decode_content=False,
                retries=self.max_retries,
                timeout=timeout,
                chunked=chunked,
            )
    
        except (ProtocolError, OSError) as err:
            raise ConnectionError(err, request=request)
    
        except MaxRetryError as e:
            if isinstance(e.reason, ConnectTimeoutError):
                # TODO: Remove this in 3.0.0: see #2811
                if not isinstance(e.reason, NewConnectionError):
                    raise ConnectTimeout(e, request=request)
    
            if isinstance(e.reason, ResponseError):
                raise RetryError(e, request=request)
    
            if isinstance(e.reason, _ProxyError):
                raise ProxyError(e, request=request)
    
            if isinstance(e.reason, _SSLError):
                # This branch is for urllib3 v1.22 and later.
                raise SSLError(e, request=request)
    
>           raise ConnectionError(e, request=request)
E           requests.exceptions.ConnectionError: HTTPSConnectionPool(host='dev.api.encord.com', port=443): Max retries exceeded with url: /public (Caused by ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))

.venv/lib/python3.11/site-packages/requests/adapters.py:700: ConnectionError

The above exception was the direct cause of the following exception:

ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7fc04b3e9750>

    @pytest.mark.parametrize("account_type", [AccountTypeEnum.FIREBASE, AccountTypeEnum.SERVICE], indirect=True)
    def test_upload_native_image_old_api_without_long_polling(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
        # TODO remove this test ~1 year from 17 Sep 2024 after
        # TODO checking those routes are not used any more
    
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_name = directory_path / IMAGE_1
            create_image_files([file_name])
    
            if isinstance(ephemeral_cord_dataset_client, EncordClientDataset):
                config = ephemeral_cord_dataset_client._config
                querier = ephemeral_cord_dataset_client._querier
            else:
                config = ephemeral_cord_dataset_client._client._config
                querier = ephemeral_cord_dataset_client._client._querier
    
            signed_url = upload_to_signed_url_list(
                [file_name],
                config,
                querier,
                Images,
                cloud_upload_settings=CloudUploadSettings(),
            )[0]
    
            # normally we would avoid calling implementation, but we want to
            # make sure route works even if it is not used in latest SDK version
>           res = querier.basic_setter(
                SingleImage,
                uid=None,
                payload={
                    "signed_url": signed_url["signed_url"],
                    "data_hash": signed_url["data_hash"],
                    "title": CUSTOM_IMAGE_TITLE,
                    "file_link": signed_url["file_link"],
                },
            )

src/sdk_integration_tests/tests/datasets/test_native_image.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/http/querier.py:119: in basic_setter
    res, context = self._execute(request, retryable=retryable)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <encord.http.querier.Querier object at 0x7fc04b3ea750>
request = Request(POST, {"query_type": "singleimage", "query_method": "POST", "values": {"uid": null, "payload": {"signed_url": ...n/0.1.154 python/3.11.2 pydantic/2.10.1', 'X-Cloud-Trace-Context': 'dc394aeb410841ecb218fbd365a66506/1;o=1'}, 600, 180)
retryable = False, enable_logging = True

    def _execute(self, request: Request, retryable=False, enable_logging: bool = True) -> Tuple[Any, RequestContext]:
        """Execute a request."""
        if enable_logging:
            logger.info("Request: %s", (request.data[:100] + "..") if len(request.data) > 100 else request.data)
    
        req = requests.Request(
            method=str(request.http_method),
            url=self._config.endpoint,
            headers=request.headers,
            data=request.data,
        ).prepare()
    
        context = self._exception_context(req)
    
        timeouts = (request.connect_timeout, request.timeout)
    
        req_settings = self._config.requests_settings
        with create_new_session(
            max_retries=req_settings.max_retries if retryable else 0,
            backoff_factor=req_settings.backoff_factor,
            connect_retries=req_settings.connection_retries,
        ) as session:
            try:
                res = session.send(req, timeout=timeouts)
            except Exception as e:
>               raise RequestException(f"Request session.send failed {req.method=} {req.url=}", context=context) from e
E               encord.exceptions.RequestException: Request session.send failed req.method='POST' req.url='https://dev.api.encord.com/public' timestamp='2025-01-03T20:39:39.364651+00:00' trace_id='dc394aeb410841ecb218fbd365a66506' span_id='1'

.venv/lib/python3.11/site-packages/encord/http/querier.py:193: RequestException

Check warning on line 0 in datasets.test_native_image

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_image_title_update_after_upload[ssh-key-authentication] (datasets.test_native_image) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7fc04beb7210>

    def test_image_title_update_after_upload(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_name = directory_path / IMAGE_1
            create_image_files([file_name])
    
>           upload_image_ret = ephemeral_cord_dataset_client.upload_image(file_name)

src/sdk_integration_tests/tests/datasets/test_native_image.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:358: in upload_image
    return self._client.upload_image(file_path, title, cloud_upload_settings, folder_uuid)
.venv/lib/python3.11/site-packages/encord/client.py:610: in upload_image
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fc04b0e62c0>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[True-6-_input6-True-False-True-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fef7d48f420>
test_idx = 6
_input = StorageIntegrationTestParams(bucket_url='https://storage.cloud.google.com/sdk-test-bucket', storage_location=<StorageL...oud.google.com/sdk-test-bucket/dummy.html'], pdfs_links=['https://storage.cloud.google.com/sdk-test-bucket/dummy.pdf'])
invalid_uris = False, ignore_errors = True, two_step_api = True
use_celery = True
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fef6b0db390>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fef6b0d9090>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:208: in impl_test_add_private_data_to_dataset
    res = client.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/dataset.py:461: in add_private_data_to_dataset_get_result
    return self._client.add_private_data_to_dataset_get_result(upload_job_id, timeout_seconds)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fef6b1bfc40>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[False-1-_input1-False-False-False-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fbb174c7420>
test_idx = 1
_input = StorageIntegrationTestParams(bucket_url='https://sdk-tests.s3.eu-west-2.amazonaws.com', storage_location=<StorageLocat...zonaws.com/1.2.840.113619.2.283.6945.3146400.16119.1391477777.669.dcm']], audio_links=[], text_links=[], pdfs_links=[])
invalid_uris = False, ignore_errors = False, two_step_api = False
use_celery = False
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fbb043c5590>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fbb043c60d0>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:256: in impl_test_add_private_data_to_dataset
    added_data = client.add_private_data_to_dataset(
.venv/lib/python3.11/site-packages/encord/dataset.py:409: in add_private_data_to_dataset
    return self._client.add_private_data_to_dataset(integration_id, private_files, ignore_errors)
.venv/lib/python3.11/site-packages/encord/client.py:681: in add_private_data_to_dataset
    res = self.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fbb051d0640>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_dataset_helpers

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_run_ocr[ssh-key-authentication] (datasets.test_dataset_helpers) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7f8ccb3e6790>

    def test_run_ocr(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
        ocr_text = "Sample OCR text"
    
        with tempfile.TemporaryDirectory() as _tmp_dir_path:
            tmp_dir_path = Path(_tmp_dir_path)
            img_path = tmp_dir_path / "img.png"
    
            img = 255 * np.ones(
                shape=[64, 256, 3],
                dtype=np.uint8,
            )
    
            cv2.putText(
                img,
                text=ocr_text,
                org=(20, 40),
                fontFace=cv2.FONT_HERSHEY_SIMPLEX,
                fontScale=0.5,
                color=(0, 0, 0),
                thickness=1,
                lineType=cv2.LINE_AA,
            )
    
            cv2.imwrite(
                str(img_path),
                img,
            )
    
>           image_groups = ephemeral_cord_dataset_client.create_image_group(
                [str(img_path)],
                create_video=False,
            )

src/sdk_integration_tests/tests/datasets/test_dataset_helpers.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:296: in create_image_group
    return self._client.create_image_group(
.venv/lib/python3.11/site-packages/encord/client.py:470: in create_image_group
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7f8ccd593640>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_nifti

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_upload_nifti (datasets.test_nifti) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
storage_folder = <encord.storage.StorageFolder object at 0x7fc05d452e50>

    def test_upload_nifti(storage_folder: StorageFolder) -> None:
        nifti1_file = os.path.join(str(data_path), "example4d.nii.gz")
>       storage_folder.upload_nifti(nifti1_file)

src/sdk_integration_tests/tests/datasets/test_nifti.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/storage.py:591: in upload_nifti
    upload_result = self._add_data(
.venv/lib/python3.11/site-packages/encord/storage.py:1302: in _add_data
    res = self._add_data_to_folder_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/storage.py:1372: in _add_data_to_folder_get_result
    res = self._api_client.get(
.venv/lib/python3.11/site-packages/encord/http/v2/api_client.py:74: in get
    return self._request_without_payload("GET", path, params, result_type, allow_none=allow_none)
.venv/lib/python3.11/site-packages/encord/http/v2/api_client.py:180: in _request_without_payload
    return self._request(req, result_type=result_type, allow_none=allow_none)  # type: ignore
.venv/lib/python3.11/site-packages/encord/http/v2/api_client.py:195: in _request
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fc04b0e7a00>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[True-7-_input7-False-True-True-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fef7d48f420>
test_idx = 7
_input = StorageIntegrationTestParams(bucket_url='https://sdk-tests.s3.eu-west-2.amazonaws.com', storage_location=<StorageLocat...zonaws.com/1.2.840.113619.2.283.6945.3146400.16119.1391477777.669.dcm']], audio_links=[], text_links=[], pdfs_links=[])
invalid_uris = True, ignore_errors = False, two_step_api = True
use_celery = True
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fef6bf85b10>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fef6bf87590>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:208: in impl_test_add_private_data_to_dataset
    res = client.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/dataset.py:461: in add_private_data_to_dataset_get_result
    return self._client.add_private_data_to_dataset_get_result(upload_job_id, timeout_seconds)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fef6b1bcf40>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_dicom_series

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_dicom_series_title_update_after_upload[ssh-key-authentication] (datasets.test_dicom_series) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7f8ccb561850>

    def test_dicom_series_title_update_after_upload(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
>       ret = ephemeral_cord_dataset_client.create_dicom_series(
            DICOM_SERIES_PATHS,
        )

src/sdk_integration_tests/tests/datasets/test_dicom_series.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:329: in create_dicom_series
    return self._client.create_dicom_series(
.venv/lib/python3.11/site-packages/encord/client.py:545: in create_dicom_series
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7f8ccd593340>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[False-3-_input3-True-False-False-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fbb174c7420>
test_idx = 3
_input = StorageIntegrationTestParams(bucket_url='https://storage.cloud.google.com/sdk-test-bucket', storage_location=<StorageL...oud.google.com/sdk-test-bucket/dummy.html'], pdfs_links=['https://storage.cloud.google.com/sdk-test-bucket/dummy.pdf'])
invalid_uris = False, ignore_errors = True, two_step_api = False
use_celery = False
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fbb057e73d0>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fbb057e7f50>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:256: in impl_test_add_private_data_to_dataset
    added_data = client.add_private_data_to_dataset(
.venv/lib/python3.11/site-packages/encord/dataset.py:409: in add_private_data_to_dataset
    return self._client.add_private_data_to_dataset(integration_id, private_files, ignore_errors)
.venv/lib/python3.11/site-packages/encord/client.py:681: in add_private_data_to_dataset
    res = self.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fbb051d2bc0>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[True-8-_input8-True-True-True-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fef7d48f420>
test_idx = 8
_input = StorageIntegrationTestParams(bucket_url='https://sdk-tests.s3.eu-west-2.amazonaws.com', storage_location=<StorageLocat...zonaws.com/1.2.840.113619.2.283.6945.3146400.16119.1391477777.669.dcm']], audio_links=[], text_links=[], pdfs_links=[])
invalid_uris = True, ignore_errors = True, two_step_api = True
use_celery = True
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fef6b320e90>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fef6b321810>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:208: in impl_test_add_private_data_to_dataset
    res = client.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/dataset.py:461: in add_private_data_to_dataset_get_result
    return self._client.add_private_data_to_dataset_get_result(upload_job_id, timeout_seconds)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fef6b1bf880>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_videos

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_delete_video_from_dataset[ssh-key-authentication] (datasets.test_videos) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7fc0404c4c90>

    def test_delete_video_from_dataset(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_name = str(directory_path / VIDEO_1)
            create_mp4_file([file_name])
>           ephemeral_cord_dataset_client.upload_video(file_name)

src/sdk_integration_tests/tests/datasets/test_videos.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:262: in upload_video
    return self._client.upload_video(
.venv/lib/python3.11/site-packages/encord/client.py:393: in upload_video
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fc04b0e41c0>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[False-4-_input4-False-True-False-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fbb174c7420>
test_idx = 4
_input = StorageIntegrationTestParams(bucket_url='https://sdk-tests.s3.eu-west-2.amazonaws.com', storage_location=<StorageLocat...zonaws.com/1.2.840.113619.2.283.6945.3146400.16119.1391477777.669.dcm']], audio_links=[], text_links=[], pdfs_links=[])
invalid_uris = True, ignore_errors = False, two_step_api = False
use_celery = False
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fbb0543c190>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fbb057df090>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:244: in impl_test_add_private_data_to_dataset
    client.add_private_data_to_dataset(
.venv/lib/python3.11/site-packages/encord/dataset.py:409: in add_private_data_to_dataset
    return self._client.add_private_data_to_dataset(integration_id, private_files, ignore_errors)
.venv/lib/python3.11/site-packages/encord/client.py:681: in add_private_data_to_dataset
    res = self.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fbb05394b80>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[True-9-_input9-False-False-True-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fef7d48f420>
test_idx = 9
_input = StorageIntegrationTestParams(bucket_url='https://non-existent-direct-access-url.com/sdk-test-bucket', storage_location...est-bucket/1.2.840.113619.2.283.6945.3146400.16119.1391477777.669.dcm']], audio_links=[], text_links=[], pdfs_links=[])
invalid_uris = False, ignore_errors = False, two_step_api = True
use_celery = True
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fef6b61ef50>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fef6b61fdd0>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:208: in impl_test_add_private_data_to_dataset
    res = client.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/dataset.py:461: in add_private_data_to_dataset_get_result
    return self._client.add_private_data_to_dataset_get_result(upload_job_id, timeout_seconds)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fef6b1bcdc0>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_videos

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_delete_multiple_videos_from_dataset[ssh-key-authentication] (datasets.test_videos) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7fc04054b6d0>

    def test_delete_multiple_videos_from_dataset(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_names = [str(p) for p in [directory_path / VIDEO_1, directory_path / VIDEO_2, directory_path / VIDEO_3]]
            create_mp4_file(file_names)
            for file_name in file_names:
>               ephemeral_cord_dataset_client.upload_video(file_name)

src/sdk_integration_tests/tests/datasets/test_videos.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:262: in upload_video
    return self._client.upload_video(
.venv/lib/python3.11/site-packages/encord/client.py:393: in upload_video
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fc04b0e7f40>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_image_group

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_create_image_group[ssh-key-authentication-False] (datasets.test_image_group) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7f8ccd695c50>
create_video = False

    @pytest.mark.parametrize("create_video", [False, True])
    def test_create_image_group(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
        create_video: bool,
    ) -> None:
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_names = get_file_names(directory_path)
            create_image_files(file_names)
    
>           image_group_ret = ephemeral_cord_dataset_client.create_image_group(
                file_names,
                title=CUSTOM_IMAGE_GROUP_TITLE,
                create_video=create_video,
            )

src/sdk_integration_tests/tests/datasets/test_image_group.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:296: in create_image_group
    return self._client.create_image_group(
.venv/lib/python3.11/site-packages/encord/client.py:470: in create_image_group
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7f8ccd591cc0>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[False-5-_input5-True-True-False-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fbb174c7420>
test_idx = 5
_input = StorageIntegrationTestParams(bucket_url='https://sdk-tests.s3.eu-west-2.amazonaws.com', storage_location=<StorageLocat...zonaws.com/1.2.840.113619.2.283.6945.3146400.16119.1391477777.669.dcm']], audio_links=[], text_links=[], pdfs_links=[])
invalid_uris = True, ignore_errors = True, two_step_api = False
use_celery = False
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fbb060e58d0>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fbb05652910>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:256: in impl_test_add_private_data_to_dataset
    added_data = client.add_private_data_to_dataset(
.venv/lib/python3.11/site-packages/encord/dataset.py:409: in add_private_data_to_dataset
    return self._client.add_private_data_to_dataset(integration_id, private_files, ignore_errors)
.venv/lib/python3.11/site-packages/encord/client.py:681: in add_private_data_to_dataset
    res = self.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fbb051d3640>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[True-10-_input10-False-False-True-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fef7d48f420>
test_idx = 10
_input = StorageIntegrationTestParams(bucket_url='https://storage.googleapis.com/encord-public-data-examples/sdk-test-bucket-pu...data-examples/sdk-test-bucket-public/test_image_3.png']], dicom_links=[], audio_links=[], text_links=[], pdfs_links=[])
invalid_uris = False, ignore_errors = False, two_step_api = True
use_celery = True
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fef6b2f2f50>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fef6b2f3610>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:208: in impl_test_add_private_data_to_dataset
    res = client.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/dataset.py:461: in add_private_data_to_dataset_get_result
    return self._client.add_private_data_to_dataset_get_result(upload_job_id, timeout_seconds)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fef6b1bd0c0>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_videos

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_upload_video[ssh-key-authentication] (datasets.test_videos) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7fc04af31290>

    def test_upload_video(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
    ) -> None:
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_name = directory_path / VIDEO_1
            create_mp4_file([file_name])
>           upload_video = ephemeral_cord_dataset_client.upload_video(file_name)

src/sdk_integration_tests/tests/datasets/test_videos.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:262: in upload_video
    return self._client.upload_video(
.venv/lib/python3.11/site-packages/encord/client.py:393: in upload_video
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fc04b0e7dc0>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_image_group

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_create_image_group[ssh-key-authentication-True] (datasets.test_image_group) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7f8ccd82c110>
create_video = True

    @pytest.mark.parametrize("create_video", [False, True])
    def test_create_image_group(
        ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
        create_video: bool,
    ) -> None:
        with tempfile.TemporaryDirectory() as tmp_dir:
            directory_path = Path(tmp_dir)
    
            file_names = get_file_names(directory_path)
            create_image_files(file_names)
    
>           image_group_ret = ephemeral_cord_dataset_client.create_image_group(
                file_names,
                title=CUSTOM_IMAGE_GROUP_TITLE,
                create_video=create_video,
            )

src/sdk_integration_tests/tests/datasets/test_image_group.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.11/site-packages/encord/dataset.py:296: in create_image_group
    return self._client.create_image_group(
.venv/lib/python3.11/site-packages/encord/client.py:470: in create_image_group
    res = self.__add_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:323: in __add_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7f8ccd593580>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_cloud_integrations

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_add_private_data_to_dataset[False-6-_input6-True-False-True-ssh-key-authentication] (datasets.test_cloud_integrations) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
get_dataset_client = <function get_ssh_dataset_client at 0x7fbb174c7420>
test_idx = 6
_input = StorageIntegrationTestParams(bucket_url='https://storage.cloud.google.com/sdk-test-bucket', storage_location=<StorageL...oud.google.com/sdk-test-bucket/dummy.html'], pdfs_links=['https://storage.cloud.google.com/sdk-test-bucket/dummy.pdf'])
invalid_uris = False, ignore_errors = True, two_step_api = True
use_celery = False
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fbb056e6310>
ephemeral_user_client_non_org_user = <encord.user_client.EncordUserClient object at 0x7fbb17518a90>

    @pytest.mark.parametrize(
        "get_dataset_client", [pytest.param(get_ssh_dataset_client, id="ssh-key-authentication")], indirect=True
    )  # this forces this test to only run with ssh auth, as we're not building 'ontology api key' infra
    @pytest.mark.parametrize(
        "test_idx, _input, ignore_errors, invalid_uris, two_step_api",
        [
            tuple([test_idx] + list(x))
            for test_idx, x in enumerate(
                [
                    # happy path "old" api tests
                    (GCP_STORAGE_TEST_PARAMS, False, False, False),
                    (AWS_STORAGE_TEST_PARAMS, False, False, False),
                    (AZURE_STORAGE_TEST_PARAMS, False, False, False),
                    # happy path "old" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, False),
                    # one error "old" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, False),
                    # one error "old" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, False),
                    # happy path "new" api test - with ignore_errors
                    (GCP_STORAGE_TEST_PARAMS, True, False, True),
                    # one error "new" api test - without ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, False, True, True),
                    # one error "new" api test - with ignore_errors
                    (AWS_STORAGE_TEST_PARAMS, True, True, True),
                    # happy path "new" api test - without ignore_errors (direct access)
                    (DIRECT_ACCESS_TEST_PARAMS, False, False, True),
                    # happy path "new" api test - without ignore_errors (direct access public without metadata)
                    (DIRECT_ACCESS_PUBLIC_TEST_PARAMS, False, False, True),
                ]
            )
        ],
    )
    @pytest.mark.parametrize("use_celery", [False, True])
    def test_add_private_data_to_dataset(
        get_dataset_client: Callable[[EncordUserClient, str], EncordClientDataset | Dataset],
        test_idx: int,
        _input: StorageIntegrationTestParams,
        invalid_uris: bool,
        ignore_errors: bool,
        two_step_api: tuple | None,
        use_celery: bool,
        ephemeral_user_client: EncordUserClient,
        ephemeral_user_client_non_org_user: EncordUserClient,
    ) -> None:
        if use_celery:
            user_client = ephemeral_user_client_non_org_user
        else:
            user_client = ephemeral_user_client
    
>       impl_test_add_private_data_to_dataset(
            get_dataset_client,
            test_idx,
            _input,
            invalid_uris,
            ignore_errors,
            two_step_api,
            user_client,
        )

src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:322: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_cloud_integrations.py:208: in impl_test_add_private_data_to_dataset
    res = client.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/dataset.py:461: in add_private_data_to_dataset_get_result
    return self._client.add_private_data_to_dataset_get_result(upload_job_id, timeout_seconds)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fbb051d0e80>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed

Check warning on line 0 in datasets.test_dataset_accessors

See this annotation in the file changed.

@github-actions github-actions / SDK integration test report

test_client_metadata_for_cloud_upload_ssh_access[True-assert_client_metadatas_are_present] (datasets.test_dataset_accessors) failed

integration-test-report-python3_11.xml/integration-test-report-python3_11.xml
Raw output
ephemeral_user_client = <encord.user_client.EncordUserClient object at 0x7fef6b0d29d0>
initial_fetch_client_metadata = True
initial_assert_callback = <function assert_client_metadatas_are_present at 0x7fef6c05cb80>

    @pytest.mark.parametrize(
        "initial_fetch_client_metadata, initial_assert_callback",
        [
            (True, assert_client_metadatas_are_present),
            (False, assert_client_metadatas_are_none),
        ],
    )
    def test_client_metadata_for_cloud_upload_ssh_access(
        ephemeral_user_client: EncordUserClient,
        initial_fetch_client_metadata: bool,
        initial_assert_callback: Callable,
    ) -> None:
        location_name = GCP_STORAGE_TEST_PARAMS.storage_location.name
    
        dataset_hash = ephemeral_user_client.create_dataset(
            f"Test dataset {location_name}",
            StorageLocation.CORD_STORAGE,  # does not matter
        ).dataset_hash
    
        dataset = ephemeral_user_client.get_dataset(
            dataset_hash,
            dataset_access_settings=DatasetAccessSettings(
                fetch_client_metadata=initial_fetch_client_metadata,
            ),
        )
    
>       setup_client_metadata_for_cloud_upload(dataset)

src/sdk_integration_tests/tests/datasets/test_dataset_accessors.py:113: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/sdk_integration_tests/tests/datasets/test_dataset_accessors.py:64: in setup_client_metadata_for_cloud_upload
    dataset_client.add_private_data_to_dataset(integration_id, integration_query)
.venv/lib/python3.11/site-packages/encord/dataset.py:409: in add_private_data_to_dataset
    return self._client.add_private_data_to_dataset(integration_id, private_files, ignore_errors)
.venv/lib/python3.11/site-packages/encord/client.py:681: in add_private_data_to_dataset
    res = self.add_private_data_to_dataset_get_result(upload_job_id)
.venv/lib/python3.11/site-packages/encord/client.py:759: in add_private_data_to_dataset_get_result
    res = self._querier.basic_getter(
.venv/lib/python3.11/site-packages/encord/http/querier.py:43: in basic_getter
    res, context = self._execute(request, retryable=retryable)
.venv/lib/python3.11/site-packages/encord/http/querier.py:191: in _execute
    res = session.send(req, timeout=timeouts)
.venv/lib/python3.11/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.11/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:789: in urlopen
    response = self._make_request(
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
.venv/lib/python3.11/site-packages/urllib3/connection.py:507: in getresponse
    httplib_response = super().getresponse()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:1374: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:318: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/socket.py:706: in readinto
    return self._sock.recv_into(b)
/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1278: in recv_into
    return self.read(nbytes, buffer)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ssl.SSLSocket [closed] fd=-1, family=2, type=1, proto=6>, len = 8192
buffer = <memory at 0x7fef6b1bc880>

    def read(self, len=1024, buffer=None):
        """Read up to LEN bytes and return them.
        Return zero-length string on EOF."""
    
        self._checkClosed()
        if self._sslobj is None:
            raise ValueError("Read on closed or unwrapped SSL socket.")
        try:
            if buffer is not None:
>               return self._sslobj.read(len, buffer)
E               Failed: Timeout >600.0s

/opt/hostedtoolcache/Python/3.11.2/x64/lib/python3.11/ssl.py:1134: Failed