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

Enable Tarantool CE versions matrix and Docker layers caching in CI #108

Merged
merged 3 commits into from
Jul 25, 2021

Conversation

akudiyar
Copy link
Collaborator

  • Enable tests in CI for Tarantool versions 1.10 and 2.8
  • Turn on docker layer caching for speeding up the tests and minimizing CI fails from the unavailable Tarantool installer, repositories, or source docker images

@Totktonada
Copy link
Member

'Cache docker images' step says:

Root cache could not be found. aborting.

It looks as unexpected result, right?

@akudiyar
Copy link
Collaborator Author

akudiyar commented Jul 15, 2021

'Cache docker images' step says:

Root cache could not be found. aborting.

It looks as unexpected result, right?

We need to investigate this. I've found some issues, e. g. satackey/action-docker-layer-caching#49.
PS. I checked again and it seems that this behavior is normal on the first run.

@wey1and wey1and force-pushed the tests-ce branch 7 times, most recently from 96639e3 to 2e58f1e Compare July 22, 2021 20:50
@ArtDu
Copy link
Contributor

ArtDu commented Jul 23, 2021

In the future it is better to make a monkey patch that will substitute the error at a lower level of abstraction. Otherwise, we will not track the error if the code in crud changes, and the test will pass for us, although in reality we will not be able to parse the error.

diff --git a/src/test/resources/cartridge/app/roles/api_router.lua b/src/test/resources/cartridge/app/roles/api_router.lua
index f4a5059..dbef160 100644
--- a/src/test/resources/cartridge/app/roles/api_router.lua
+++ b/src/test/resources/cartridge/app/roles/api_router.lua
@@ -114,7 +114,12 @@ local function box_error_non_network_error()
 end

 local function crud_error_timeout()
-    return nil, { class_name = 'SelectError',
-                 err = 'Failed to get next object: GetTupleError: Failed to get tuples from storages: UpdateTuplesError: Failed to select tuples from storages: Call: Failed for 07d14fec-f32b-4b90-aa72-e6755273ad56: Function returned an error: {\"code\":78,\"base_type\":\"ClientError\",\"type\":\"ClientError\",\"message\":\"Timeout exceeded\",\"trace\":[{\"file\":\"builtin\\/box\\/net_box.lua\",\"line\":419}]}',
-                 str = 'SelectError: Failed to get next object: GetTupleError: Failed to get tuples from storages: UpdateTuplesError: Failed to select tuples from storages: Call: Failed for 07d14fec-f32b-4b90-aa72-e6755273ad56: Function returned an error: {\"code\":78,\"base_type\":\"ClientError\",\"type\":\"ClientError\",\"message\":\"Timeout exceeded\",\"trace\":[{\"file\":\"builtin\\/box\\/net_box.lua\",\"line\":419}]}'
-    }
+    local true_vshard_router_callrw = vshard.router.callrw
+    vshard.router.callrw = function() return nil, box.error.new({code = 78, reason = "Timeout exceeded"}) end
+    local result, err = crud.get('test_space', 1)
+    -- return it back
+    vshard.router.callrw = true_vshard_router_callrw
+    return result, err
 end

 local function init(opts)

@akudiyar akudiyar merged commit 7846e6e into master Jul 25, 2021
@vrogach2020 vrogach2020 deleted the tests-ce branch September 3, 2021 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants