Skip to content

chore: streamline CI workflows #2875

chore: streamline CI workflows

chore: streamline CI workflows #2875

GitHub Actions / Python Tests failed Oct 28, 2024 in 0s

1 errors, 5 skipped, 138 pass in 1m 15s

  9 files    9 suites   1m 15s ⏱️
144 tests 138 ✅  5 💤 0 ❌ 1 🔥
677 runs  657 ✅ 19 💤 0 ❌ 1 🔥

Results for commit 390a520.

Annotations

Check failure on line 0 in tests.integration.test_netrc

See this annotation in the file changed.

@github-actions github-actions / Python Tests

1 out of 4 runs with error: test_netrc_does_not_override_ini_creds (tests.integration.test_netrc)

artifacts/python-test-results-large-ubuntu-24_14/large-ubuntu.Looker-24_14.py3.x-integration.xml [took 0s]
Raw output
failed on teardown with "looker_sdk.error.SDKError: 
    message:           ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    documentation_url: 
    error_doc_url:     
    error details:"
def deserialize(
        *, data: str, structure: TStructure, converter: cattr.Converter
    ) -> TDeserializeReturn:
        """Translate API data into models."""
        try:
>           data = json.loads(data)

looker_sdk/rtl/serialize.py:66: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/json/__init__.py:346: in loads
    return _default_decoder.decode(s)
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/json/decoder.py:337: in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <json.decoder.JSONDecoder object at 0x7fe2796b9c00>
s = "('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))"
idx = 0

    def raw_decode(self, s, idx=0):
        """Decode a JSON document from ``s`` (a ``str`` beginning with
        a JSON document) and return a 2-tuple of the Python
        representation and the index in ``s`` where the document ended.
    
        This can be used to decode a JSON document from a string that may
        have extraneous data at the end.
    
        """
        try:
            obj, end = self.scan_once(s, idx)
        except StopIteration as err:
>           raise JSONDecodeError("Expecting value", s, err.value) from None
E           json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/json/decoder.py:355: JSONDecodeError

During handling of the above exception, another exception occurred:

self = <looker_sdk.sdk.api40.methods.Looker40SDK object at 0x7fe277936e00>
response = Response(ok=False, value=b"('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))", response_mode=<ResponseMode.STRING: 2>, encoding='utf-8')
structure = <class 'str'>

    def _return(self, response: transport.Response, structure: TStructure) -> TReturn:
        encoding = response.encoding
        if not response.ok:
            value = response.value.decode(encoding=encoding)
            sdk_error: error.SDKError
            try:
>               sdk_error = self.deserialize(data=value, structure=error.SDKError)  # type: ignore

looker_sdk/rtl/api_methods.py:90: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def deserialize(
        *, data: str, structure: TStructure, converter: cattr.Converter
    ) -> TDeserializeReturn:
        """Translate API data into models."""
        try:
            data = json.loads(data)
        except json.JSONDecodeError as ex:
>           raise DeserializeError(f"Bad json {ex}")
E           looker_sdk.rtl.serialize.DeserializeError: Bad json Expecting value: line 1 column 1 (char 0)

looker_sdk/rtl/serialize.py:68: DeserializeError

During handling of the above exception, another exception occurred:

sdk40 = <looker_sdk.sdk.api40.methods.Looker40SDK object at 0x7fe277936e00>
users = [], email_domain = '@testfoo.com'

    @pytest.fixture(name="test_users", scope="session")
    def create_test_users(
        sdk40: methods40.Looker40SDK, users: List[Dict[str, str]], email_domain: str
    ):
        user_ids: List[int] = []
        for u in users:
            users = sdk40.search_users(first_name=u["first_name"], last_name=u["last_name"])
            if len(users) > 0:
                # recover from crashed test, dummy
                user = users[0]
                user_ids.append(user.id)
            else:
                user = sdk40.create_user(
                    models40.WriteUser(first_name=u["first_name"], last_name=u["last_name"])
                )
    
                if user.id:
                    user_ids.append(user.id)
                    email = f"{u['first_name']}.{u['last_name']}{email_domain}"
                    sdk40.create_user_credentials_email(
                        user.id, models40.WriteCredentialsEmail(email=email)
                    )
    
        yield
    
        for user_id in user_ids:
>           sdk40.delete_user(user_id)

