diff --git a/.github/workflows/reusable_test.yml b/.github/workflows/reusable_test.yml index 21b72f4b..b79f335c 100644 --- a/.github/workflows/reusable_test.yml +++ b/.github/workflows/reusable_test.yml @@ -35,7 +35,7 @@ jobs: run: ./deps.sh - name: Install metrics - run: tarantoolctl rocks install metrics 0.12.0 + run: tarantoolctl rocks install metrics 1.0.0 # This server starts and listen on 8084 port that is used for tests - name: Stop Mono server diff --git a/.github/workflows/test_on_push.yaml b/.github/workflows/test_on_push.yaml index 2d66b699..a8889a16 100644 --- a/.github/workflows/test_on_push.yaml +++ b/.github/workflows/test_on_push.yaml @@ -13,29 +13,27 @@ jobs: matrix: # We need 1.10.6 here to check that module works with # old Tarantool versions that don't have "tuple-keydef"/"tuple-merger" support. - tarantool-version: ["1.10.6", "1.10", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.10"] + tarantool-version: ["1.10.6", "1.10", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.10", "2.11"] metrics-version: [""] - cartridge-version: ["2.7.8"] + cartridge-version: ["2.8.0"] remove-merger: [false] include: - tarantool-version: "1.10" - metrics-version: "0.16.0" - cartridge-version: "2.7.8" + metrics-version: "1.0.0" + cartridge-version: "2.8.0" - tarantool-version: "2.7" remove-merger: true - cartridge-version: "2.7.8" - - tarantool-version: "2.10" + cartridge-version: "2.8.0" + - tarantool-version: "2.11" metrics-version: "0.1.8" - cartridge-version: "2.7.8" - - tarantool-version: "2.10" + cartridge-version: "2.8.0" + - tarantool-version: "2.11" metrics-version: "0.10.0" - cartridge-version: "2.7.8" - - tarantool-version: "1.10" - cartridge-version: "1.2.0" - - tarantool-version: "2.10" + cartridge-version: "2.8.0" + - tarantool-version: "2.11" coveralls: true - metrics-version: "0.16.0" - cartridge-version: "2.7.8" + metrics-version: "1.0.0" + cartridge-version: "2.8.0" fail-fast: false # Can't install older versions on 22.04, # see https://github.com/tarantool/setup-tarantool/issues/36 @@ -76,10 +74,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Run tests and code coverage analysis - run: make -C build coverage + - name: Run tests + if: matrix.coveralls != true # See https://github.com/actions/runner/issues/1173 + run: make -C build luatest-no-coverage - - name: Send code coverage to coveralls.io + - name: Run tests with coverage and send results to coveralls.io run: make -C build coveralls if: ${{ matrix.coveralls }} @@ -89,8 +88,8 @@ jobs: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository strategy: matrix: - tarantool-version: ["1.10", "2.10"] - metrics-version: ["0.12.0"] + tarantool-version: ["1.10", "2.11"] + metrics-version: ["1.0.0"] fail-fast: false runs-on: ubuntu-20.04 steps: @@ -124,10 +123,10 @@ jobs: matrix: tarantool-version: - folder: "1.10" - bundle: "tarantool-enterprise-sdk-1.10.13-48-r523" - - folder: "2.10" - bundle: "tarantool-enterprise-sdk-nogc64-2.10.4-0-r523.linux.x86_64" - metrics-version: ["", "0.12.0"] + bundle: "tarantool-enterprise-sdk-1.10.15-0-r563" + - folder: "2.11" + bundle: "tarantool-enterprise-sdk-nogc64-2.11.0-0-r563.linux.x86_64" + metrics-version: ["", "1.0.0"] fail-fast: false runs-on: ubuntu-20.04 steps: @@ -155,5 +154,5 @@ jobs: - run: cmake -S . -B build - - name: Run tests and code coverage analysis - run: make -C build coverage + - name: Run tests + run: make -C build luatest-no-coverage diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a3ea56f..d276f2b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## Unreleased +## [1.2.0] - 07-06-23 ### Added * Add `noreturn` option for operations: `insert`, `insert_object`, `insert_many`, `insert_object_many`, `replace`, `replace_object`, `replace_many`, `insert_object_many`, `upsert`, `upsert_object`, `upsert_many`, `upsert_object_many`, - `update`, `delete`. (#267). + `update`, `delete` (#267). ### Fixed * Crud DML operations returning stale schema for metadata generation. diff --git a/crud-scm-1.rockspec b/crud-scm-1.rockspec index d9da54cb..54b04fdf 100644 --- a/crud-scm-1.rockspec +++ b/crud-scm-1.rockspec @@ -7,8 +7,8 @@ source = { dependencies = { 'lua ~> 5.1', - 'checks == 3.1.0-1', - 'errors == 2.2.1-1', + 'checks >= 3.1.0-1', + 'errors >= 2.2.1-1', 'vshard >= 0.1.18-1', } diff --git a/crud/version.lua b/crud/version.lua index 9c7fe0ce..dd22bfcc 100644 --- a/crud/version.lua +++ b/crud/version.lua @@ -1,4 +1,4 @@ -- Сontains the module version. -- Requires manual update in case of release commit. -return '1.1.1' +return '1.2.0' diff --git a/deps.sh b/deps.sh index d9f45e2b..c1b76540 100755 --- a/deps.sh +++ b/deps.sh @@ -4,7 +4,7 @@ set -e # Test dependencies: -tarantoolctl rocks install luatest 0.5.7 +tarantoolctl rocks install luatest tarantoolctl rocks install luacheck 0.25.0 tarantoolctl rocks install luacov 0.13.0 @@ -26,7 +26,7 @@ tarantoolctl rocks install "${LUACOV_COVERALLS_ROCKSPEC_FILE}" rm "${LUACOV_COVERALLS_ROCKSPEC_FILE}" rmdir "${TMPDIR}" -CARTRIDGE_VERSION="${CARTRIDGE_VERSION:-2.7.8}" +CARTRIDGE_VERSION="${CARTRIDGE_VERSION:-2.8.0}" tarantoolctl rocks install cartridge "$CARTRIDGE_VERSION" tarantoolctl rocks install ddl 1.6.2 diff --git a/test/entrypoint/srv_stats.lua b/test/entrypoint/srv_stats.lua index 2082804a..c23d57cf 100755 --- a/test/entrypoint/srv_stats.lua +++ b/test/entrypoint/srv_stats.lua @@ -51,15 +51,21 @@ if crud_utils.is_cartridge_hotreload_supported() then roles_reload_allowed = true end +local is_metrics = pcall(require, 'metrics') +local roles = { + 'cartridge.roles.crud-router', + 'cartridge.roles.crud-storage', + 'customers-storage', +} +if is_metrics then + table.insert(roles, 'cartridge.roles.metrics') +end + local ok, err = errors.pcall('CartridgeCfgError', cartridge.cfg, { advertise_uri = 'localhost:3301', http_port = 8081, bucket_count = 3000, - roles = { - 'cartridge.roles.crud-router', - 'cartridge.roles.crud-storage', - 'customers-storage', - }, + roles = roles, roles_reload_allowed = roles_reload_allowed, }) diff --git a/test/helper.lua b/test/helper.lua index 919b7766..8109fd66 100644 --- a/test/helper.lua +++ b/test/helper.lua @@ -1,6 +1,7 @@ require('strict').on() local t = require('luatest') +local luatest_utils = require('luatest.utils') local log = require('log') local checks = require('checks') @@ -551,4 +552,17 @@ function helpers.is_cartridge_hotreload_supported() return crud_utils.is_cartridge_hotreload_supported() end +function helpers.skip_old_tarantool_cartridge_hotreload() + -- Cartridge hotreload tests stuck for vshard 0.1.22+ on Tarantool 1.10.6, 2.2, 2.3 and 2.4. + -- Logs display a lot of following errors: + -- main/137/vshard.recovery util.lua:103 E> recovery_f has been failed: .../.rocks/share/tarantool/vshard/storage/init.lua:1268: assertion failed! + -- main/136/vshard.gc util.lua:103 E> gc_bucket_f has been failed: .../.rocks/share/tarantool/vshard/storage/init.lua:2530: assertion failed! + local tarantool_version = luatest_utils.get_tarantool_version() + t.skip_if(luatest_utils.version_ge(luatest_utils.version(1, 10, 13), tarantool_version), + "Cartridge hotreload tests stuck for vshard 0.1.22+ on Tarantool 1.10.6") + t.skip_if(luatest_utils.version_ge(tarantool_version, luatest_utils.version(2, 0, 0)) + and luatest_utils.version_ge(luatest_utils.version(2, 5, 1), tarantool_version), + "Cartridge hotreload tests stuck for vshard 0.1.22+ on Tarantool 2.2, 2.3 and 2.4") +end + return helpers diff --git a/test/integration/cfg_test.lua b/test/integration/cfg_test.lua index 3c583bca..1552b02d 100644 --- a/test/integration/cfg_test.lua +++ b/test/integration/cfg_test.lua @@ -72,6 +72,7 @@ end group.test_role_reload_preserves_values = function(g) t.skip_if(not helpers.is_cartridge_hotreload_supported(), "Cartridge roles reload is not supported") + helpers.skip_old_tarantool_cartridge_hotreload() local router = g.cluster:server('router') diff --git a/test/integration/ddl_sharding_info_reload_test.lua b/test/integration/ddl_sharding_info_reload_test.lua index 0066b7af..b78bafc8 100644 --- a/test/integration/ddl_sharding_info_reload_test.lua +++ b/test/integration/ddl_sharding_info_reload_test.lua @@ -307,6 +307,7 @@ for sharding_case_name, sharding_case in pairs(sharding_cases) do ((reload_case == 'reload_roles') and not helpers.is_cartridge_hotreload_supported()), "Cartridge roles reload is not supported") + helpers.skip_old_tarantool_cartridge_hotreload() local storage = g.cluster:server('s1-master') @@ -333,6 +334,12 @@ for _, sharding_case in pairs(sharding_cases) do sharding_case.ddl_space, reload_case_name) pgroup_storage[test_name] = function(g) + t.skip_if( + ((reload_case == 'reload_roles') + and not helpers.is_cartridge_hotreload_supported()), + "Cartridge roles reload is not supported") + helpers.skip_old_tarantool_cartridge_hotreload() + local storage = g.cluster:server('s1-master') -- Init the cache. diff --git a/test/integration/reload_test.lua b/test/integration/reload_test.lua index 28b844bf..908178d2 100644 --- a/test/integration/reload_test.lua +++ b/test/integration/reload_test.lua @@ -79,6 +79,7 @@ end) function g.test_router() t.skip_if(not helpers.is_cartridge_hotreload_supported(), "Cartridge roles reload is not supported") + helpers.skip_old_tarantool_cartridge_hotreload() g.highload_fiber = fiber.new(highload_loop, 'A') @@ -104,6 +105,7 @@ end function g.test_storage() t.skip_if(not helpers.is_cartridge_hotreload_supported(), "Cartridge roles reload is not supported") + helpers.skip_old_tarantool_cartridge_hotreload() g.highload_fiber = fiber.new(highload_loop, 'B') diff --git a/test/integration/stats_test.lua b/test/integration/stats_test.lua index 5424e209..789cce39 100644 --- a/test/integration/stats_test.lua +++ b/test/integration/stats_test.lua @@ -777,6 +777,7 @@ pgroup.test_role_reload_do_not_reset_observations = function(g) t.skip_if((g.params.args.driver == 'metrics') and helpers.is_metrics_0_12_0_or_older(), "See https://github.com/tarantool/metrics/issues/334") + helpers.skip_old_tarantool_cartridge_hotreload() local stats_before = get_stats(g) @@ -851,7 +852,7 @@ end -- https://github.com/tarantool/metrics/blob/fc5a67072340b12f983f09b7d383aca9e2f10cf1/test/utils.lua#L22-L31 local function find_obs(metric_name, label_pairs, observations) for _, obs in pairs(observations) do - local same_label_pairs = pcall(t.assert_equals, obs.label_pairs, label_pairs) + local same_label_pairs = pcall(t.assert_covers, obs.label_pairs, label_pairs) if obs.metric_name == metric_name and same_label_pairs then return obs end @@ -1091,6 +1092,7 @@ group_metrics.test_role_reload_do_not_reset_metrics_observations = function(g) "Cartridge roles reload is not supported") t.skip_if(helpers.is_metrics_0_12_0_or_older(), "See https://github.com/tarantool/metrics/issues/334") + helpers.skip_old_tarantool_cartridge_hotreload() helpers.reload_roles(g.cluster:server('router')) g.router:eval("crud = require('crud')") @@ -1130,6 +1132,7 @@ group_metrics.before_test( group_metrics.test_stats_changed_in_metrics_registry_after_role_reload = function(g) t.skip_if(not helpers.is_cartridge_hotreload_supported(), "Cartridge roles reload is not supported") + helpers.skip_old_tarantool_cartridge_hotreload() helpers.reload_roles(g.cluster:server('router')) g.router:eval("crud = require('crud')") diff --git a/test/integration/updated_shema_test.lua "b/test/integration/updated_s\321\201hema_test.lua" similarity index 100% rename from test/integration/updated_shema_test.lua rename to "test/integration/updated_s\321\201hema_test.lua"