diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9305b568e1c4180117a91bb4ba66d70eefd36e8..f7d330bf5e1999b1dd263218c1108f71ffcaf548 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ variables: include: - project: 'hive/hive' # This has to be the same as the commit checked out in the submodule - ref: f3a19664e0490647b318c9cc264c75a17c5be9f8 + ref: 40e7d1e8bb7d6f7df5cfb070d808cb387a9adc9f file: '/scripts/ci-helpers/prepare_data_image_job.yml' # DO NOT include ccc here. It will be indirectly included by above yaml file. #- project: 'hive/common-ci-configuration' diff --git a/beekeepy/beekeepy/_executable/abc/executable.py b/beekeepy/beekeepy/_executable/abc/executable.py index ad0f528b045585257846b66303c7e5d99625b5c6..b3ddaf7999fa5aa37e94d3b908745623e0f87866 100644 --- a/beekeepy/beekeepy/_executable/abc/executable.py +++ b/beekeepy/beekeepy/_executable/abc/executable.py @@ -14,7 +14,7 @@ from beekeepy._executable.abc.arguments import Arguments from beekeepy._executable.abc.config import Config from beekeepy._executable.abc.streams import StreamsHolder from beekeepy._utilities.context import ContextSync -from beekeepy.exceptions import ExecutableIsNotRunningError, TimeoutReachWhileCloseError +from beekeepy.exceptions import ExecutableIsNotRunningError, FailedToStartExecutableError, TimeoutReachWhileCloseError if TYPE_CHECKING: from collections.abc import Iterator @@ -245,7 +245,8 @@ class Executable(Closeable, Generic[ConfigT, ArgumentT]): return self.run_and_get_output(arguments=self.__arguments.just_get_version()) def reserved_ports(self, *, timeout_seconds: int = 10) -> list[int]: - assert self.is_running(), "Cannot obtain reserved ports for not started executable" + if not self.is_running(): + raise FailedToStartExecutableError("Executable is not running, cannot get reserved ports") start = time.perf_counter() while start + timeout_seconds >= time.perf_counter(): connections = psutil.net_connections("inet4") diff --git a/beekeepy/beekeepy/_runnable_handle/runnable_handle.py b/beekeepy/beekeepy/_runnable_handle/runnable_handle.py index 3b1ee04980f62fc8cb91a53c63c30a4d7eee601d..752e999eb313b423aa04aa0eac9f2f2a095d445c 100644 --- a/beekeepy/beekeepy/_runnable_handle/runnable_handle.py +++ b/beekeepy/beekeepy/_runnable_handle/runnable_handle.py @@ -17,6 +17,7 @@ from beekeepy._runnable_handle.match_ports import PortMatchingResult, match_port from beekeepy._runnable_handle.settings import RunnableHandleSettings from beekeepy.exceptions import ( ApiNotFoundError, + CommunicationError, FailedToDetectReservedPortsError, FailedToStartExecutableError, ) @@ -269,6 +270,8 @@ class RunnableHandle(ABC, Generic[ExecutableT, ConfigT, ArgumentT, SettingsT]): "HTTP port detected, but cannot obtain further information. app_status_api plugin is not enabled!" ) return matched_ports + except CommunicationError as e: + raise FailedToStartExecutableError("Cannot communicate with application on detected HTTP port") from e assert status is not None, "Error has not been caught and further port discovery started" http = status.webservers.HTTP diff --git a/hive b/hive index d765b5569c3cdef8e2040bcc3ffb79debcba28c5..40e7d1e8bb7d6f7df5cfb070d808cb387a9adc9f 160000 --- a/hive +++ b/hive @@ -1 +1 @@ -Subproject commit d765b5569c3cdef8e2040bcc3ffb79debcba28c5 +Subproject commit 40e7d1e8bb7d6f7df5cfb070d808cb387a9adc9f diff --git a/tests/beekeepy_test/handle/commandline/application_command_line_options/patterns/help_pattern.txt b/tests/beekeepy_test/handle/commandline/application_command_line_options/patterns/help_pattern.txt index b08615a8d3c86eff79586bb0a1551e176c07c775..88c6cd8383686e0ece6468c28157234ae0ae7b2c 100644 --- a/tests/beekeepy_test/handle/commandline/application_command_line_options/patterns/help_pattern.txt +++ b/tests/beekeepy_test/handle/commandline/application_command_line_options/patterns/help_pattern.txt @@ -12,8 +12,8 @@ Application Options: --webserver-ws-deflate arg (=0) Enable the RFC-7692 permessage-deflate extension for the WebSocket server (only used if the client requests it). This may save bandwidth at the expense of CPU - --webserver-thread-pool-size arg (=32) - Number of threads used to handle queries. Default: 32. + --webserver-thread-pool-size arg (=16) + Number of threads used to handle queries. Default: 16. --webserver-https-certificate-file-name arg File name with a server's certificate. --webserver-https-key-file-name arg diff --git a/tests/local-tools/local_tools/beekeepy/simple_api.py b/tests/local-tools/local_tools/beekeepy/simple_api.py index 64e22679b9c96e065abccb0d8a8a9b3439fd19d1..fef50f557013c54431a4aaec5c5faf9b18b86bf0 100644 --- a/tests/local-tools/local_tools/beekeepy/simple_api.py +++ b/tests/local-tools/local_tools/beekeepy/simple_api.py @@ -28,7 +28,6 @@ class VoterSchema(PreconfiguredBaseModel): class WitnessesVotersResponseSchema(PreconfiguredBaseModel): total_votes: int total_pages: int - votes_updated_at: str voters: list[VoterSchema]