From 74dcfc21acb8a0c70e06e8314a9b43d6469b8c9d Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Fri, 18 Aug 2023 10:53:15 +0200 Subject: [PATCH 1/5] bump version to prerelease --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 43c8a5059..ba03c5b03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "yapapi" -version = "0.12.0-dev" +version = "0.12.0-alpha.0" description = "High-level Python API for the New Golem" authors = ["GolemFactory "] license = "LGPL-3.0-or-later" From 9bb595362dcfe8303409a8ac24b710173177f42b Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Mon, 21 Aug 2023 11:45:32 +0200 Subject: [PATCH 2/5] fix the signature of the emitted ServiceStateChanged event to match the class signature --- yapapi/services/service_runner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yapapi/services/service_runner.py b/yapapi/services/service_runner.py index 3ac4710ff..d481e77e6 100644 --- a/yapapi/services/service_runner.py +++ b/yapapi/services/service_runner.py @@ -297,7 +297,10 @@ def _change_state( ctx = instance.service._ctx assert ctx is not None # This is None only while pending for the first time ctx.emit( - events.ServiceStateChanged, service=instance, old=prev_state, new=instance.state + events.ServiceStateChanged, + service=instance.service, + old=prev_state, + new=instance.state, ) return instance.state != prev_state From 9be90799b75714fb1e05d5fec988359f71b5a457 Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Mon, 21 Aug 2023 12:43:13 +0200 Subject: [PATCH 3/5] add one more exception... :/ --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ba03c5b03..30cbfe516 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ _format_black = "black ." tests_unit = {cmd = "pytest --cov=yapapi --cov-report html --cov-report term -sv --ignore tests/goth_tests", help = "Run only unit tests"} tests_integration_init = { sequence = ["_gothv_env", "_gothv_requirements", "_gothv_assets"], help="Initialize the integration test environment"} -tests_integration = { cmd = ".envs/yapapi-goth/bin/python -m pytest -svx tests/goth_tests --config-override docker-compose.build-environment.use-prerelease=false --config-path tests/goth_tests/assets/goth-config.yml --ssh-verify-connection --reruns 3 --only-rerun AssertionError --only-rerun TimeoutError --only-rerun goth.runner.exceptions.TemporalAssertionError --only-rerun urllib.error.URLError --only-rerun goth.runner.exceptions.CommandError --only-rerun requests.exceptions.ConnectionError --only-rerun OSError", help = "Run the integration tests"} +tests_integration = { cmd = ".envs/yapapi-goth/bin/python -m pytest -svx tests/goth_tests --config-override docker-compose.build-environment.use-prerelease=false --config-path tests/goth_tests/assets/goth-config.yml --ssh-verify-connection --reruns 3 --only-rerun AssertionError --only-rerun TimeoutError --only-rerun goth.runner.exceptions.TemporalAssertionError --only-rerun urllib.error.URLError --only-rerun goth.runner.exceptions.CommandError --only-rerun requests.exceptions.ConnectionError --only-rerun OSError --only-rerun requests.exceptions.ReadTimeout", help = "Run the integration tests"} _gothv_env = "python -m venv .envs/yapapi-goth" _gothv_requirements = ".envs/yapapi-goth/bin/pip install -U --extra-index-url https://test.pypi.org/simple/ goth==0.14.1 pip pytest pytest-asyncio pytest-rerunfailures pexpect" _gothv_assets = ".envs/yapapi-goth/bin/python -m goth create-assets tests/goth_tests/assets" From 0ea53c95c54cca6dac04226ad6a64943ffa9ee94 Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Mon, 21 Aug 2023 14:26:53 +0200 Subject: [PATCH 4/5] and one more... --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 30cbfe516..2026c8fda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ _format_black = "black ." tests_unit = {cmd = "pytest --cov=yapapi --cov-report html --cov-report term -sv --ignore tests/goth_tests", help = "Run only unit tests"} tests_integration_init = { sequence = ["_gothv_env", "_gothv_requirements", "_gothv_assets"], help="Initialize the integration test environment"} -tests_integration = { cmd = ".envs/yapapi-goth/bin/python -m pytest -svx tests/goth_tests --config-override docker-compose.build-environment.use-prerelease=false --config-path tests/goth_tests/assets/goth-config.yml --ssh-verify-connection --reruns 3 --only-rerun AssertionError --only-rerun TimeoutError --only-rerun goth.runner.exceptions.TemporalAssertionError --only-rerun urllib.error.URLError --only-rerun goth.runner.exceptions.CommandError --only-rerun requests.exceptions.ConnectionError --only-rerun OSError --only-rerun requests.exceptions.ReadTimeout", help = "Run the integration tests"} +tests_integration = { cmd = ".envs/yapapi-goth/bin/python -m pytest -svx tests/goth_tests --config-override docker-compose.build-environment.use-prerelease=false --config-path tests/goth_tests/assets/goth-config.yml --ssh-verify-connection --reruns 3 --only-rerun AssertionError --only-rerun TimeoutError --only-rerun goth.runner.exceptions.TimeoutError --only-rerun goth.runner.exceptions.TemporalAssertionError --only-rerun urllib.error.URLError --only-rerun goth.runner.exceptions.CommandError --only-rerun requests.exceptions.ConnectionError --only-rerun OSError --only-rerun requests.exceptions.ReadTimeout", help = "Run the integration tests"} _gothv_env = "python -m venv .envs/yapapi-goth" _gothv_requirements = ".envs/yapapi-goth/bin/pip install -U --extra-index-url https://test.pypi.org/simple/ goth==0.14.1 pip pytest pytest-asyncio pytest-rerunfailures pexpect" _gothv_assets = ".envs/yapapi-goth/bin/python -m goth create-assets tests/goth_tests/assets" From c29840c2a9f9da89931b105ad87615794150c517 Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Mon, 21 Aug 2023 15:34:26 +0200 Subject: [PATCH 5/5] bump rc version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2026c8fda..83a98f1c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "yapapi" -version = "0.12.0-alpha.0" +version = "0.12.0-alpha.1" description = "High-level Python API for the New Golem" authors = ["GolemFactory "] license = "LGPL-3.0-or-later"