Skip to content

bump version

bump version #842

GitHub Actions / Pytest Tests failed Aug 2, 2024 in 1s

71 passed, 7 failed and 0 skipped

Tests failed

❌ junit/test-results-3.8.xml

78 tests were completed in 589s with 71 passed, 7 failed and 0 skipped.

Test suite Passed Failed Skipped Time
pytest 71✅ 7❌ 589s

❌ pytest

tests.test_backporter.TestBackporter
  ✅ test_backport_from_branch31
  ✅ test_backport_relation_chain
  ✅ test_with_committed_with_good_message
  ✅ test_with_committed_with_good_message_remote_to_upstream_does_not_exist
  ✅ test_with_committed_with_wrong_message_should_raise_error
  ✅ test_with_uncommitted_should_raise_error
tests.test_branch_comparator.TestBranchComparator
  ✅ test_e2e_upstream
  ✅ test_grouping
tests.test_format_patch_saver.TestFormatPatchSaver
  ✅ test_base_and_other_refs_are_same
  ✅ test_base_and_other_refs_are_valid
  ✅ test_base_and_other_refs_are_valid_more_commits
  ✅ test_run_in_a_non_git_repo_working_dir
  ✅ test_wrong_base_refspec
  ✅ test_wrong_other_refspec
tests.test_patch_saver.TestPatchSaver
  ✅ test_save_patch_on_testbranch_fails_with_uncommitted_changes
  ✅ test_save_patch_on_testbranch_fails_without_changes
  ✅ test_save_patch_on_testbranch_runs_with_committed_changes
  ✅ test_save_patch_on_trunk_fails
  ✅ test_save_patch_started_from_yarn_dev_tools
tests.test_review_branch_creator.TestReviewBranchCreator
  ✅ test_with_bad_patch_content
  ✅ test_with_normal_patch
  ✅ test_with_normal_patch_from_yarn_dev_tools
  ✅ test_with_normal_patch_two_consecutive_branches
  ✅ test_with_not_existing_patch
  ✅ test_with_oddly_named_patch
tests.test_unit_test_result_aggregator.TestTestCaseFilters
  ✅ test_created_filters_aggregation
  ✅ test_created_filters_all_valid_filters
  ✅ test_created_filters_latest_failures
  ✅ test_created_filters_simple_matched_line
  ✅ test_created_filters_testcases_to_jiras
  ✅ test_union_of_aggregated_and_non_aggregated_is_valid_filters
tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher
  ✅ test_cache_config_with_settings
  ✅ test_cache_config_without_any_setting
  ✅ test_email_config_validate_job_names_to_reset_state_for_known_job
  ✅ test_email_config_validate_job_names_to_reset_state_for_some_unknown_job
  ✅ test_email_config_validate_job_names_to_reset_state_for_unknown_job
  ✅ test_email_config_with_default_settings
  ✅ test_email_config_with_skip_email_and_with_force_sending_email
  ✅ test_email_config_with_skip_email_and_without_force_sending_email
  ❌ test_jenkins_api_convert_latest_job
	self = <urllib.request.HTTPHandler object at 0x7fa940214190>
  ❌ test_jenkins_api_convert_more_jobs
	self = <urllib.request.HTTPHandler object at 0x7fa92e28d7c0>
  ❌ test_jenkins_api_download_job_result
	self = <urllib.request.HTTPHandler object at 0x7fa92ef6f580>
  ✅ test_jenkins_api_parse_job_data_check_counters
  ✅ test_jenkins_api_parse_job_data_check_failed_testcases
  ✅ test_jenkins_api_parse_job_data_check_regression_testcases
  ✅ test_jenkins_api_parse_job_data_check_status_counters_all_green_job
  ✅ test_jenkins_api_parse_job_data_check_status_counters_empty_job
  ❌ test_successful_api_response_verify_failed_testcases
	self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_failed_testcases>
  ❌ test_successful_api_response_verify_filtered_testcases
	self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_filtered_testcases>
  ❌ test_successful_api_response_verify_multi_filtered
	self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_multi_filtered>
tests.test_upstream_jira_umbrella_fetcher.TestUpstreamJiraUmbrellaFetcher
  ✅ test_fetch_with_upstream_jira_not_existing
  ✅ test_fetch_with_upstream_jira_that_does_not_have_commit
  ✅ test_fetch_with_upstream_jira_that_is_not_an_umbrella_works
  ✅ test_fetch_with_upstream_umbrella_cached_mode
  ✅ test_fetch_with_upstream_umbrella_force_mode
  ✅ test_fetch_with_upstream_umbrella_ignore_changes_manual_mode
tests.test_upstream_pr_fetcher.TestUpstreamPRFetcher
  ✅ test_with_valid_url_and_remote_diff_is_more_than_one_commit
  ✅ test_with_valid_url_and_remote_one_commit_missing_git_config
  ✅ test_with_valid_url_and_remote_one_commit_proper_git_config
  ✅ test_with_wrong_remote_name
  ✅ test_with_wrong_repo_url
tests.cdsw.test_branch_comparator.YarnCdswBranchDiffTests
  ❌ test_basic_cdsw_runner
	self = <tests.cdsw.test_branch_comparator.YarnCdswBranchDiffTests testMethod=test_basic_cdsw_runner>
  ✅ test_streaming_cmd_output
tests.cdsw.common.test_cdsw_runner_jobs_e2e.TestCdswRunnerJobsE2E
  ✅ test_branch_comparator_e2e
  ✅ test_jira_umbrella_data_fetcher_e2e
  ✅ test_review_sheet_backport_updater_e2e
  ✅ test_reviewsync_e2e
  ✅ test_unit_test_result_aggregator_e2e
  ✅ test_unit_test_result_fetcher_e2e
tests.common.test_shared_command_utils.TestFullEmailConfig
  ✅ test_only_with_account_user
  ✅ test_with_all_data_specified_but_recipients_is_not_a_list
  ✅ test_with_all_mandatory_data_specified_correctly
  ✅ test_with_all_mandatory_plus_other_data_specified_correctly
  ✅ test_with_default_args
  ✅ test_with_email_account_data_all_specified_without_recipients
  ✅ test_with_email_account_data_all_specified_without_sender
  ✅ test_with_email_account_data_without_smtp_port
  ✅ test_with_email_account_data_without_smtp_server

Annotations

Check failure on line 0 in junit/test-results-3.8.xml

See this annotation in the file changed.

@github-actions github-actions / Pytest Tests

pytest ► tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher ► test_jenkins_api_convert_latest_job

Failed test found in:
  junit/test-results-3.8.xml
Error:
  self = <urllib.request.HTTPHandler object at 0x7fa940214190>
Raw output
self = <urllib.request.HTTPHandler object at 0x7fa940214190>
http_class = <class 'http.client.HTTPConnection'>
req = <urllib.request.Request object at 0x7fa940214400>, http_conn_args = {}
host = 'build.infra.cloudera.com'
h = <http.client.HTTPConnection object at 0x7fa940214a00>

    def do_open(self, http_class, req, **http_conn_args):
        """Return an HTTPResponse object for the request, using http_class.
    
        http_class must implement the HTTPConnection API from http.client.
        """
        host = req.host
        if not host:
            raise URLError('no host given')
    
        # will parse host:port
        h = http_class(host, timeout=req.timeout, **http_conn_args)
        h.set_debuglevel(self._debuglevel)
    
        headers = dict(req.unredirected_hdrs)
        headers.update({k: v for k, v in req.headers.items()
                        if k not in headers})
    
        # TODO(jhylton): Should this be redesigned to handle
        # persistent connections?
    
        # We want to make an HTTP/1.1 request, but the addinfourl
        # class isn't prepared to deal with a persistent connection.
        # It will try to read all remaining data from the socket,
        # which will block while the server waits for the next request.
        # So make sure the connection gets closed after the (only)
        # request.
        headers["Connection"] = "close"
        headers = {name.title(): val for name, val in headers.items()}
    
        if req._tunnel_host:
            tunnel_headers = {}
            proxy_auth_hdr = "Proxy-Authorization"
            if proxy_auth_hdr in headers:
                tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
                # Proxy-Authorization should not be sent to origin
                # server.
                del headers[proxy_auth_hdr]
            h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
    
        try:
            try:
