From a6112d7c15f27f67ab593663b006a1fb9a38164b Mon Sep 17 00:00:00 2001 From: "r.inyakin" Date: Mon, 31 Aug 2026 01:05:58 +0300 Subject: [PATCH] ci: fix wsl pipeline Added the `sql_seq_scan_default` parameter to prevent the `Scanning is not allowed` error, as `SEQSCAN` behaviour changed in Tarantool 3.x. Closes #331 --- .github/workflows/packing.yml | 2 +- .github/workflows/testing.yml | 12 +++++------ test/suites/lib/remote_tarantool_server.py | 25 +++++++++++++++++++++- test/suites/lib/tarantool_server.py | 2 +- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/packing.yml b/.github/workflows/packing.yml index 70970387..1e8a9b49 100644 --- a/.github/workflows/packing.yml +++ b/.github/workflows/packing.yml @@ -162,7 +162,7 @@ jobs: - name: Install tarantool shell: wsl-bash_Ubuntu-22.04 {0} run: | - curl -L https://tarantool.io/release/2/installer.sh | bash -s + curl -L https://tarantool.io/release/3/installer.sh | bash -s sudo apt install -y tarantool tarantool-dev - name: Setup test tarantool instance diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8f94a4e6..31c85632 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -278,8 +278,7 @@ jobs: matrix: # Use reduced test matrix cause Windows pipelines are long. tarantool: - # https://github.com/tarantool/tarantool-python/issues/331 - - '2.11.0.g247a9a418-1' + - '3.3.1-1' python: - '3.11' @@ -303,10 +302,10 @@ jobs: with: distribution: Ubuntu-22.04 - - name: Install tarantool ${{ matrix.tarantool }} for WSL (2.10 and newer) + - name: Install tarantool ${{ matrix.tarantool }} for WSL shell: wsl-bash_Ubuntu-22.04 {0} run: | - curl -L https://tarantool.io/release/2/installer.sh | bash -s + curl -L https://tarantool.io/release/3/installer.sh | bash -s sudo apt install -y tarantool=${{ matrix.tarantool }} tarantool-dev=${{ matrix.tarantool }} - name: Setup test tarantool instance @@ -348,8 +347,7 @@ jobs: matrix: # Use reduced test matrix cause Windows pipelines are long. tarantool: - # https://github.com/tarantool/tarantool-python/issues/331 - - '2.11.0.g247a9a418-1' + - '3.3.1-1' python: - '3.11' steps: @@ -378,7 +376,7 @@ jobs: - name: Install tarantool ${{ matrix.tarantool }} for WSL shell: wsl-bash_Ubuntu-22.04 {0} run: | - curl -L https://tarantool.io/release/2/installer.sh | bash -s + curl -L https://tarantool.io/release/3/installer.sh | bash -s sudo apt install -y tarantool=${{ matrix.tarantool }} tarantool-dev=${{ matrix.tarantool }} - name: Setup test tarantool instance diff --git a/test/suites/lib/remote_tarantool_server.py b/test/suites/lib/remote_tarantool_server.py index bbd6acbb..1288a04a 100644 --- a/test/suites/lib/remote_tarantool_server.py +++ b/test/suites/lib/remote_tarantool_server.py @@ -31,8 +31,9 @@ class RemoteTarantoolServer(): Class to work with remote Tarantool server. """ - def __init__(self): + def __init__(self, sql_seq_scan_default=None): self.host = os.environ['REMOTE_TARANTOOL_HOST'] + self.sql_seq_scan_default = sql_seq_scan_default self.args = {} self.args['primary'] = BINARY_PORT @@ -95,6 +96,24 @@ def release_lock(self): raise RuntimeError(f'can not release "{self.whoami}" lock: {str(err)}') self.lock_is_acquired = False + def set_sql_seq_scan_default(self, value): + """ + Set compat.sql_seq_scan_default on the remote server. The + option affects sessions created after the call, so it must be + set before the test connects to the server. + """ + + res = self.admin.execute(f""" + local is_compat, compat = pcall(require, 'compat') + if is_compat then + compat.sql_seq_scan_default = '{value}' + end + return true + """) + if res != [True]: + raise RuntimeError( + f'can not set compat.sql_seq_scan_default to "{value}": {str(res)}') + def start(self): """ Initialize the work with the remote server. @@ -102,6 +121,8 @@ def start(self): if not self.lock_is_acquired: self.acquire_lock() + if self.sql_seq_scan_default is not None: + self.set_sql_seq_scan_default(self.sql_seq_scan_default) self.admin.execute(f'box.cfg{{listen = "0.0.0.0:{self.args["primary"]}"}}') def stop(self): @@ -110,6 +131,8 @@ def stop(self): """ self.admin.execute('box.cfg{listen = box.NULL}') + if self.sql_seq_scan_default is not None: + self.set_sql_seq_scan_default('default') self.release_lock() def is_started(self): diff --git a/test/suites/lib/tarantool_server.py b/test/suites/lib/tarantool_server.py index 55f6ca63..5d27029e 100644 --- a/test/suites/lib/tarantool_server.py +++ b/test/suites/lib/tarantool_server.py @@ -194,7 +194,7 @@ def __new__(cls, # pylint: disable=unused-argument if os.name == 'nt': - return RemoteTarantoolServer() + return RemoteTarantoolServer(sql_seq_scan_default=sql_seq_scan_default) return super(TarantoolServer, cls).__new__(cls) def __init__(self,