From 3a89e2ca941db6bb607280bdf21ca7c2c2bcf0da Mon Sep 17 00:00:00 2001 From: Alex Petenchea Date: Tue, 8 Jul 2025 03:21:43 +0000 Subject: [PATCH 1/3] Updating example version --- starter.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starter.sh b/starter.sh index b4e39f24..a5126f54 100755 --- a/starter.sh +++ b/starter.sh @@ -6,7 +6,7 @@ # Usage: # ./starter.sh [single|cluster] [community|enterprise] [version] # Example: -# ./starter.sh cluster enterprise 3.12.1 +# ./starter.sh cluster enterprise 3.12.5 setup="${1:-single}" license="${2:-community}" From 06e7d8f64c7faec735100777d644e8ce39c9a43a Mon Sep 17 00:00:00 2001 From: Alex Petenchea Date: Tue, 8 Jul 2025 03:27:34 +0000 Subject: [PATCH 2/3] No longer use _db/... prefix on /_open/auth --- arango/connection.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/arango/connection.py b/arango/connection.py index 8de2643a..9384aef1 100644 --- a/arango/connection.py +++ b/arango/connection.py @@ -125,7 +125,11 @@ def prep_response(self, resp: Response, deserialize: bool = True) -> Response: return resp def process_request( - self, host_index: int, request: Request, auth: Optional[Tuple[str, str]] = None + self, + host_index: int, + request: Request, + auth: Optional[Tuple[str, str]] = None, + skip_db_prefix: bool = False, ) -> Response: """Execute a request until a valid response has been returned. @@ -133,6 +137,10 @@ def process_request( :type host_index: int :param request: HTTP request. :type request: arango.request.Request + :param auth: HTTP basic authentication tuple (username, password). + :type auth: tuple[str, str] | None + :param skip_db_prefix: Skip the database prefix in the URL. + :type skip_db_prefix: bool :return: HTTP response. :rtype: arango.response.Response """ @@ -152,11 +160,16 @@ def process_request( request.headers["accept-encoding"] = self._response_compression while tries < self._host_resolver.max_tries: + if skip_db_prefix: + url = self._hosts[host_index] + request.endpoint + else: + url = self._url_prefixes[host_index] + request.endpoint + try: resp = self._http.send_request( session=self._sessions[host_index], method=request.method, - url=self._url_prefixes[host_index] + request.endpoint, + url=url, params=request.params, data=data, headers=request.headers, @@ -165,7 +178,6 @@ def process_request( return self.prep_response(resp, request.deserialize) except ConnectionError: - url = self._url_prefixes[host_index] + request.endpoint logging.debug(f"ConnectionError: {url}") if len(indexes_to_filter) == self._host_resolver.host_count - 1: @@ -425,7 +437,7 @@ def refresh_token(self) -> None: host_index = self._host_resolver.get_host_index() - resp = self.process_request(host_index, request) + resp = self.process_request(host_index, request, skip_db_prefix=True) if not resp.is_success: raise JWTAuthError(resp, request) From 7ca68ce7a4fb65d226b5033b4e753d3a79a37eae Mon Sep 17 00:00:00 2001 From: Alex Petenchea Date: Tue, 8 Jul 2025 03:43:50 +0000 Subject: [PATCH 3/3] Fixing test dependant on version --- tests/test_database.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_database.py b/tests/test_database.py index 0b1d9752..d6595a4d 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -439,18 +439,23 @@ def test_database_utf8(sys_db, special_db_names): assert sys_db.delete_database(name) -def test_license(sys_db, enterprise): +def test_license(sys_db, enterprise, db_version): license = sys_db.license() assert isinstance(license, dict) - if enterprise: - assert set(license.keys()) == { + if db_version >= version.parse("3.12.5"): + expected_keys = {"diskUsage", "upgrading"} + else: + expected_keys = { "upgrading", "features", "license", "version", "status", } + + if enterprise: + assert set(license.keys()) == expected_keys else: assert license == {"license": "none"} with pytest.raises(ServerLicenseSetError):