Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.2.0 #363

Merged
merged 9 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/reusable_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
49 changes: 24 additions & 25 deletions .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions crud-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}

Expand Down
2 changes: 1 addition & 1 deletion crud/version.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Сontains the module version.
-- Requires manual update in case of release commit.

return '1.1.1'
return '1.2.0'
4 changes: 2 additions & 2 deletions deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
16 changes: 11 additions & 5 deletions test/entrypoint/srv_stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})

Expand Down
14 changes: 14 additions & 0 deletions test/helper.lua
Original file line number Diff line number Diff line change
@@ -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')
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions test/integration/cfg_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
7 changes: 7 additions & 0 deletions test/integration/ddl_sharding_info_reload_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions test/integration/reload_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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')

Expand Down
5 changes: 4 additions & 1 deletion test/integration/stats_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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')")
Expand Down Expand Up @@ -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')")
Expand Down