tests/conftest.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
looker_sdk/sdk/api40/methods.py:12031: in delete_user
    self.delete(
looker_sdk/rtl/api_methods.py:247: in delete
    return self._return(response, structure)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <looker_sdk.sdk.api40.methods.Looker40SDK object at 0x7fe277936e00>
response = Response(ok=False, value=b"('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))", response_mode=<ResponseMode.STRING: 2>, encoding='utf-8')
structure = <class 'str'>

    def _return(self, response: transport.Response, structure: TStructure) -> TReturn:
        encoding = response.encoding
        if not response.ok:
            value = response.value.decode(encoding=encoding)
            sdk_error: error.SDKError
            try:
                sdk_error = self.deserialize(data=value, structure=error.SDKError)  # type: ignore
                helper = error.ErrorDocHelper()
                (sdk_error.error_doc_url, sdk_error.error_doc) = (
                    helper.parse_and_lookup(sdk_error.documentation_url)
                )
                for e in sdk_error.errors:
                    (e.error_doc_url, e.error_doc) = helper.parse_and_lookup(
                        e.documentation_url
                    )
            except serialize.DeserializeError:
>               raise error.SDKError(value)
E               looker_sdk.error.SDKError: 
E                   message:           ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
E                   documentation_url: 
E                   error_doc_url:     
E                   error details:

looker_sdk/rtl/api_methods.py:100: SDKError

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Python Tests

5 skipped tests found

There are 5 skipped tests, see "Raw output" for the full list of skipped tests.
Raw output
tests.integration.test_methods ‑ test_validate_theme
tests.rtl.test_serialize ‑ test_deserialize_data_structure_mismatch[data0-Sequence]
tests.rtl.test_serialize ‑ test_deserialize_data_structure_mismatch[data0-structure0]
tests.rtl.test_serialize ‑ test_deserialize_data_structure_mismatch[data1-Model]
tests.rtl.test_serialize ‑ test_serialize_explict_null

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Python Tests

144 tests found

There are 144 tests, see "Raw output" for the full list of tests.
Raw output
tests.integration.test_methods ‑ test_bad_user_search_returns_no_results
tests.integration.test_methods ‑ test_crud_dashboard
tests.integration.test_methods ‑ test_crud_look
tests.integration.test_methods ‑ test_crud_user
tests.integration.test_methods ‑ test_crud_user_dict
tests.integration.test_methods ‑ test_csv_user_id_list
tests.integration.test_methods ‑ test_delim_sequence
tests.integration.test_methods ‑ test_enum
tests.integration.test_methods ‑ test_it_creates_and_runs_query
tests.integration.test_methods ‑ test_it_matches_email_domain_and_returns_sorted
tests.integration.test_methods ‑ test_it_retrieves_session
tests.integration.test_methods ‑ test_it_runs_inline_query
tests.integration.test_methods ‑ test_it_updates_session
tests.integration.test_methods ‑ test_me_field_filters
tests.integration.test_methods ‑ test_me_returns_correct_result
tests.integration.test_methods ‑ test_png_svg_downloads
tests.integration.test_methods ‑ test_search_look_and_run
tests.integration.test_methods ‑ test_search_looks_fields_filter
tests.integration.test_methods ‑ test_search_looks_returns_looks
tests.integration.test_methods ‑ test_search_looks_title_fields_filter
tests.integration.test_methods ‑ test_search_users_matches_pattern
tests.integration.test_methods ‑ test_setting_default_color_collection
tests.integration.test_methods ‑ test_validate_theme
tests.integration.test_netrc ‑ test_netrc_does_not_override_ini_creds
tests.rtl.test_api_methods ‑ test_api_versioned_url_is_built_properly[/user-/api/4.0/user]
tests.rtl.test_api_methods ‑ test_api_versioned_url_is_built_properly[/user/1-/api/4.0/user/1]
tests.rtl.test_api_methods ‑ test_api_versioned_url_is_built_properly[user-/api/4.0/user]
tests.rtl.test_api_methods ‑ test_api_versioned_url_is_built_properly[user/1-/api/4.0/user/1]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params0-expected0]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params1-expected1]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params2-expected2]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params3-expected3]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params4-expected4]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params5-expected5]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params6-expected6]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params7-expected7]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params8-expected8]
tests.rtl.test_api_methods ‑ test_convert_query_params[test_query_params9-expected9]
tests.rtl.test_api_methods ‑ test_get_serialized[-]
tests.rtl.test_api_methods ‑ test_get_serialized[None-None]
tests.rtl.test_api_methods ‑ test_get_serialized[some body text-some body text]
tests.rtl.test_api_methods ‑ test_get_serialized[test_body2-[1, 2, 3]]
tests.rtl.test_api_methods ‑ test_get_serialized[test_body3-["a", "b", "c"]]
tests.rtl.test_api_methods ‑ test_get_serialized[test_body4-{"foo": "bar"}]
tests.rtl.test_api_methods ‑ test_get_serialized[test_body6-{"workspace_id": "dev"}]
tests.rtl.test_api_methods ‑ test_get_serialized[test_body7-[{"workspace_id": "dev"}, {"workspace_id": "dev"}]]
tests.rtl.test_api_methods ‑ test_return[test_response0-Union-\x00\x01\x02\x03\x04\x05\x06\x07\x08\t]
tests.rtl.test_api_methods ‑ test_return[test_response0-test_structure0-\x00\x01\x02\x03\x04\x05\x06\x07\x08\t]
tests.rtl.test_api_methods ‑ test_return[test_response1-Union-some response text]
tests.rtl.test_api_methods ‑ test_return[test_response1-test_structure1-some response text]
tests.rtl.test_api_methods ‑ test_return[test_response2-Union-\u0626]
tests.rtl.test_api_methods ‑ test_return[test_response2-test_structure2-\u0626]
tests.rtl.test_api_methods ‑ test_return[test_response3-None-None]
tests.rtl.test_api_methods ‑ test_return[test_response4-ApiVersion-expected4]
tests.rtl.test_api_methods ‑ test_return_raises_an_SDKError_for_bad_responses
tests.rtl.test_api_settings ‑ test_configure_with_no_file
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[-True]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[0-False]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[1-True]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[f-False]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[n-False]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[no-False]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[t-True]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[true-True]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[y-True]
tests.rtl.test_api_settings ‑ test_env_verify_ssl_maps_properly[yes-True]
tests.rtl.test_api_settings ‑ test_it_assigns_defaults_to_empty_settings
tests.rtl.test_api_settings ‑ test_it_fails_if_required_settings_are_not_found[Empty config file]
tests.rtl.test_api_settings ‑ test_it_fails_if_required_settings_are_not_found[Required settings are empty strings]
tests.rtl.test_api_settings ‑ test_it_fails_when_env_variables_are_defined_but_empty
tests.rtl.test_api_settings ‑ test_it_fails_with_a_bad_file_path
tests.rtl.test_api_settings ‑ test_it_fails_with_a_bad_section_name
tests.rtl.test_api_settings ‑ test_it_retrieves_section_by_name[section=Looker]
tests.rtl.test_api_settings ‑ test_it_retrieves_section_by_name[section=OLD_API]
tests.rtl.test_api_settings ‑ test_it_unquotes_quoted_config_file_vars
tests.rtl.test_api_settings ‑ test_it_unquotes_quoted_env_var_values
tests.rtl.test_api_settings ‑ test_settings_defaults_to_looker_section
tests.rtl.test_api_settings ‑ test_settings_from_env_variables_override_config_file[Empty config file]
tests.rtl.test_api_settings ‑ test_settings_from_env_variables_override_config_file[Overriding with env variables]
tests.rtl.test_auth_session ‑ test_auto_login
tests.rtl.test_auth_session ‑ test_auto_login_with_transport_options
tests.rtl.test_auth_session ‑ test_env_variables_override_config_file_credentials[--your_API3_client_id-your_API3_client_secret]
tests.rtl.test_auth_session ‑ test_env_variables_override_config_file_credentials[id123-secret123-id123-secret123]
tests.rtl.test_auth_session ‑ test_it_fails_with_missing_credentials[EMPTY_STRING_CREDENTIALS--]
tests.rtl.test_auth_session ‑ test_it_fails_with_missing_credentials[EMPTY_STRING_CREDENTIALS--secret123]
tests.rtl.test_auth_session ‑ test_it_fails_with_missing_credentials[EMPTY_STRING_CREDENTIALS-id123-]
tests.rtl.test_auth_session ‑ test_it_fails_with_missing_credentials[NO_CREDENTIALS--]
tests.rtl.test_auth_session ‑ test_it_fails_with_missing_credentials[NO_CREDENTIALS--secret123]
tests.rtl.test_auth_session ‑ test_it_fails_with_missing_credentials[NO_CREDENTIALS-id123-]
tests.rtl.test_auth_session ‑ test_login_sudo_login_sudo
tests.rtl.test_auth_session ‑ test_oauth_create_auth_code_request_url
tests.rtl.test_auth_session ‑ test_oauth_redeem_auth_code
tests.rtl.test_auth_session ‑ test_sudo_login_auto_logs_in
tests.rtl.test_auth_session ‑ test_sudo_logout_leaves_logged_in
tests.rtl.test_auth_token ‑ test_defaults_with_empty_token
tests.rtl.test_auth_token ‑ test_is_active_with_full_token
tests.rtl.test_auth_token ‑ test_lag_time_is_used
tests.rtl.test_requests_transport ‑ test_configure
tests.rtl.test_requests_transport ‑ test_request_error
tests.rtl.test_requests_transport ‑ test_request_not_ok[headers0-utf-8-ResponseMode.STRING]
tests.rtl.test_requests_transport ‑ test_request_not_ok[headers1-utf-8-ResponseMode.BINARY]
tests.rtl.test_requests_transport ‑ test_request_not_ok[headers2-latin1-ResponseMode.STRING]
tests.rtl.test_requests_transport ‑ test_request_not_ok[headers3-arabic-ResponseMode.STRING]
tests.rtl.test_requests_transport ‑ test_request_not_ok[headers4-utf-8-ResponseMode.STRING]
tests.rtl.test_requests_transport ‑ test_request_not_ok[headers5-utf-8-ResponseMode.BINARY]
tests.rtl.test_requests_transport ‑ test_request_ok[headers0-utf-8-ResponseMode.STRING]
tests.rtl.test_requests_transport ‑ test_request_ok[headers1-utf-8-ResponseMode.BINARY]
tests.rtl.test_requests_transport ‑ test_request_ok[headers2-latin1-ResponseMode.STRING]
tests.rtl.test_requests_transport ‑ test_request_ok[headers3-arabic-ResponseMode.STRING]
tests.rtl.test_requests_transport ‑ test_request_ok[headers4-utf-8-ResponseMode.STRING]
tests.rtl.test_requests_transport ‑ test_request_ok[headers5-utf-8-ResponseMode.BINARY]
tests.rtl.test_serialize ‑ test_deserialize_data_structure_mismatch[data0-Sequence]
tests.rtl.test_serialize ‑ test_deserialize_data_structure_mismatch[data0-structure0]
tests.rtl.test_serialize ‑ test_deserialize_data_structure_mismatch[data1-Model]
tests.rtl.test_serialize ‑ test_deserialize_list
tests.rtl.test_serialize ‑ test_deserialize_partial
tests.rtl.test_serialize ‑ test_deserialize_single
tests.rtl.test_serialize ‑ test_deserialize_with_null
tests.rtl.test_serialize ‑ test_dict_clear
tests.rtl.test_serialize ‑ test_dict_contains
tests.rtl.test_serialize ‑ test_dict_copy
tests.rtl.test_serialize ‑ test_dict_delitem
tests.rtl.test_serialize ‑ test_dict_get
tests.rtl.test_serialize ‑ test_dict_getitem_child
tests.rtl.test_serialize ‑ test_dict_getitem_enum
tests.rtl.test_serialize ‑ test_dict_getitem_simple
tests.rtl.test_serialize ‑ test_dict_items
tests.rtl.test_serialize ‑ test_dict_iter
tests.rtl.test_serialize ‑ test_dict_keys
tests.rtl.test_serialize ‑ test_dict_pop
tests.rtl.test_serialize ‑ test_dict_popitem
tests.rtl.test_serialize ‑ test_dict_setdefault
tests.rtl.test_serialize ‑ test_dict_setitem_child
tests.rtl.test_serialize ‑ test_dict_setitem_enum
tests.rtl.test_serialize ‑ test_dict_setitem_simple
tests.rtl.test_serialize ‑ test_dict_update
tests.rtl.test_serialize ‑ test_dict_values
tests.rtl.test_serialize ‑ test_safe_enum_deserialization
tests.rtl.test_serialize ‑ test_serialize_explict_null
tests.rtl.test_serialize ‑ test_serialize_partial
tests.rtl.test_serialize ‑ test_serialize_sequence
tests.rtl.test_serialize ‑ test_serialize_single
tests.rtl.test_transport ‑ test_binary_mode
tests.rtl.test_transport ‑ test_string_mode