>               h.request(req.get_method(), req.selector, req.data, headers,
                          encode_chunked=req.has_header('Transfer-encoding'))

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa940214a00>, method = 'GET'
url = '/job/test_job/api/json?tree=builds[url,result,timestamp]', body = None
headers = {'Connection': 'close', 'Host': 'build.infra.cloudera.com', 'User-Agent': 'Python-urllib/3.8'}

    def request(self, method, url, body=None, headers={}, *,
                encode_chunked=False):
        """Send a complete request to the server."""
>       self._send_request(method, url, body, headers, encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa940214a00>, method = 'GET'
url = '/job/test_job/api/json?tree=builds[url,result,timestamp]', body = None
headers = {'Connection': 'close', 'Host': 'build.infra.cloudera.com', 'User-Agent': 'Python-urllib/3.8'}
encode_chunked = False

    def _send_request(self, method, url, body, headers, encode_chunked):
        # Honor explicitly requested Host: and Accept-Encoding: headers.
        header_names = frozenset(k.lower() for k in headers)
        skips = {}
        if 'host' in header_names:
            skips['skip_host'] = 1
        if 'accept-encoding' in header_names:
            skips['skip_accept_encoding'] = 1
    
        self.putrequest(method, url, **skips)
    
        # chunked encoding will happen if HTTP/1.1 is used and either
        # the caller passes encode_chunked=True or the following
        # conditions hold:
        # 1. content-length has not been explicitly set
        # 2. the body is a file or iterable, but not a str or bytes-like
        # 3. Transfer-Encoding has NOT been explicitly set by the caller
    
        if 'content-length' not in header_names:
            # only chunk body if not explicitly set for backwards
            # compatibility, assuming the client code is already handling the
            # chunking
            if 'transfer-encoding' not in header_names:
                # if content-length cannot be automatically determined, fall
                # back to chunked encoding
                encode_chunked = False
                content_length = self._get_content_length(body, method)
                if content_length is None:
                    if body is not None:
                        if self.debuglevel > 0:
                            print('Unable to determine size of %r' % body)
                        encode_chunked = True
                        self.putheader('Transfer-Encoding', 'chunked')
                else:
                    self.putheader('Content-Length', str(content_length))
        else:
            encode_chunked = False
    
        for hdr, value in headers.items():
            self.putheader(hdr, value)
        if isinstance(body, str):
            # RFC 2616 Section 3.7.1 says that text default has a
            # default charset of iso-8859-1.
            body = _encode(body, 'body')
>       self.endheaders(body, encode_chunked=encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1302: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa940214a00>
message_body = None

    def endheaders(self, message_body=None, *, encode_chunked=False):
        """Indicate that the last header line has been sent to the server.
    
        This method sends the request to the server.  The optional message_body
        argument can be used to pass a message body associated with the
        request.
        """
        if self.__state == _CS_REQ_STARTED:
            self.__state = _CS_REQ_SENT
        else:
            raise CannotSendHeader()
>       self._send_output(message_body, encode_chunked=encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1251: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa940214a00>
message_body = None, encode_chunked = False

    def _send_output(self, message_body=None, encode_chunked=False):
        """Send the currently buffered request and clear the buffer.
    
        Appends an extra \\r\\n to the buffer.
        A message_body may be specified, to be appended to the request.
        """
        self._buffer.extend((b"", b""))
        msg = b"\r\n".join(self._buffer)
        del self._buffer[:]
>       self.send(msg)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1011: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa940214a00>
data = b'GET /job/test_job/api/json?tree=builds[url,result,timestamp] HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: build.infra.cloudera.com\r\nUser-Agent: Python-urllib/3.8\r\nConnection: close\r\n\r\n'

    def send(self, data):
        """Send `data' to the server.
        ``data`` can be a string object, a bytes object, an array object, a
        file-like object that supports a .read() method, or an iterable object.
        """
    
        if self.sock is None:
            if self.auto_open:
>               self.connect()

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:951: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa940214a00>

    def connect(self):
        """Connect to the host and port specified in __init__."""
>       self.sock = self._create_connection(
            (self.host,self.port), self.timeout, self.source_address)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:922: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

address = ('build.infra.cloudera.com', 80)
timeout = <object object at 0x7fa9459f6940>, source_address = None

    def create_fake_connection(
            address,
            timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
            source_address=None):
        """drop-in replacement for :py:func:`socket.create_connection`"""
        s = fakesock.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
        if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
            s.settimeout(timeout)
    
        if isinstance(source_address, tuple) and len(source_address) == 2:
            source_address[1] = int(source_address[1])
    
        if source_address:
            s.bind(source_address)
>       s.connect(address)

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:937: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = httpretty.core.socket("build.infra.cloudera.com:80")
address = ('build.infra.cloudera.com', 80)

    def connect(self, address):
        try:
            self._address = (self._host, self._port) = address
        except ValueError:
            # We get here when the address is just a string pointing to a
            # unix socket path/file
            #
            # See issue #206
            self.is_http = False
        else:
            ports_to_check = (
                POTENTIAL_HTTP_PORTS.union(POTENTIAL_HTTPS_PORTS))
            self.is_http = self._port in ports_to_check
            self.is_secure = self._port in POTENTIAL_HTTPS_PORTS
    
        if not self.is_http:
            self.connect_truesock(address=address)
        elif self.truesock and not self.real_socket_is_connected():
            # TODO: remove nested if
            matcher = httpretty.match_http_address(self._host, self._port)
            if matcher is None:
>               self.connect_truesock(address=address)

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:614: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = httpretty.core.socket("build.infra.cloudera.com:80"), request = None
address = ('build.infra.cloudera.com', 80)

    def connect_truesock(self, request=None, address=None):
        address = address or self._address
    
        if self.__truesock_is_connected__:
            return self.truesock
    
        if request:
            logger.warning('real call to socket.connect() for {request}'.format(**locals()))
        elif address:
            logger.warning('real call to socket.connect() for {address}'.format(**locals()))
        else:
            logger.warning('real call to socket.connect()')
    
        if httpretty.allow_net_connect and not self.truesock:
            self.truesock = self.create_socket(address)
        elif not self.truesock:
            raise UnmockedError('Failed to socket.connect() because because a real socket was never created.', request=request, address=address)
    
        undo_patch_socket()
        try:
            hostname = self._address[0]
            port = 80
            if len(self._address) == 2:
                port = self._address[1]
            if port ==  443 and old_sslsocket:
                self.truesock = old_ssl_wrap_socket(self.truesock, server_hostname=hostname)
    
            sock = self.truesock
    
>           sock.connect(self._address)
E           socket.gaierror: [Errno -2] Name or service not known

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:658: gaierror

During handling of the above exception, another exception occurred:

self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_jenkins_api_convert_latest_job>
mock_fetch_json = <MagicMock name='fetch_json' id='140364600628128'>

    @patch(NETWORK_UTILS_PATCH_PATH)
    def test_jenkins_api_convert_latest_job(self, mock_fetch_json):
        jenkins_api = JenkinsApi(None, None)
        builds_dict = self._get_default_jenkins_builds_as_dict(build_id=200)
        sorted_builds_desc = sorted(builds_dict["builds"], key=lambda x: x["url"], reverse=True)
        mock_fetch_json.return_value = builds_dict
        job_name = "test_job"
        jenkins_urls: JenkinsJobUrls = JenkinsJobUrls(JENKINS_MAIN_URL, job_name)
>       failed_builds, total_no_of_builds = jenkins_api.list_builds_for_job(job_name, jenkins_urls, days=1)

tests/test_unit_test_result_fetcher.py:671: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yarndevtools/commands/unittestresultfetcher/jenkins.py:65: in list_builds_for_job
    all_builds: List[Dict[str, str]] = self._list_builds(jenkins_urls)
yarndevtools/commands/unittestresultfetcher/jenkins.py:98: in _list_builds
    data = self.safe_fetch_json(url)
yarndevtools/commands/unittestresultfetcher/jenkins.py:165: in safe_fetch_json
    data = self.fetch_json(
yarndevtools/commands/unittestresultfetcher/jenkins.py:201: in fetch_json
    ourl = opener.open(url)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:525: in open
    response = self._open(req, data)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:542: in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:502: in _call_chain
    result = func(*args)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1383: in http_open
    return self.do_open(http.client.HTTPConnection, req)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib.request.HTTPHandler object at 0x7fa940214190>
http_class = <class 'http.client.HTTPConnection'>
req = <urllib.request.Request object at 0x7fa940214400>, http_conn_args = {}
host = 'build.infra.cloudera.com'
h = <http.client.HTTPConnection object at 0x7fa940214a00>

    def do_open(self, http_class, req, **http_conn_args):
        """Return an HTTPResponse object for the request, using http_class.
    
        http_class must implement the HTTPConnection API from http.client.
        """
        host = req.host
        if not host:
            raise URLError('no host given')
    
        # will parse host:port
        h = http_class(host, timeout=req.timeout, **http_conn_args)
        h.set_debuglevel(self._debuglevel)
    
        headers = dict(req.unredirected_hdrs)
        headers.update({k: v for k, v in req.headers.items()
                        if k not in headers})
    
        # TODO(jhylton): Should this be redesigned to handle
        # persistent connections?
    
        # We want to make an HTTP/1.1 request, but the addinfourl
        # class isn't prepared to deal with a persistent connection.
        # It will try to read all remaining data from the socket,
        # which will block while the server waits for the next request.
        # So make sure the connection gets closed after the (only)
        # request.
        headers["Connection"] = "close"
        headers = {name.title(): val for name, val in headers.items()}
    
        if req._tunnel_host:
            tunnel_headers = {}
            proxy_auth_hdr = "Proxy-Authorization"
            if proxy_auth_hdr in headers:
                tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
                # Proxy-Authorization should not be sent to origin
                # server.
                del headers[proxy_auth_hdr]
            h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
    
        try:
            try:
                h.request(req.get_method(), req.selector, req.data, headers,
                          encode_chunked=req.has_header('Transfer-encoding'))
            except OSError as err: # timeout error
>               raise URLError(err)
E               urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1357: URLError

Check failure on line 0 in junit/test-results-3.8.xml

See this annotation in the file changed.

@github-actions github-actions / Pytest Tests

pytest ► tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher ► test_jenkins_api_convert_more_jobs

Failed test found in:
  junit/test-results-3.8.xml
Error:
  self = <urllib.request.HTTPHandler object at 0x7fa92e28d7c0>
Raw output
self = <urllib.request.HTTPHandler object at 0x7fa92e28d7c0>
http_class = <class 'http.client.HTTPConnection'>
req = <urllib.request.Request object at 0x7fa92e28d100>, http_conn_args = {}
host = 'build.infra.cloudera.com'
h = <http.client.HTTPConnection object at 0x7fa92e28d190>

    def do_open(self, http_class, req, **http_conn_args):
        """Return an HTTPResponse object for the request, using http_class.
    
        http_class must implement the HTTPConnection API from http.client.
        """
        host = req.host
        if not host:
            raise URLError('no host given')
    
        # will parse host:port
        h = http_class(host, timeout=req.timeout, **http_conn_args)
        h.set_debuglevel(self._debuglevel)
    
        headers = dict(req.unredirected_hdrs)
        headers.update({k: v for k, v in req.headers.items()
                        if k not in headers})
    
        # TODO(jhylton): Should this be redesigned to handle
        # persistent connections?
    
        # We want to make an HTTP/1.1 request, but the addinfourl
        # class isn't prepared to deal with a persistent connection.
        # It will try to read all remaining data from the socket,
        # which will block while the server waits for the next request.
        # So make sure the connection gets closed after the (only)
        # request.
        headers["Connection"] = "close"
        headers = {name.title(): val for name, val in headers.items()}
    
        if req._tunnel_host:
            tunnel_headers = {}
            proxy_auth_hdr = "Proxy-Authorization"
            if proxy_auth_hdr in headers:
                tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
                # Proxy-Authorization should not be sent to origin
                # server.
                del headers[proxy_auth_hdr]
            h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
    
        try:
            try:
>               h.request(req.get_method(), req.selector, req.data, headers,
                          encode_chunked=req.has_header('Transfer-encoding'))

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92e28d190>, method = 'GET'
url = '/job/test_job/api/json?tree=builds[url,result,timestamp]', body = None
headers = {'Connection': 'close', 'Host': 'build.infra.cloudera.com', 'User-Agent': 'Python-urllib/3.8'}

    def request(self, method, url, body=None, headers={}, *,
                encode_chunked=False):
        """Send a complete request to the server."""
>       self._send_request(method, url, body, headers, encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92e28d190>, method = 'GET'
url = '/job/test_job/api/json?tree=builds[url,result,timestamp]', body = None
headers = {'Connection': 'close', 'Host': 'build.infra.cloudera.com', 'User-Agent': 'Python-urllib/3.8'}
encode_chunked = False

    def _send_request(self, method, url, body, headers, encode_chunked):
        # Honor explicitly requested Host: and Accept-Encoding: headers.
        header_names = frozenset(k.lower() for k in headers)
        skips = {}
        if 'host' in header_names:
            skips['skip_host'] = 1
        if 'accept-encoding' in header_names:
            skips['skip_accept_encoding'] = 1
    
        self.putrequest(method, url, **skips)
    
        # chunked encoding will happen if HTTP/1.1 is used and either
        # the caller passes encode_chunked=True or the following
        # conditions hold:
        # 1. content-length has not been explicitly set
        # 2. the body is a file or iterable, but not a str or bytes-like
        # 3. Transfer-Encoding has NOT been explicitly set by the caller
    
        if 'content-length' not in header_names:
            # only chunk body if not explicitly set for backwards
            # compatibility, assuming the client code is already handling the
            # chunking
            if 'transfer-encoding' not in header_names:
                # if content-length cannot be automatically determined, fall
                # back to chunked encoding
                encode_chunked = False
                content_length = self._get_content_length(body, method)
                if content_length is None:
                    if body is not None:
                        if self.debuglevel > 0:
                            print('Unable to determine size of %r' % body)
                        encode_chunked = True
                        self.putheader('Transfer-Encoding', 'chunked')
                else:
                    self.putheader('Content-Length', str(content_length))
        else:
            encode_chunked = False
    
        for hdr, value in headers.items():
            self.putheader(hdr, value)
        if isinstance(body, str):
            # RFC 2616 Section 3.7.1 says that text default has a
            # default charset of iso-8859-1.
            body = _encode(body, 'body')
>       self.endheaders(body, encode_chunked=encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1302: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92e28d190>
message_body = None

    def endheaders(self, message_body=None, *, encode_chunked=False):
        """Indicate that the last header line has been sent to the server.
    
        This method sends the request to the server.  The optional message_body
        argument can be used to pass a message body associated with the
        request.
        """
        if self.__state == _CS_REQ_STARTED:
            self.__state = _CS_REQ_SENT
        else:
            raise CannotSendHeader()
>       self._send_output(message_body, encode_chunked=encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1251: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92e28d190>
message_body = None, encode_chunked = False

    def _send_output(self, message_body=None, encode_chunked=False):
        """Send the currently buffered request and clear the buffer.
    
        Appends an extra \\r\\n to the buffer.
        A message_body may be specified, to be appended to the request.
        """
        self._buffer.extend((b"", b""))
        msg = b"\r\n".join(self._buffer)
        del self._buffer[:]
>       self.send(msg)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1011: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92e28d190>
data = b'GET /job/test_job/api/json?tree=builds[url,result,timestamp] HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: build.infra.cloudera.com\r\nUser-Agent: Python-urllib/3.8\r\nConnection: close\r\n\r\n'

    def send(self, data):
        """Send `data' to the server.
        ``data`` can be a string object, a bytes object, an array object, a
        file-like object that supports a .read() method, or an iterable object.
        """
    
        if self.sock is None:
            if self.auto_open:
>               self.connect()

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:951: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92e28d190>

    def connect(self):
        """Connect to the host and port specified in __init__."""
>       self.sock = self._create_connection(
            (self.host,self.port), self.timeout, self.source_address)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:922: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

address = ('build.infra.cloudera.com', 80)
timeout = <object object at 0x7fa9459f6940>, source_address = None

    def create_fake_connection(
            address,
            timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
            source_address=None):
        """drop-in replacement for :py:func:`socket.create_connection`"""
        s = fakesock.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
        if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
            s.settimeout(timeout)
    
        if isinstance(source_address, tuple) and len(source_address) == 2:
            source_address[1] = int(source_address[1])
    
        if source_address:
            s.bind(source_address)
>       s.connect(address)

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:937: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = httpretty.core.socket("build.infra.cloudera.com:80")
address = ('build.infra.cloudera.com', 80)

    def connect(self, address):
        try:
            self._address = (self._host, self._port) = address
        except ValueError:
            # We get here when the address is just a string pointing to a
            # unix socket path/file
            #
            # See issue #206
            self.is_http = False
        else:
            ports_to_check = (
                POTENTIAL_HTTP_PORTS.union(POTENTIAL_HTTPS_PORTS))
            self.is_http = self._port in ports_to_check
            self.is_secure = self._port in POTENTIAL_HTTPS_PORTS
    
        if not self.is_http:
            self.connect_truesock(address=address)
        elif self.truesock and not self.real_socket_is_connected():
            # TODO: remove nested if
            matcher = httpretty.match_http_address(self._host, self._port)
            if matcher is None:
>               self.connect_truesock(address=address)

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:614: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = httpretty.core.socket("build.infra.cloudera.com:80"), request = None
address = ('build.infra.cloudera.com', 80)

    def connect_truesock(self, request=None, address=None):
        address = address or self._address
    
        if self.__truesock_is_connected__:
            return self.truesock
    
        if request:
            logger.warning('real call to socket.connect() for {request}'.format(**locals()))
        elif address:
            logger.warning('real call to socket.connect() for {address}'.format(**locals()))
        else:
            logger.warning('real call to socket.connect()')
    
        if httpretty.allow_net_connect and not self.truesock:
            self.truesock = self.create_socket(address)
        elif not self.truesock:
            raise UnmockedError('Failed to socket.connect() because because a real socket was never created.', request=request, address=address)
    
        undo_patch_socket()
        try:
            hostname = self._address[0]
            port = 80
            if len(self._address) == 2:
                port = self._address[1]
            if port ==  443 and old_sslsocket:
                self.truesock = old_ssl_wrap_socket(self.truesock, server_hostname=hostname)
    
            sock = self.truesock
    
>           sock.connect(self._address)
E           socket.gaierror: [Errno -2] Name or service not known

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:658: gaierror

During handling of the above exception, another exception occurred:

self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_jenkins_api_convert_more_jobs>
mock_fetch_json = <MagicMock name='fetch_json' id='140364909288368'>

    @patch(NETWORK_UTILS_PATCH_PATH)
    def test_jenkins_api_convert_more_jobs(self, mock_fetch_json):
        jenkins_api = JenkinsApi(None, None)
        builds_dict = self._get_default_jenkins_builds_as_dict(build_id=200)
        sorted_builds_desc = sorted(builds_dict["builds"], key=lambda x: x["url"], reverse=True)
        mock_fetch_json.return_value = builds_dict
        job_name = "test_job"
        jenkins_urls: JenkinsJobUrls = JenkinsJobUrls(JENKINS_MAIN_URL, job_name)
>       failed_builds, total_no_of_builds = jenkins_api.list_builds_for_job(job_name, jenkins_urls, days=16)

tests/test_unit_test_result_fetcher.py:691: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yarndevtools/commands/unittestresultfetcher/jenkins.py:65: in list_builds_for_job
    all_builds: List[Dict[str, str]] = self._list_builds(jenkins_urls)
yarndevtools/commands/unittestresultfetcher/jenkins.py:98: in _list_builds
    data = self.safe_fetch_json(url)
yarndevtools/commands/unittestresultfetcher/jenkins.py:165: in safe_fetch_json
    data = self.fetch_json(
yarndevtools/commands/unittestresultfetcher/jenkins.py:201: in fetch_json
    ourl = opener.open(url)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:525: in open
    response = self._open(req, data)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:542: in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:502: in _call_chain
    result = func(*args)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1383: in http_open
    return self.do_open(http.client.HTTPConnection, req)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib.request.HTTPHandler object at 0x7fa92e28d7c0>
http_class = <class 'http.client.HTTPConnection'>
req = <urllib.request.Request object at 0x7fa92e28d100>, http_conn_args = {}
host = 'build.infra.cloudera.com'
h = <http.client.HTTPConnection object at 0x7fa92e28d190>

    def do_open(self, http_class, req, **http_conn_args):
        """Return an HTTPResponse object for the request, using http_class.
    
        http_class must implement the HTTPConnection API from http.client.
        """
        host = req.host
        if not host:
            raise URLError('no host given')
    
        # will parse host:port
        h = http_class(host, timeout=req.timeout, **http_conn_args)
        h.set_debuglevel(self._debuglevel)
    
        headers = dict(req.unredirected_hdrs)
        headers.update({k: v for k, v in req.headers.items()
                        if k not in headers})
    
        # TODO(jhylton): Should this be redesigned to handle
        # persistent connections?
    
        # We want to make an HTTP/1.1 request, but the addinfourl
        # class isn't prepared to deal with a persistent connection.
        # It will try to read all remaining data from the socket,
        # which will block while the server waits for the next request.
        # So make sure the connection gets closed after the (only)
        # request.
        headers["Connection"] = "close"
        headers = {name.title(): val for name, val in headers.items()}
    
        if req._tunnel_host:
            tunnel_headers = {}
            proxy_auth_hdr = "Proxy-Authorization"
            if proxy_auth_hdr in headers:
                tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
                # Proxy-Authorization should not be sent to origin
                # server.
                del headers[proxy_auth_hdr]
            h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
    
        try:
            try:
                h.request(req.get_method(), req.selector, req.data, headers,
                          encode_chunked=req.has_header('Transfer-encoding'))
            except OSError as err: # timeout error
>               raise URLError(err)
E               urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1357: URLError

Check failure on line 0 in junit/test-results-3.8.xml

See this annotation in the file changed.

@github-actions github-actions / Pytest Tests

pytest ► tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher ► test_jenkins_api_download_job_result

Failed test found in:
  junit/test-results-3.8.xml
Error:
  self = <urllib.request.HTTPHandler object at 0x7fa92ef6f580>
Raw output
self = <urllib.request.HTTPHandler object at 0x7fa92ef6f580>
http_class = <class 'http.client.HTTPConnection'>
req = <urllib.request.Request object at 0x7fa92ef6f700>, http_conn_args = {}
host = 'full', h = <http.client.HTTPConnection object at 0x7fa92ef6fbb0>

    def do_open(self, http_class, req, **http_conn_args):
        """Return an HTTPResponse object for the request, using http_class.
    
        http_class must implement the HTTPConnection API from http.client.
        """
        host = req.host
        if not host:
            raise URLError('no host given')
    
        # will parse host:port
        h = http_class(host, timeout=req.timeout, **http_conn_args)
        h.set_debuglevel(self._debuglevel)
    
        headers = dict(req.unredirected_hdrs)
        headers.update({k: v for k, v in req.headers.items()
                        if k not in headers})
    
        # TODO(jhylton): Should this be redesigned to handle
        # persistent connections?
    
        # We want to make an HTTP/1.1 request, but the addinfourl
        # class isn't prepared to deal with a persistent connection.
        # It will try to read all remaining data from the socket,
        # which will block while the server waits for the next request.
        # So make sure the connection gets closed after the (only)
        # request.
        headers["Connection"] = "close"
        headers = {name.title(): val for name, val in headers.items()}
    
        if req._tunnel_host:
            tunnel_headers = {}
            proxy_auth_hdr = "Proxy-Authorization"
            if proxy_auth_hdr in headers:
                tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
                # Proxy-Authorization should not be sent to origin
                # server.
                del headers[proxy_auth_hdr]
            h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
    
        try:
            try:
>               h.request(req.get_method(), req.selector, req.data, headers,
                          encode_chunked=req.has_header('Transfer-encoding'))

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92ef6fbb0>, method = 'GET'
url = '/url/of/job/42/testReport/api/json?pretty=true', body = None
headers = {'Connection': 'close', 'Host': 'full', 'User-Agent': 'Python-urllib/3.8'}

    def request(self, method, url, body=None, headers={}, *,
                encode_chunked=False):
        """Send a complete request to the server."""
>       self._send_request(method, url, body, headers, encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1256: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92ef6fbb0>, method = 'GET'
url = '/url/of/job/42/testReport/api/json?pretty=true', body = None
headers = {'Connection': 'close', 'Host': 'full', 'User-Agent': 'Python-urllib/3.8'}
encode_chunked = False

    def _send_request(self, method, url, body, headers, encode_chunked):
        # Honor explicitly requested Host: and Accept-Encoding: headers.
        header_names = frozenset(k.lower() for k in headers)
        skips = {}
        if 'host' in header_names:
            skips['skip_host'] = 1
        if 'accept-encoding' in header_names:
            skips['skip_accept_encoding'] = 1
    
        self.putrequest(method, url, **skips)
    
        # chunked encoding will happen if HTTP/1.1 is used and either
        # the caller passes encode_chunked=True or the following
        # conditions hold:
        # 1. content-length has not been explicitly set
        # 2. the body is a file or iterable, but not a str or bytes-like
        # 3. Transfer-Encoding has NOT been explicitly set by the caller
    
        if 'content-length' not in header_names:
            # only chunk body if not explicitly set for backwards
            # compatibility, assuming the client code is already handling the
            # chunking
            if 'transfer-encoding' not in header_names:
                # if content-length cannot be automatically determined, fall
                # back to chunked encoding
                encode_chunked = False
                content_length = self._get_content_length(body, method)
                if content_length is None:
                    if body is not None:
                        if self.debuglevel > 0:
                            print('Unable to determine size of %r' % body)
                        encode_chunked = True
                        self.putheader('Transfer-Encoding', 'chunked')
                else:
                    self.putheader('Content-Length', str(content_length))
        else:
            encode_chunked = False
    
        for hdr, value in headers.items():
            self.putheader(hdr, value)
        if isinstance(body, str):
            # RFC 2616 Section 3.7.1 says that text default has a
            # default charset of iso-8859-1.
            body = _encode(body, 'body')
>       self.endheaders(body, encode_chunked=encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1302: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92ef6fbb0>
message_body = None

    def endheaders(self, message_body=None, *, encode_chunked=False):
        """Indicate that the last header line has been sent to the server.
    
        This method sends the request to the server.  The optional message_body
        argument can be used to pass a message body associated with the
        request.
        """
        if self.__state == _CS_REQ_STARTED:
            self.__state = _CS_REQ_SENT
        else:
            raise CannotSendHeader()
>       self._send_output(message_body, encode_chunked=encode_chunked)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1251: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92ef6fbb0>
message_body = None, encode_chunked = False

    def _send_output(self, message_body=None, encode_chunked=False):
        """Send the currently buffered request and clear the buffer.
    
        Appends an extra \\r\\n to the buffer.
        A message_body may be specified, to be appended to the request.
        """
        self._buffer.extend((b"", b""))
        msg = b"\r\n".join(self._buffer)
        del self._buffer[:]
>       self.send(msg)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:1011: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92ef6fbb0>
data = b'GET /url/of/job/42/testReport/api/json?pretty=true HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: full\r\nUser-Agent: Python-urllib/3.8\r\nConnection: close\r\n\r\n'

    def send(self, data):
        """Send `data' to the server.
        ``data`` can be a string object, a bytes object, an array object, a
        file-like object that supports a .read() method, or an iterable object.
        """
    
        if self.sock is None:
            if self.auto_open:
>               self.connect()

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:951: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.client.HTTPConnection object at 0x7fa92ef6fbb0>

    def connect(self):
        """Connect to the host and port specified in __init__."""
>       self.sock = self._create_connection(
            (self.host,self.port), self.timeout, self.source_address)

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/http/client.py:922: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

address = ('full', 80), timeout = <object object at 0x7fa9459f6940>
source_address = None

    def create_fake_connection(
            address,
            timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
            source_address=None):
        """drop-in replacement for :py:func:`socket.create_connection`"""
        s = fakesock.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
        if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
            s.settimeout(timeout)
    
        if isinstance(source_address, tuple) and len(source_address) == 2:
            source_address[1] = int(source_address[1])
    
        if source_address:
            s.bind(source_address)
>       s.connect(address)

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:937: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = httpretty.core.socket("full:80"), address = ('full', 80)

    def connect(self, address):
        try:
            self._address = (self._host, self._port) = address
        except ValueError:
            # We get here when the address is just a string pointing to a
            # unix socket path/file
            #
            # See issue #206
            self.is_http = False
        else:
            ports_to_check = (
                POTENTIAL_HTTP_PORTS.union(POTENTIAL_HTTPS_PORTS))
            self.is_http = self._port in ports_to_check
            self.is_secure = self._port in POTENTIAL_HTTPS_PORTS
    
        if not self.is_http:
            self.connect_truesock(address=address)
        elif self.truesock and not self.real_socket_is_connected():
            # TODO: remove nested if
            matcher = httpretty.match_http_address(self._host, self._port)
            if matcher is None:
>               self.connect_truesock(address=address)

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:614: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = httpretty.core.socket("full:80"), request = None, address = ('full', 80)

    def connect_truesock(self, request=None, address=None):
        address = address or self._address
    
        if self.__truesock_is_connected__:
            return self.truesock
    
        if request:
            logger.warning('real call to socket.connect() for {request}'.format(**locals()))
        elif address:
            logger.warning('real call to socket.connect() for {address}'.format(**locals()))
        else:
            logger.warning('real call to socket.connect()')
    
        if httpretty.allow_net_connect and not self.truesock:
            self.truesock = self.create_socket(address)
        elif not self.truesock:
            raise UnmockedError('Failed to socket.connect() because because a real socket was never created.', request=request, address=address)
    
        undo_patch_socket()
        try:
            hostname = self._address[0]
            port = 80
            if len(self._address) == 2:
                port = self._address[1]
            if port ==  443 and old_sslsocket:
                self.truesock = old_ssl_wrap_socket(self.truesock, server_hostname=hostname)
    
            sock = self.truesock
    
>           sock.connect(self._address)
E           socket.gaierror: [Errno -3] Temporary failure in name resolution

../../../.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/httpretty/core.py:658: gaierror

During handling of the above exception, another exception occurred:

self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_jenkins_api_download_job_result>
mock_fetch_json = <MagicMock name='fetch_json' id='140364789939312'>

    @patch(NETWORK_UTILS_PATCH_PATH)
    def test_jenkins_api_download_job_result(self, mock_fetch_json: Mock):
        jenkins_api = JenkinsApi(None, None)
        builds_dict = self._get_default_jenkins_builds_as_dict(build_id=200)
        failed_build = FailedJenkinsBuild("http://full/url/of/job/42", 1244525, "test_job")
        mock_fetch_json.return_value = builds_dict
    
>       act_test_report = jenkins_api.download_job_result(failed_build, Mock(spec=DownloadProgress))

tests/test_unit_test_result_fetcher.py:711: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yarndevtools/commands/unittestresultfetcher/jenkins.py:156: in download_job_result
    return self.safe_fetch_json(url)
yarndevtools/commands/unittestresultfetcher/jenkins.py:165: in safe_fetch_json
    data = self.fetch_json(
yarndevtools/commands/unittestresultfetcher/jenkins.py:201: in fetch_json
    ourl = opener.open(url)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:525: in open
    response = self._open(req, data)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:542: in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:502: in _call_chain
    result = func(*args)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1383: in http_open
    return self.do_open(http.client.HTTPConnection, req)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib.request.HTTPHandler object at 0x7fa92ef6f580>
http_class = <class 'http.client.HTTPConnection'>
req = <urllib.request.Request object at 0x7fa92ef6f700>, http_conn_args = {}
host = 'full', h = <http.client.HTTPConnection object at 0x7fa92ef6fbb0>

    def do_open(self, http_class, req, **http_conn_args):
        """Return an HTTPResponse object for the request, using http_class.
    
        http_class must implement the HTTPConnection API from http.client.
        """
        host = req.host
        if not host:
            raise URLError('no host given')
    
        # will parse host:port
        h = http_class(host, timeout=req.timeout, **http_conn_args)
        h.set_debuglevel(self._debuglevel)
    
        headers = dict(req.unredirected_hdrs)
        headers.update({k: v for k, v in req.headers.items()
                        if k not in headers})
    
        # TODO(jhylton): Should this be redesigned to handle
        # persistent connections?
    
        # We want to make an HTTP/1.1 request, but the addinfourl
        # class isn't prepared to deal with a persistent connection.
        # It will try to read all remaining data from the socket,
        # which will block while the server waits for the next request.
        # So make sure the connection gets closed after the (only)
        # request.
        headers["Connection"] = "close"
        headers = {name.title(): val for name, val in headers.items()}
    
        if req._tunnel_host:
            tunnel_headers = {}
            proxy_auth_hdr = "Proxy-Authorization"
            if proxy_auth_hdr in headers:
                tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
                # Proxy-Authorization should not be sent to origin
                # server.
                del headers[proxy_auth_hdr]
            h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
    
        try:
            try:
                h.request(req.get_method(), req.selector, req.data, headers,
                          encode_chunked=req.has_header('Transfer-encoding'))
            except OSError as err: # timeout error
>               raise URLError(err)
E               urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/urllib/request.py:1357: URLError

Check failure on line 0 in junit/test-results-3.8.xml

See this annotation in the file changed.

@github-actions github-actions / Pytest Tests

pytest ► tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher ► test_successful_api_response_verify_failed_testcases

Failed test found in:
  junit/test-results-3.8.xml
Error:
  self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_failed_testcases>
Raw output
self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_failed_testcases>
mock_send_mail_call = <MagicMock name='send_mail' id='140364902309456'>

    @patch(SEND_MAIL_PATCH_PATH)
    @mongomock.patch(servers=(("mongo.example.com", 27017),))
    def test_successful_api_response_verify_failed_testcases(self, mock_send_mail_call):
        # TODO Re-enable test once mongomock PR is merged / created
        spec = JenkinsReportJsonSpec(
            failed={PACK_3: 10, PACK_4: 20},
            skipped={PACK_1: 10, PACK_2: 20},
            passed={PACK_1: 10, PACK_2: 20},
        )
        build_id, builds_json = self._get_default_jenkins_builds_as_json(build_id=200)
        report_json = self._get_jenkins_report_as_json(spec)
        self._mock_jenkins_build_api(builds_json)
        self._mock_jenkins_report_api(report_json, build_id=200)
    
>       reporter = UnitTestResultFetcher(self.generate_args(), self.output_dir)

tests/test_unit_test_result_fetcher.py:551: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yarndevtools/commands/unittestresultfetcher/unit_test_result_fetcher.py:145: in __init__
    self.config = UnitTestResultFetcherConfig(output_dir, args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <yarndevtools.commands.unittestresultfetcher.unit_test_result_fetcher.UnitTestResultFetcherConfig object at 0x7fa940241280>
output_dir = '/home/runner/snemeth-dev-projects/yarndevtools/test/unit-test-result-fetcher'
args = <tests.test_utilities.Object object at 0x7fa941990790>

    def __init__(self, output_dir: str, args):
        self.args = args
        self.force_download_mode = args.force_download_mode if hasattr(args, "force_download_mode") else False
        self.load_cached_reports_to_db: bool = (
            args.load_cached_reports_to_db if hasattr(args, "load_cached_reports_to_db") else False
        )
        self.cache: CacheConfig = CacheConfig(
            args,
            output_dir,
            force_download_mode=self.force_download_mode,
            load_cached_reports_to_db=self.load_cached_reports_to_db,
        )
        self.email: EmailConfig = EmailConfig(args)
        self.request_limit = args.req_limit if hasattr(args, "req_limit") and args.req_limit else 1
        self.jenkins_mode: UnitTestResultFetcherMode = (
            UnitTestResultFetcherMode[args.jenkins_mode.upper()]
            if hasattr(args, "jenkins_mode") and args.jenkins_mode
            else None
        )
        self.jenkins_base_url = args.jenkins_url
        self.jenkins_user = args.jenkins_user if hasattr(args, "jenkins_user") and args.jenkins_user else None
        self.jenkins_password = (
            args.jenkins_password if hasattr(args, "jenkins_password") and args.jenkins_password else None
        )
    
        self.job_names: List[str] = args.job_names.split(",")
        self.num_builds: int = self._determine_number_of_builds_to_examine(args.num_builds, self.request_limit)
        tc_filters_raw = args.tc_filters if hasattr(args, "tc_filters") and args.tc_filters else []
        self.tc_filters: List[JenkinsTestcaseFilter] = [
            JenkinsTestcaseFilter(*tcf.split(":")) for tcf in tc_filters_raw
        ]
        self.full_cmd: str = OsUtils.determine_full_command_filtered(filter_password=True)
        self.omit_job_summary: bool = args.omit_job_summary if hasattr(args, "omit_job_summary") else False
        self.fail_on_all_green_job_result: bool = False  # TODO hardcoded
        self.fail_on_empty_job_result: bool = False  # TODO hardcoded
        self.fail_on_no_data_job_result: bool = False  # TODO hardcoded
        self.reset_job_build_data_for_jobs: List[str] = (
            args.reset_job_build_data_for_jobs if hasattr(args, "reset_job_build_data_for_jobs") else []
        )
        self.mongo_config = MongoDbConfig(args)
    
        # Validation
        if not self.tc_filters:
            LOG.warning("TESTCASE FILTER IS NOT SET!")
        if self.jenkins_mode and (self.jenkins_base_url or self.job_names):
            LOG.warning(
                "Jenkins mode is set to %s. \n"
                "Specified values for Jenkins URL: %s\n"
                "Specified values for job names: %s\n"
                "Jenkins mode will take precedence!",
                self.jenkins_mode,
                self.jenkins_base_url,
                self.job_names,
            )
            self.jenkins_base_url = self.jenkins_mode.jenkins_base_url
            self.job_names = self.jenkins_mode.job_names
    
        if not all([reset in self.job_names for reset in self.reset_job_build_data_for_jobs]):
            raise ValueError(
                "Not all jobs are recognized while trying to reset job build data for jobs! "
                "Valid job names: {}, Current job names: {}".format(self.job_names, self.reset_job_build_data_for_jobs)
            )
    
        self.email.validate(self.job_names)
    
        if not self.jenkins_user:
>           raise ValueError("Jenkins user should be specified for API authentication")
E           ValueError: Jenkins user should be specified for API authentication

yarndevtools/commands/unittestresultfetcher/unit_test_result_fetcher.py:111: ValueError

Check failure on line 0 in junit/test-results-3.8.xml

See this annotation in the file changed.

@github-actions github-actions / Pytest Tests

pytest ► tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher ► test_successful_api_response_verify_filtered_testcases

Failed test found in:
  junit/test-results-3.8.xml
Error:
  self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_filtered_testcases>
Raw output
self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_filtered_testcases>
mock_send_mail_call = <MagicMock name='send_mail' id='140364903064240'>

    @patch(SEND_MAIL_PATCH_PATH)
    @mongomock.patch(servers=(("mongo.example.com", 27017),))
    def test_successful_api_response_verify_filtered_testcases(self, mock_send_mail_call):
        # TODO Re-enable test once mongomock PR is merged / created
        spec = JenkinsReportJsonSpec(
            failed={PACK_3: 10, PACK_4: 20, self._get_package_from_filter(YARN_TC_FILTER): 25},
            skipped={PACK_1: 10, PACK_2: 20},
            passed={PACK_1: 10, PACK_2: 20},
        )
        failed_testcases: List[str] = spec.get_failed_testcases(self._get_package_from_filter(YARN_TC_FILTER))
        build_id, builds_json = self._get_default_jenkins_builds_as_json(build_id=200)
        report_json = self._get_jenkins_report_as_json(spec)
        self._mock_jenkins_build_api(builds_json)
        self._mock_jenkins_report_api(report_json, build_id=200)
    
>       reporter = UnitTestResultFetcher(self.generate_args(), self.output_dir)

tests/test_unit_test_result_fetcher.py:579: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yarndevtools/commands/unittestresultfetcher/unit_test_result_fetcher.py:145: in __init__
    self.config = UnitTestResultFetcherConfig(output_dir, args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <yarndevtools.commands.unittestresultfetcher.unit_test_result_fetcher.UnitTestResultFetcherConfig object at 0x7fa940245f40>
output_dir = '/home/runner/snemeth-dev-projects/yarndevtools/test/unit-test-result-fetcher'
args = <tests.test_utilities.Object object at 0x7fa940245a30>

    def __init__(self, output_dir: str, args):
        self.args = args
        self.force_download_mode = args.force_download_mode if hasattr(args, "force_download_mode") else False
        self.load_cached_reports_to_db: bool = (
            args.load_cached_reports_to_db if hasattr(args, "load_cached_reports_to_db") else False
        )
        self.cache: CacheConfig = CacheConfig(
            args,
            output_dir,
            force_download_mode=self.force_download_mode,
            load_cached_reports_to_db=self.load_cached_reports_to_db,
        )
        self.email: EmailConfig = EmailConfig(args)
        self.request_limit = args.req_limit if hasattr(args, "req_limit") and args.req_limit else 1
        self.jenkins_mode: UnitTestResultFetcherMode = (
            UnitTestResultFetcherMode[args.jenkins_mode.upper()]
            if hasattr(args, "jenkins_mode") and args.jenkins_mode
            else None
        )
        self.jenkins_base_url = args.jenkins_url
        self.jenkins_user = args.jenkins_user if hasattr(args, "jenkins_user") and args.jenkins_user else None
        self.jenkins_password = (
            args.jenkins_password if hasattr(args, "jenkins_password") and args.jenkins_password else None
        )
    
        self.job_names: List[str] = args.job_names.split(",")
        self.num_builds: int = self._determine_number_of_builds_to_examine(args.num_builds, self.request_limit)
        tc_filters_raw = args.tc_filters if hasattr(args, "tc_filters") and args.tc_filters else []
        self.tc_filters: List[JenkinsTestcaseFilter] = [
            JenkinsTestcaseFilter(*tcf.split(":")) for tcf in tc_filters_raw
        ]
        self.full_cmd: str = OsUtils.determine_full_command_filtered(filter_password=True)
        self.omit_job_summary: bool = args.omit_job_summary if hasattr(args, "omit_job_summary") else False
        self.fail_on_all_green_job_result: bool = False  # TODO hardcoded
        self.fail_on_empty_job_result: bool = False  # TODO hardcoded
        self.fail_on_no_data_job_result: bool = False  # TODO hardcoded
        self.reset_job_build_data_for_jobs: List[str] = (
            args.reset_job_build_data_for_jobs if hasattr(args, "reset_job_build_data_for_jobs") else []
        )
        self.mongo_config = MongoDbConfig(args)
    
        # Validation
        if not self.tc_filters:
            LOG.warning("TESTCASE FILTER IS NOT SET!")
        if self.jenkins_mode and (self.jenkins_base_url or self.job_names):
            LOG.warning(
                "Jenkins mode is set to %s. \n"
                "Specified values for Jenkins URL: %s\n"
                "Specified values for job names: %s\n"
                "Jenkins mode will take precedence!",
                self.jenkins_mode,
                self.jenkins_base_url,
                self.job_names,
            )
            self.jenkins_base_url = self.jenkins_mode.jenkins_base_url
            self.job_names = self.jenkins_mode.job_names
    
        if not all([reset in self.job_names for reset in self.reset_job_build_data_for_jobs]):
            raise ValueError(
                "Not all jobs are recognized while trying to reset job build data for jobs! "
                "Valid job names: {}, Current job names: {}".format(self.job_names, self.reset_job_build_data_for_jobs)
            )
    
        self.email.validate(self.job_names)
    
        if not self.jenkins_user:
>           raise ValueError("Jenkins user should be specified for API authentication")
E           ValueError: Jenkins user should be specified for API authentication

yarndevtools/commands/unittestresultfetcher/unit_test_result_fetcher.py:111: ValueError

Check failure on line 0 in junit/test-results-3.8.xml

See this annotation in the file changed.

@github-actions github-actions / Pytest Tests

pytest ► tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher ► test_successful_api_response_verify_multi_filtered

Failed test found in:
  junit/test-results-3.8.xml
Error:
  self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_multi_filtered>
Raw output
self = <tests.test_unit_test_result_fetcher.TestUnitTestResultFetcher testMethod=test_successful_api_response_verify_multi_filtered>
mock_send_mail_call = <MagicMock name='send_mail' id='140364813468768'>

    @patch(SEND_MAIL_PATCH_PATH)
    @mongomock.patch(servers=(("mongo.example.com", 27017),))
    def test_successful_api_response_verify_multi_filtered(self, mock_send_mail_call):
        # TODO Re-enable test once mongomock PR is merged / created
        spec = JenkinsReportJsonSpec.get_arbitrary()
        failed_yarn_testcases: List[str] = spec.get_failed_testcases(self._get_package_from_filter(YARN_TC_FILTER))
        failed_mr_testcases: List[str] = spec.get_failed_testcases(self._get_package_from_filter(MAPRED_TC_FILTER))
        build_id, builds_json = self._get_default_jenkins_builds_as_json(build_id=200)
        report_json = self._get_jenkins_report_as_json(spec)
        self._mock_jenkins_build_api(builds_json)
        self._mock_jenkins_report_api(report_json, build_id=200)
    
>       reporter = UnitTestResultFetcher(self.generate_args(tc_filters=MULTI_FILTER), self.output_dir)

tests/test_unit_test_result_fetcher.py:604: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
yarndevtools/commands/unittestresultfetcher/unit_test_result_fetcher.py:145: in __init__
    self.config = UnitTestResultFetcherConfig(output_dir, args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <yarndevtools.commands.unittestresultfetcher.unit_test_result_fetcher.UnitTestResultFetcherConfig object at 0x7fa9402c4160>
output_dir = '/home/runner/snemeth-dev-projects/yarndevtools/test/unit-test-result-fetcher'
args = <tests.test_utilities.Object object at 0x7fa9402c4430>

    def __init__(self, output_dir: str, args):
        self.args = args
        self.force_download_mode = args.force_download_mode if hasattr(args, "force_download_mode") else False
        self.load_cached_reports_to_db: bool = (
            args.load_cached_reports_to_db if hasattr(args, "load_cached_reports_to_db") else False
        )
        self.cache: CacheConfig = CacheConfig(
            args,
            output_dir,
            force_download_mode=self.force_download_mode,
            load_cached_reports_to_db=self.load_cached_reports_to_db,
        )
        self.email: EmailConfig = EmailConfig(args)
        self.request_limit = args.req_limit if hasattr(args, "req_limit") and args.req_limit else 1
        self.jenkins_mode: UnitTestResultFetcherMode = (
            UnitTestResultFetcherMode[args.jenkins_mode.upper()]
            if hasattr(args, "jenkins_mode") and args.jenkins_mode
            else None
        )
        self.jenkins_base_url = args.jenkins_url
        self.jenkins_user = args.jenkins_user if hasattr(args, "jenkins_user") and args.jenkins_user else None
        self.jenkins_password = (
            args.jenkins_password if hasattr(args, "jenkins_password") and args.jenkins_password else None
        )
    
        self.job_names: List[str] = args.job_names.split(",")
        self.num_builds: int = self._determine_number_of_builds_to_examine(args.num_builds, self.request_limit)
        tc_filters_raw = args.tc_filters if hasattr(args, "tc_filters") and args.tc_filters else []
        self.tc_filters: List[JenkinsTestcaseFilter] = [
            JenkinsTestcaseFilter(*tcf.split(":")) for tcf in tc_filters_raw
        ]
        self.full_cmd: str = OsUtils.determine_full_command_filtered(filter_password=True)
        self.omit_job_summary: bool = args.omit_job_summary if hasattr(args, "omit_job_summary") else False
        self.fail_on_all_green_job_result: bool = False  # TODO hardcoded
        self.fail_on_empty_job_result: bool = False  # TODO hardcoded
        self.fail_on_no_data_job_result: bool = False  # TODO hardcoded
        self.reset_job_build_data_for_jobs: List[str] = (
            args.reset_job_build_data_for_jobs if hasattr(args, "reset_job_build_data_for_jobs") else []
        )
        self.mongo_config = MongoDbConfig(args)
    
        # Validation
        if not self.tc_filters:
            LOG.warning("TESTCASE FILTER IS NOT SET!")
        if self.jenkins_mode and (self.jenkins_base_url or self.job_names):
            LOG.warning(
                "Jenkins mode is set to %s. \n"
                "Specified values for Jenkins URL: %s\n"
                "Specified values for job names: %s\n"
                "Jenkins mode will take precedence!",
                self.jenkins_mode,
                self.jenkins_base_url,
                self.job_names,
            )
            self.jenkins_base_url = self.jenkins_mode.jenkins_base_url
            self.job_names = self.jenkins_mode.job_names
    
        if not all([reset in self.job_names for reset in self.reset_job_build_data_for_jobs]):
            raise ValueError(
                "Not all jobs are recognized while trying to reset job build data for jobs! "
                "Valid job names: {}, Current job names: {}".format(self.job_names, self.reset_job_build_data_for_jobs)
            )
    
        self.email.validate(self.job_names)
    
        if not self.jenkins_user:
>           raise ValueError("Jenkins user should be specified for API authentication")
E           ValueError: Jenkins user should be specified for API authentication

yarndevtools/commands/unittestresultfetcher/unit_test_result_fetcher.py:111: ValueError

Check failure on line 0 in junit/test-results-3.8.xml

See this annotation in the file changed.

@github-actions github-actions / Pytest Tests

pytest ► tests.cdsw.test_branch_comparator.YarnCdswBranchDiffTests ► test_basic_cdsw_runner

Failed test found in:
  junit/test-results-3.8.xml
Error:
  self = <tests.cdsw.test_branch_comparator.YarnCdswBranchDiffTests testMethod=test_basic_cdsw_runner>
Raw output
self = <tests.cdsw.test_branch_comparator.YarnCdswBranchDiffTests testMethod=test_basic_cdsw_runner>

    def test_basic_cdsw_runner(self):
        def _callback(cmd, cmd_output, docker_setup):
            self.config.python_module_root = cmd_output
    
        self.setup_default_docker_mounts()
        self.docker_test_setup.run_container(sleep=self.config.container_sleep_seconds)
        self.exec_get_python_module_root(callback=_callback)
        self.exec_initial_cdsw_setup_script(env=self.config.env_dict)
        if self.config.mount_cdsw_dirs_from_local:
            # TODO Copy python-commons, google-api-wrapper as well, control this with an enum
            self.copy_yarndevtools_cdsw_recursively()
    
        # Instead of mounting, copy the file as google-api-wrapper would write token pickle,
        # so it basically requires this to be mounted with 'RW' which we don't want to do to pollute the local FS
        local_dir_docker_cp_arg = self._convert_to_docker_cp_dir_contents_copy_path(LocalDirs.CDSW_SECRET_DIR)
        self.docker_test_setup.docker_cp_to_container(
            ContainerDirs.CDSW_SECRET_DIR,
            local_dir_docker_cp_arg,
            create_container_path_mode=CreatePathMode.FULL_PATH,
            double_check_with_ls=True,
        )
    
>       exit_code, _ = self.execute_branch_comparator(env=self.config.env_dict)

/home/runner/work/yarn-dev-tools/yarn-dev-tools/tests/cdsw/test_branch_comparator.py:443: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/yarn-dev-tools/yarn-dev-tools/tests/cdsw/test_branch_comparator.py:367: in execute_branch_comparator
    return cls.docker_test_setup.exec_cmd_in_container(
/home/runner/.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/pythoncommons/docker_wrapper.py:374: in exec_cmd_in_container
    exit_code = self._get_and_verify_exit_code(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pythoncommons.docker_wrapper.DockerTestSetup object at 0x7fa92e2dbf10>
callback = None, charset = 'utf-8'
cmd = 'python3 /home/cdsw/scripts/start_job.py branch-comparator '
exec_handler = {'Id': 'acd6241bb3388c28f6cadd0bb962ce2282c68217ae62844290a9649d2af9054c'}
fail_on_error = True
ret = <docker.types.daemon.CancellableStream object at 0x7fa92ef1fd00>
stream = True, strip = True

    def _get_and_verify_exit_code(self, callback, charset, cmd, exec_handler, fail_on_error, ret, stream, strip):
        exit_code: int = self._get_exit_code(cmd, exec_handler, stream)
        if fail_on_error and exit_code != 0:
            _ = self._get_output_of_cmd(cmd, ret, callback, charset, strip, stream)
>           raise ValueError(
                f"Command '{cmd}' returned with non-zero exit code: {exit_code}. See logs above for more details."
            )
E           ValueError: Command 'python3 /home/cdsw/scripts/start_job.py branch-comparator ' returned with non-zero exit code: 1. See logs above for more details.

/home/runner/.cache/pypoetry/virtualenvs/yarn-dev-tools-9a2ihmxG-py3.8/lib/python3.8/site-packages/pythoncommons/docker_wrapper.py:383: ValueError