diff --git a/CHANGELOG.md b/CHANGELOG.md index f6e32c45..40d0e539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Version 0.54.2 ------------- **Bugfixes** -- Introduce a new retrying condition for `altool` commands as part of `app-store-connect` action when unknown return codes occurs. [PR #435](https://github.com/codemagic-ci-cd/cli-tools/pull/435) +- Introduce a new retrying condition for `altool` commands as part of `app-store-connect` action when unexpected return codes occurs. [PR #435](https://github.com/codemagic-ci-cd/cli-tools/pull/435) Version 0.54.1 diff --git a/src/codemagic/models/altool/altool.py b/src/codemagic/models/altool/altool.py index 43deccc2..2f9b2b27 100644 --- a/src/codemagic/models/altool/altool.py +++ b/src/codemagic/models/altool/altool.py @@ -290,7 +290,7 @@ def _hide_environment_variable_values(cls, altool_output: Optional[AnyStr]) -> s def _should_retry_command(self, command_error: AltoolCommandError) -> bool: if command_error.return_code in [-5, -11]: - self.logger.info(f"Unknown altool exit code {command_error.return_code}, retrying...") + self.logger.info(f"Unexpected altool exit code {command_error.return_code}, retrying...") return True patterns = ( re.compile("Unable to authenticate.*-19209"), diff --git a/tests/models/altool/test_altool_retrying.py b/tests/models/altool/test_altool_retrying.py index 013051a5..57d45ff6 100644 --- a/tests/models/altool/test_altool_retrying.py +++ b/tests/models/altool/test_altool_retrying.py @@ -155,8 +155,8 @@ def test_retrying_command_by_return_code_and_success(caplog, mock_altool, mock_s result = mock_altool.upload_app(pathlib.Path("app.ipa"), retries=4, retry_wait_seconds=0) assert result is mock_success_result - assert caplog.text.count("Unknown altool exit code -11, retrying...") == 1 - assert caplog.text.count("Unknown altool exit code -5, retrying...") == 2 + assert caplog.text.count("Unexpected altool exit code -11, retrying...") == 1 + assert caplog.text.count("Unexpected altool exit code -5, retrying...") == 2 @mock.patch.object(PlatformType, "from_path", lambda _artifact_path: PlatformType.IOS)