From f39b2fef6ebd696713e46f258d49e7a8e22a12a6 Mon Sep 17 00:00:00 2001 From: Nikita Zheleztsov Date: Mon, 20 Jul 2026 16:29:15 +0300 Subject: [PATCH 1/3] ci: fix cartridge integration artifact description The input receives a vshard rock artifact, not a Tarantool build artifact. Let's fix it, looks confusing. NO_DOC=ci NO_TEST=ci --- .github/workflows/cartridge_integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cartridge_integration.yml b/.github/workflows/cartridge_integration.yml index bd31c6d5..26dc9b3a 100644 --- a/.github/workflows/cartridge_integration.yml +++ b/.github/workflows/cartridge_integration.yml @@ -10,7 +10,7 @@ on: workflow_call: inputs: artifact_name: - description: The name of the tarantool build artifact + description: The name of the vshard rock artifact required: true type: string tarantool_version: From 40d0605c9af9365c697973e550d9a4412888c000 Mon Sep 17 00:00:00 2001 From: Nikita Zheleztsov Date: Mon, 20 Jul 2026 12:26:38 +0300 Subject: [PATCH 2/3] ci: extract tarantool setup action Currently the Tarantool installation logic is duplicated in the fast and flaky testing. And it'll be needed in tarantool integration and all subsequent integration tests. Let's move it to an action while keeping the existing install, cache, checkout, and build steps intact. NO_DOC=ci NO_TEST=ci --- .github/actions/setup-tarantool/action.yml | 68 ++++++++++++++++++++++ .github/workflows/catch_flaky.yml | 50 ++-------------- .github/workflows/fast_testing.yml | 56 ++---------------- 3 files changed, 78 insertions(+), 96 deletions(-) create mode 100644 .github/actions/setup-tarantool/action.yml diff --git a/.github/actions/setup-tarantool/action.yml b/.github/actions/setup-tarantool/action.yml new file mode 100644 index 00000000..0a998f59 --- /dev/null +++ b/.github/actions/setup-tarantool/action.yml @@ -0,0 +1,68 @@ +name: Setup Tarantool +description: Install or build Tarantool + +inputs: + tarantool_version: + description: Tarantool version or release- + required: true + +runs: + using: composite + steps: + - name: Install tarantool ${{ inputs.tarantool_version }} + if: startsWith(inputs.tarantool_version, 'release') != true + uses: tarantool/setup-tarantool@v3 + with: + tarantool-version: ${{ inputs.tarantool_version }} + + - name: Create variables for Tarantool ${{ inputs.tarantool_version }} + if: startsWith(inputs.tarantool_version, 'release') + run: | + branch=$(echo ${{ inputs.tarantool_version }} | cut -d- -f2) + commit_hash=$(git ls-remote \ + https://github.com/tarantool/tarantool.git \ + --branch ${branch} | head -c 8) + echo "TNT_BRANCH=${branch}" >> $GITHUB_ENV + echo "VERSION_POSTFIX=-${commit_hash}" >> $GITHUB_ENV + shell: bash + + - name: Cache tarantool build + if: startsWith(inputs.tarantool_version, 'release') + id: cache-tnt-release + uses: actions/cache@v3 + with: + path: /home/runner/tnt-release + key: cache-tnt-${{ inputs.tarantool_version }}${{ env.VERSION_POSTFIX }} + + - name: Clone tarantool ${{ inputs.tarantool_version }} + if: | + startsWith(inputs.tarantool_version, 'release') && + steps.cache-tnt-release.outputs.cache-hit != 'true' + uses: actions/checkout@v3 + with: + repository: tarantool/tarantool + ref: ${{ env.TNT_BRANCH }} + path: tarantool + fetch-depth: 0 + submodules: true + + - name: Build tarantool ${{ inputs.tarantool_version }} + if: | + startsWith(inputs.tarantool_version, 'release') && + steps.cache-tnt-release.outputs.cache-hit != 'true' + run: | + sudo apt-get -y install \ + build-essential cmake make zlib1g-dev libreadline-dev \ + libncurses5-dev libssl-dev libunwind-dev libicu-dev python3 \ + python3-yaml python3-six python3-gevent + cd ${GITHUB_WORKSPACE}/tarantool + mkdir build && cd build + cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_DIST=ON + make && make DESTDIR=/home/runner/tnt-release install + shell: bash + + - name: Install tarantool ${{ inputs.tarantool_version }} + if: startsWith(inputs.tarantool_version, 'release') + # Workaround as actions/cache cannot restore data to /usr/local + run: sudo cp -rvP /home/runner/tnt-release/usr/local/* /usr/local/ + shell: bash diff --git a/.github/workflows/catch_flaky.yml b/.github/workflows/catch_flaky.yml index 0a1f0908..9941a8aa 100644 --- a/.github/workflows/catch_flaky.yml +++ b/.github/workflows/catch_flaky.yml @@ -11,54 +11,9 @@ jobs: if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'noflaky') - env: - TNT_RELEASE_PATH: /home/runner/tnt-release - runs-on: ubuntu-22.04 timeout-minutes: 180 steps: - - name: Create variables for Tarantool - run: | - branch=master - commit_hash=$(git ls-remote \ - https://github.com/tarantool/tarantool.git \ - --branch ${branch} | head -c 8) - echo "TNT_BRANCH=${branch}" >> $GITHUB_ENV - echo "VERSION_POSTFIX=-${commit_hash}" >> $GITHUB_ENV - shell: bash - - - name: Cache tarantool build - id: cache-tnt-release - uses: actions/cache@v3 - with: - path: ${{ env.TNT_RELEASE_PATH }} - key: cache-tnt-release-master${{ env.VERSION_POSTFIX }} - - - name: Clone tarantool - if: steps.cache-tnt-release.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: tarantool/tarantool - ref: ${{ env.TNT_BRANCH }} - path: tarantool - fetch-depth: 0 - submodules: true - - - name: Build tarantool - if: steps.cache-tnt-release.outputs.cache-hit != 'true' - run: | - sudo apt-get -y install build-essential cmake make zlib1g-dev \ - libreadline-dev libncurses5-dev libssl-dev libunwind-dev \ - libicu-dev python3 python3-yaml python3-six python3-gevent - cd ${GITHUB_WORKSPACE}/tarantool - mkdir build && cd build - cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_DIST=ON - make && make DESTDIR=${TNT_RELEASE_PATH} install - - - name: Install tarantool - # Workaround as actions/cache cannot restore data to /usr/local - run: sudo cp -rvP ${TNT_RELEASE_PATH}/usr/local/* /usr/local/ - - name: Clone the module uses: actions/checkout@v3 with: @@ -70,6 +25,11 @@ jobs: submodules: recursive ref: ${{ github.event.pull_request.head.sha }} + - name: Setup Tarantool + uses: ./.github/actions/setup-tarantool + with: + tarantool_version: release-master + - name: Install test requirements run: pip3 install --user -r test-run/requirements.txt diff --git a/.github/workflows/fast_testing.yml b/.github/workflows/fast_testing.yml index 8fbf1b89..e4b097ea 100644 --- a/.github/workflows/fast_testing.yml +++ b/.github/workflows/fast_testing.yml @@ -34,59 +34,8 @@ jobs: - '3.3' - 'release-master' - env: - TNT_RELEASE_PATH: /home/runner/tnt-release - runs-on: ubuntu-22.04 steps: - - name: Install tarantool ${{ matrix.tarantool }} - if: startsWith(matrix.tarantool, 'release') != true - uses: tarantool/setup-tarantool@v3 - with: - tarantool-version: ${{ matrix.tarantool }} - - - name: Create variables for Tarantool ${{ matrix.tarantool }} - if: startsWith(matrix.tarantool, 'release') - run: | - branch=$(echo ${{ matrix.tarantool }} | cut -d- -f2) - commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch ${branch} | head -c 8) - echo "TNT_BRANCH=${branch}" >> $GITHUB_ENV - echo "VERSION_POSTFIX=-${commit_hash}" >> $GITHUB_ENV - shell: bash - - - name: Cache tarantool build - if: startsWith(matrix.tarantool, 'release') - id: cache-tnt-release - uses: actions/cache@v3 - with: - path: ${{ env.TNT_RELEASE_PATH}} - key: cache-tnt-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }} - - - name: Clone tarantool ${{ matrix.tarantool }} - if: startsWith(matrix.tarantool, 'release') && steps.cache-tnt-release.outputs.cache-hit != 'true' - uses: actions/checkout@v3 - with: - repository: tarantool/tarantool - ref: ${{ env.TNT_BRANCH }} - path: tarantool - fetch-depth: 0 - submodules: true - - - name: Build tarantool ${{ matrix.tarantool }} - if: startsWith(matrix.tarantool, 'release') && steps.cache-tnt-release.outputs.cache-hit != 'true' - run: | - sudo apt-get -y install build-essential cmake make zlib1g-dev libreadline-dev libncurses5-dev \ - libssl-dev libunwind-dev libicu-dev python3 python3-yaml python3-six python3-gevent - cd ${GITHUB_WORKSPACE}/tarantool - mkdir build && cd build - cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_DIST=ON - make && make DESTDIR=${TNT_RELEASE_PATH} install - - - name: Install tarantool ${{ matrix.tarantool }} - if: startsWith(matrix.tarantool, 'release') - # Workaround as actions/cache cannot restore data to /usr/local - run: sudo cp -rvP ${TNT_RELEASE_PATH}/usr/local/* /usr/local/ - - name: Clone the module uses: actions/checkout@v3 with: @@ -97,6 +46,11 @@ jobs: # for running tests. submodules: recursive + - name: Setup Tarantool ${{ matrix.tarantool }} + uses: ./.github/actions/setup-tarantool + with: + tarantool_version: ${{ matrix.tarantool }} + - name: Install test requirements run: pip3 install --user -r test-run/requirements.txt From 2085664c0b87e8438b63e4f0661cf442611def1e Mon Sep 17 00:00:00 2001 From: Nikita Zheleztsov Date: Tue, 21 Jul 2026 09:39:28 +0300 Subject: [PATCH 3/3] ci: test integration with Tarantool master There're a number of tests in Tarantool, which are never launched in CI, since vshard is not installed there: it's actually difficult to install the vshard in Tarantool's CI, so it was decided introducing the integration testing in VShard instead. This commit implements that: we build the master workflow, install vshard and run the Tarantool tests. It doesn't make sense to figure out, which tests actually depend on VShard and which are not, since the test can sometimes work without vshard and behave differently, if vshard is installed, so let's run all config related tests. Part of #582 NO_DOC=ci NO_TEST=ci --- .github/workflows/integration.yml | 7 ++ .github/workflows/tarantool_integration.yml | 91 +++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 .github/workflows/tarantool_integration.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 2e4805ae..b09525cc 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -49,3 +49,10 @@ jobs: with: artifact_name: vshard-${{ needs.vshard.outputs.sha }} tarantool_version: '2.11' + + tarantool: + needs: vshard + uses: ./.github/workflows/tarantool_integration.yml + with: + artifact_name: vshard-${{ needs.vshard.outputs.sha }} + tarantool_version: 'release-master' diff --git a/.github/workflows/tarantool_integration.yml b/.github/workflows/tarantool_integration.yml new file mode 100644 index 00000000..6c35d11a --- /dev/null +++ b/.github/workflows/tarantool_integration.yml @@ -0,0 +1,91 @@ +name: tarantool_integration + +on: + workflow_call: + inputs: + artifact_name: + description: The name of the vshard rock artifact + required: true + type: string + tarantool_version: + description: Version for the Tarantool binary + required: false + default: 'release-master' + type: string + +jobs: + run_tests: + runs-on: ubuntu-22.04 + timeout-minutes: 60 + + env: + # Mirroring tarantool's own CI. + VARDIR: /tmp/t + TEST_RUN_RETRIES: 3 + SERVER_START_TIMEOUT: 290 + REPLICATION_SYNC_TIMEOUT: 300 + TEST_TIMEOUT: 310 + NO_OUTPUT_TIMEOUT: 320 + + steps: + - name: Check out vshard + uses: actions/checkout@v4 + + - name: Resolve Tarantool branch + id: tnt + run: echo "branch=${TNT_VERSION#release-}" >> "$GITHUB_OUTPUT" + env: + TNT_VERSION: ${{ inputs.tarantool_version }} + + # test-run.py runs Tarantool's own config-luatest suite, so the sources + # must be present. setup-tarantool only clones them on a build-cache + # miss, so check them out here to have them available in every case. + - name: Check out Tarantool sources + uses: actions/checkout@v4 + with: + repository: tarantool/tarantool + ref: ${{ steps.tnt.outputs.branch }} + path: tarantool + fetch-depth: 0 + submodules: recursive + + - name: Setup Tarantool ${{ inputs.tarantool_version }} + uses: ./.github/actions/setup-tarantool + with: + tarantool_version: ${{ inputs.tarantool_version }} + + - name: Install test requirements + run: pip3 install --user -r tarantool/test-run/requirements.txt + + - name: Download the vshard build artifact + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.artifact_name }} + + - name: Setup tt + run: | + curl -L https://tarantool.io/release/2/installer.sh | sudo bash + sudo apt install -y tt + tt version + + - name: Install vshard + working-directory: tarantool + run: sudo tt rocks --tree /usr/local install ../vshard*.all.rock + + # Only config tests can depend on vshard. + - name: Run config-luatest tests + run: | + cd tarantool/test + ./test-run.py \ + --force \ + --verbose \ + --executable "$(command -v tarantool)" \ + config-luatest/ + + - name: Upload Tarantool test artifacts + if: failure() + uses: actions/upload-artifact@v4 + with: + name: tarantool-vshard-integration-artifacts + if-no-files-found: warn + path: /tmp/t