From 914ff513fd2e58719d09921e3dc9c0f37aa3d4d7 Mon Sep 17 00:00:00 2001 From: Georgii Novoselov Date: Thu, 21 Mar 2024 16:45:44 +0000 Subject: [PATCH] Refactor error messages codes. Update deps --- .factory/automation.yml | 902 ++++++++---------- BUILD | 2 +- cpp/lib/common/error_message.cpp | 8 +- csharp/Common/Exception/ErrorMessage.cs | 8 +- .../Integration/{Memory => Marshal}/BUILD | 2 +- .../MemoryTest.cs => Marshal/MarshalTest.cs} | 2 +- dependencies/vaticle/repositories.bzl | 4 +- java/common/exception/ErrorMessage.java | 8 +- python/typedb/common/exception.py | 2 +- 9 files changed, 431 insertions(+), 507 deletions(-) rename csharp/Test/Integration/{Memory => Marshal}/BUILD (97%) rename csharp/Test/Integration/{Memory/MemoryTest.cs => Marshal/MarshalTest.cs} (99%) diff --git a/.factory/automation.yml b/.factory/automation.yml index 57a56f7237..fb8a3137bf 100644 --- a/.factory/automation.yml +++ b/.factory/automation.yml @@ -80,452 +80,378 @@ build: git add $DOCS_DIRS git diff --exit-code HEAD $DOCS_DIRS -# test-rust-unit-integration: -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel test //rust:typedb_driver_unit_tests --test_output=streamed || exit 1 -# tool/test/start-core-server.sh && -# bazel test //rust/tests --test_output=streamed --test_arg=-- \ -# --test_arg=integration::queries::core && -# export CORE_FAILED= || export CORE_FAILED=1 -# tool/test/stop-core-server.sh -# if [[ -n "$CORE_FAILED" ]]; then exit 1; fi -# -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=integration::queries::cloud \ -# --test_arg=integration::runtimes && -# export CLOUD_FAILED= || export CLOUD_FAILED=1 -# tool/test/stop-cloud-servers.sh -# if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi -# -# test-rust-behaviour-minimal: -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::concept && -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::connection && -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::driver && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-rust-behaviour-query-read: -# machine: 8-core-32-gb -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# filter: -# owner: vaticle -# branch: [master, development] -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::query::language::match_ \ -# --test_arg=behaviour::query::language::get \ -# --test_arg=behaviour::query::language::fetch \ -# --test_arg=behaviour::query::language::modifiers \ -# --test_arg=behaviour::query::language::expression && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-rust-behaviour-query-write: -# machine: 8-core-32-gb -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# filter: -# owner: vaticle -# branch: [master, development] -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ -# --test_arg=behaviour::query::language::define \ -# --test_arg=behaviour::query::language::undefine \ -# --test_arg=behaviour::query::language::insert \ -# --test_arg=behaviour::query::language::delete \ -# --test_arg=behaviour::query::language::update \ -# --test_arg=behaviour::query::language::rule_validation && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-c-integration: -# image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# bazel test //c/tests/integration:test-driver --test_output=errors && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-java-integration: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel test //java/test/integration/... --test_output=errors -# -# test-java-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# .factory/test-core.sh //java/test/behaviour/connection/... --test_output=errors --jobs=1 -# # TODO: delete --jobs=1 if we fix the issue with excess memory usage -# .factory/test-core.sh //java/test/behaviour/concept/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/driver/query/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/match/... --test_output=errors # TODO: Squeeze such tests to /language/... --jobs=1 -# .factory/test-core.sh //java/test/behaviour/query/language/get/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/fetch/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/modifiers/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/expression/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/insert/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/delete/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/update/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/define/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/undefine/... --test_output=errors -# .factory/test-core.sh //java/test/behaviour/query/language/rulevalidation/... --test_output=errors -# -# test-java-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# .factory/test-cloud.sh //java/test/behaviour/connection/... --test_output=errors --jobs=1 -# # TODO: delete --jobs=1 if we fix the issue with excess memory usage -# .factory/test-cloud.sh //java/test/behaviour/concept/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/driver/query/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/match/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/get/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/fetch/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/modifiers/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/expression/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/insert/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/delete/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/update/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/define/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/undefine/... --test_output=errors -# .factory/test-cloud.sh //java/test/behaviour/query/language/rulevalidation/... --test_output=errors -# -# test-python-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export PATH="$HOME/.local/bin:$PATH" -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# -# tool/test/start-core-server.sh && -# .factory/test-core.sh //python/tests/behaviour/connection/database/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //python/tests/behaviour/connection/session/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //python/tests/behaviour/connection/transaction/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //python/tests/behaviour/concept/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //python/tests/behaviour/driver/query/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/match/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/get/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/fetch/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/modifiers/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/expression/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/insert/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/delete/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/update/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/define/... --test_output=errors && -# .factory/test-core.sh //python/tests/behaviour/query/language/undefine/... --test_output=errors && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-python-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export PATH="$HOME/.local/bin:$PATH" -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# -# source tool/test/start-cloud-servers.sh && # use source to receive export vars -# .factory/test-cloud.sh //python/tests/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //python/tests/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/match/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/get/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/fetch/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/modifiers/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/expression/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/insert/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/delete/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/update/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/define/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //python/tests/behaviour/query/language/undefine/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-python-integration-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export PATH="$HOME/.local/bin:$PATH" -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# -# tool/test/start-core-server.sh && -# bazel test //python/tests/integration:test_connection --test_output=streamed --jobs=1 && -# bazel test //python/tests/integration:test_stream --test_output=streamed --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS - -# test-python-integration-cloud-failover: -# machine: 4-core-16-gb -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export PATH="$HOME/.local/bin:$PATH" -# sudo apt-get update -# sudo apt install python3-pip -y -# python3 -m pip install -U pip -# python3 -m pip install -r python/requirements_dev.txt -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel test //python/tests/integration:test_cloud_failover --test_output=errors - -# test-nodejs-integration: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel build //nodejs/... -# cp -rL bazel-bin/nodejs/node_modules nodejs/. -# cp -rL bazel-bin/nodejs/dist nodejs/. -# tool/test/start-core-server.sh && -# node nodejs/test/integration/test-concept.js && -# node nodejs/test/integration/test-connection.js && -# node nodejs/test/integration/test-query.js && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-nodejs-cloud-failover: -# machine: 4-core-16-gb -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# bazel build //nodejs/... -# cp -rL bazel-bin/nodejs/node_modules nodejs/. -# cp -rL bazel-bin/nodejs/dist nodejs/. -# source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars -# node nodejs/test/integration/test-cloud-failover.js && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-nodejs-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# .factory/test-core.sh //nodejs/test/behaviour/connection/database/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/connection/session/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/connection/transaction/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/concept/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/driver/query/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/match/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/get/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/expression/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/fetch/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/modifiers/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/insert/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/delete/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/update/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/define/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //nodejs/test/behaviour/query/language/undefine/... --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-nodejs-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh && # use source to receive export vars -# .factory/test-cloud.sh //nodejs/test/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/match/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/get/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/expression/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/fetch/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/modifiers/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/insert/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/delete/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/update/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/define/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //nodejs/test/behaviour/query/language/undefine/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS -# -# test-cpp-integration-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# sudo apt-get update -# sudo apt install clang-format-15 -y && sudo ln -s $(which clang-format-15) /usr/bin/clang-format -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# bazel test //cpp/test/integration/... --test_output=streamed --jobs=1 && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-cpp-behaviour-core: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# sudo apt-get update -# sudo apt install clang-format-15 -y && sudo ln -s $(which clang-format-15) /usr/bin/clang-format -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# tool/test/start-core-server.sh && -# .factory/test-core.sh //cpp/test/behaviour/connection/database/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //cpp/test/behaviour/connection/session/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //cpp/test/behaviour/connection/transaction/... --test_output=streamed --jobs=1 && -# .factory/test-core.sh //cpp/test/behaviour/concept/... --test_output=errors --jobs=1 && -# .factory/test-core.sh //cpp/test/behaviour/driver/query/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/match/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/get/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/fetch/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/modifiers/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/expression/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/insert/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/delete/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/update/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/define/... --test_output=errors && -# .factory/test-core.sh //cpp/test/behaviour/query/language/undefine/... --test_output=errors && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-core-server.sh -# exit $TEST_SUCCESS -# -# test-cpp-behaviour-cloud: -# image: vaticle-ubuntu-22.04 -# dependencies: -# - build -# type: foreground -# command: | -# export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME -# export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD -# bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh -# bazel run @vaticle_dependencies//distribution/artifact:create-netrc -# source tool/test/start-cloud-servers.sh && -# .factory/test-cloud.sh //cpp/test/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && -# .factory/test-cloud.sh //cpp/test/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/match/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/get/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/fetch/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/modifiers/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/expression/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/insert/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/delete/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/update/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/define/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# .factory/test-cloud.sh //cpp/test/behaviour/query/language/undefine/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && -# export TEST_SUCCESS=0 || export TEST_SUCCESS=1 -# tool/test/stop-cloud-servers.sh -# exit $TEST_SUCCESS + test-rust-unit-integration: + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel test //rust:typedb_driver_unit_tests --test_output=streamed || exit 1 + tool/test/start-core-server.sh && + bazel test //rust/tests --test_output=streamed --test_arg=-- \ + --test_arg=integration::queries::core && + export CORE_FAILED= || export CORE_FAILED=1 + tool/test/stop-core-server.sh + if [[ -n "$CORE_FAILED" ]]; then exit 1; fi + + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=integration::queries::cloud \ + --test_arg=integration::runtimes && + export CLOUD_FAILED= || export CLOUD_FAILED=1 + tool/test/stop-cloud-servers.sh + if [[ -n "$CLOUD_FAILED" ]]; then exit 1; fi + + test-rust-behaviour-minimal: + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::concept && + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::connection && + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::driver && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-rust-behaviour-query-read: + machine: 8-core-32-gb + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + filter: + owner: vaticle + branch: [master, development] + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::query::language::match_ \ + --test_arg=behaviour::query::language::get \ + --test_arg=behaviour::query::language::fetch \ + --test_arg=behaviour::query::language::modifiers \ + --test_arg=behaviour::query::language::expression && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-rust-behaviour-query-write: + machine: 8-core-32-gb + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + filter: + owner: vaticle + branch: [master, development] + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + bazel test //rust/tests --test_output=streamed --test_env=ROOT_CA=$ROOT_CA --test_arg=-- \ + --test_arg=behaviour::query::language::define \ + --test_arg=behaviour::query::language::undefine \ + --test_arg=behaviour::query::language::insert \ + --test_arg=behaviour::query::language::delete \ + --test_arg=behaviour::query::language::update \ + --test_arg=behaviour::query::language::rule_validation && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-c-integration: + image: vaticle-ubuntu-20.04 # Ubuntu 20.04 has GLIBC version 2.31 (2020) which we should verify to compile against + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + bazel test //c/tests/integration:test-driver --test_output=errors && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-java-integration: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel test //java/test/integration/... --test_output=errors + + test-java-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + .factory/test-core.sh //java/test/behaviour/connection/... --test_output=errors --jobs=1 + # TODO: delete --jobs=1 if we fix the issue with excess memory usage + .factory/test-core.sh //java/test/behaviour/concept/... --test_output=errors + .factory/test-core.sh //java/test/behaviour/driver/query/... --test_output=errors + .factory/test-core.sh //java/test/behaviour/query/language/... --test_output=errors --jobs=1 + + test-java-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + .factory/test-cloud.sh //java/test/behaviour/connection/... --test_output=errors --jobs=1 + # TODO: delete --jobs=1 if we fix the issue with excess memory usage + .factory/test-cloud.sh //java/test/behaviour/concept/... --test_output=errors + .factory/test-cloud.sh //java/test/behaviour/driver/query/... --test_output=errors + .factory/test-cloud.sh //java/test/behaviour/query/language/... --test_output=errors --jobs=1 + + test-python-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export PATH="$HOME/.local/bin:$PATH" + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + + tool/test/start-core-server.sh && + .factory/test-core.sh //python/tests/behaviour/connection/database/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //python/tests/behaviour/connection/session/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //python/tests/behaviour/connection/transaction/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //python/tests/behaviour/concept/... --test_output=errors --jobs=1 && + .factory/test-core.sh //python/tests/behaviour/driver/query/... --test_output=errors && + .factory/test-core.sh //python/tests/behaviour/query/language/... --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-python-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export PATH="$HOME/.local/bin:$PATH" + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + + source tool/test/start-cloud-servers.sh && # use source to receive export vars + .factory/test-cloud.sh //python/tests/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //python/tests/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && + .factory/test-cloud.sh //python/tests/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-python-integration-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export PATH="$HOME/.local/bin:$PATH" + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + + tool/test/start-core-server.sh && + bazel test //python/tests/integration:test_connection --test_output=streamed --jobs=1 && + bazel test //python/tests/integration:test_stream --test_output=streamed --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-python-integration-cloud-failover: + machine: 4-core-16-gb + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export PATH="$HOME/.local/bin:$PATH" + sudo apt-get update + sudo apt install python3-pip -y + python3 -m pip install -U pip + python3 -m pip install -r python/requirements_dev.txt + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel test //python/tests/integration:test_cloud_failover --test_output=errors + + test-nodejs-integration: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel build //nodejs/... + cp -rL bazel-bin/nodejs/node_modules nodejs/. + cp -rL bazel-bin/nodejs/dist nodejs/. + tool/test/start-core-server.sh && + node nodejs/test/integration/test-concept.js && + node nodejs/test/integration/test-connection.js && + node nodejs/test/integration/test-query.js && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-nodejs-cloud-failover: + machine: 4-core-16-gb + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + bazel build //nodejs/... + cp -rL bazel-bin/nodejs/node_modules nodejs/. + cp -rL bazel-bin/nodejs/dist nodejs/. + source tool/test/start-cloud-servers.sh 3 && # use source to receive export vars + node nodejs/test/integration/test-cloud-failover.js && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-nodejs-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + .factory/test-core.sh //nodejs/test/behaviour/connection/database/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/connection/session/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/connection/transaction/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/concept/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/driver/query/... --test_output=errors --jobs=1 && + .factory/test-core.sh //nodejs/test/behaviour/query/language/... --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-nodejs-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh && # use source to receive export vars + .factory/test-cloud.sh //nodejs/test/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //nodejs/test/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS + + test-cpp-integration-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + sudo apt-get update + sudo apt install clang-format-15 -y && sudo ln -s $(which clang-format-15) /usr/bin/clang-format + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + bazel test //cpp/test/integration/... --test_output=streamed --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-cpp-behaviour-core: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + sudo apt-get update + sudo apt install clang-format-15 -y && sudo ln -s $(which clang-format-15) /usr/bin/clang-format + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + tool/test/start-core-server.sh && + .factory/test-core.sh //cpp/test/behaviour/connection/database/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //cpp/test/behaviour/connection/session/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //cpp/test/behaviour/connection/transaction/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //cpp/test/behaviour/concept/... --test_output=errors --jobs=1 && + .factory/test-core.sh //cpp/test/behaviour/driver/query/... --test_output=errors && + .factory/test-core.sh //cpp/test/behaviour/query/language/... --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-core-server.sh + exit $TEST_SUCCESS + + test-cpp-behaviour-cloud: + image: vaticle-ubuntu-22.04 + dependencies: + - build + type: foreground + command: | + export ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME + export ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD + bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh + bazel run @vaticle_dependencies//distribution/artifact:create-netrc + source tool/test/start-cloud-servers.sh && + .factory/test-cloud.sh //cpp/test/behaviour/connection/database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/connection/session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/connection/transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/connection/user/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //cpp/test/behaviour/driver/query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && + .factory/test-cloud.sh //cpp/test/behaviour/query/language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + export TEST_SUCCESS=0 || export TEST_SUCCESS=1 + tool/test/stop-cloud-servers.sh + exit $TEST_SUCCESS test-csharp-integration-core: image: vaticle-ubuntu-22.04 @@ -556,9 +482,9 @@ build: bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh bazel run @vaticle_dependencies//distribution/artifact:create-netrc tool/test/start-core-server.sh && - .factory/test-core.sh //csharp/Test/Behaviour/Connection/Database/... --test_output=streamed --jobs=1 && - .factory/test-core.sh //csharp/Test/Behaviour/Connection/Session/... --test_output=streamed --jobs=1 && - .factory/test-core.sh //csharp/Test/Behaviour/Connection/Transaction/... --test_output=streamed --jobs=1 && + .factory/test-core.sh //csharp/Test/Behaviour/Connection/Database/... --test_output=errors --jobs=1 && + .factory/test-core.sh //csharp/Test/Behaviour/Connection/Session/... --test_output=errors --jobs=1 && + .factory/test-core.sh //csharp/Test/Behaviour/Connection/Transaction/... --test_output=errors --jobs=1 && .factory/test-core.sh //csharp/Test/Behaviour/Concept/... --test_output=errors --jobs=1 && .factory/test-core.sh //csharp/Test/Behaviour/Driver/Query/... --test_output=errors && .factory/test-core.sh //csharp/Test/Behaviour/Query/Language/... --test_output=errors --jobs=1 && @@ -578,53 +504,51 @@ build: bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh bazel run @vaticle_dependencies//distribution/artifact:create-netrc source tool/test/start-cloud-servers.sh && - .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Database/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && - .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Session/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && - .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && - .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/User/... --test_env=ROOT_CA=$ROOT_CA --test_output=streamed --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Database/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Session/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/Transaction/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Connection/User/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && .factory/test-cloud.sh //csharp/Test/Behaviour/Concept/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && .factory/test-cloud.sh //csharp/Test/Behaviour/Driver/Query/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors && - .factory/test-cloud.sh //csharp/Test/Behaviour/Query/Language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && + .factory/test-cloud.sh //csharp/Test/Behaviour/Query/Language/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && .factory/test-cloud.sh //csharp/Test/Behaviour/Query/Reasoner/... --test_env=ROOT_CA=$ROOT_CA --test_output=errors --jobs=1 && export TEST_SUCCESS=0 || export TEST_SUCCESS=1 tool/test/stop-cloud-servers.sh exit $TEST_SUCCESS -# sync-dependencies: -# image: vaticle-ubuntu-22.04 -# filter: -# owner: vaticle -# branch: [master, development] -# dependencies: -# - build -# - build-dependency -# - build-docs -# - test-rust-unit-integration -# - test-rust-behaviour-minimal -# - test-rust-behaviour-query-read -# - test-rust-behaviour-query-write -# - test-c-integration -# - test-java-integration -# - test-java-behaviour-core -# - test-java-behaviour-cloud -# - test-python-behaviour-core -# - test-python-behaviour-cloud -# - test-python-integration-core -# - test-nodejs-integration -# - test-nodejs-cloud-failover -# - test-nodejs-behaviour-core -# - test-nodejs-behaviour-cloud -# - test-cpp-integration-core -# - test-cpp-behaviour-core -# - test-cpp-behaviour-cloud -# command: | -# sudo add-apt-repository ppa:deadsnakes/ppa -# sudo apt update && sudo apt install -y python3.9 python3.9-distutils python3-pip -# python3.9 -m pip install -U cffi -# export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN -# bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${FACTORY_REPO}@${FACTORY_COMMIT} - -# TODO: assembly tests for all drivers to run in factory + sync-dependencies: + image: vaticle-ubuntu-22.04 + filter: + owner: vaticle + branch: [master, development] + dependencies: + - build + - build-dependency + - build-docs + - test-rust-unit-integration + - test-rust-behaviour-minimal + - test-rust-behaviour-query-read + - test-rust-behaviour-query-write + - test-c-integration + - test-java-integration + - test-java-behaviour-core + - test-java-behaviour-cloud + - test-python-behaviour-core + - test-python-behaviour-cloud + - test-python-integration-core + - test-nodejs-integration + - test-nodejs-cloud-failover + - test-nodejs-behaviour-core + - test-nodejs-behaviour-cloud + - test-cpp-integration-core + - test-cpp-behaviour-core + - test-cpp-behaviour-cloud + command: | + sudo add-apt-repository -y ppa:deadsnakes/ppa + sudo apt update && sudo apt install -y python3.9 python3.9-distutils python3-pip + python3.9 -m pip install -U cffi + export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN + bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${FACTORY_REPO}@${FACTORY_COMMIT} release: filter: diff --git a/BUILD b/BUILD index 60db8dc0aa..c34aeb6b28 100644 --- a/BUILD +++ b/BUILD @@ -65,7 +65,7 @@ release_validate_deps( "@vaticle_typeql", ], tags = ["manual"], # in order for bazel test //... to not fail - version_file = "VERSION", # TODO: It is temporary while the main build fails! + version_file = ":VERSION", ) # Force tools to be built during `build //...` diff --git a/cpp/lib/common/error_message.cpp b/cpp/lib/common/error_message.cpp index 34e2a39c77..518913f914 100644 --- a/cpp/lib/common/error_message.cpp +++ b/cpp/lib/common/error_message.cpp @@ -32,7 +32,7 @@ namespace TypeDB { namespace DriverError { -#define ERR_DRIVER(ID, MSG) ERRMSG("CCCL", "Driver Error", ID, MSG) +#define ERR_DRIVER(ID, MSG) ERRMSG("DRI", "Driver Error", ID, MSG) DECLSPEC_DLL extern const ErrorMessage DRIVER_CLOSED = ERR_DRIVER(1, "The driver has been closed and no further operation is allowed."); DECLSPEC_DLL extern const ErrorMessage SESSION_CLOSED = ERR_DRIVER(2, "The session has been closed and no further operation is allowed."); DECLSPEC_DLL extern const ErrorMessage TRANSACTION_CLOSED = ERR_DRIVER(3, "The transaction has been closed and no further operation is allowed."); @@ -48,7 +48,7 @@ DECLSPEC_DLL extern const ErrorMessage CALLBACK_EXCEPTION = ERR_DRIVER(9, "An ex namespace ConceptError { -#define ERR_CONCEPT(ID, MSG) ERRMSG("CCO", "Concept Error", ID, MSG) +#define ERR_CONCEPT(ID, MSG) ERRMSG("CON", "Concept Error", ID, MSG) DECLSPEC_DLL extern const ErrorMessage INVALID_CONCEPT_CASTING = ERR_CONCEPT(1, "Invalid concept conversion from '%s' to '%s'."); DECLSPEC_DLL extern const ErrorMessage MISSING_TRANSACTION = ERR_CONCEPT(2, "Transaction cannot be null."); DECLSPEC_DLL extern const ErrorMessage MISSING_IID = ERR_CONCEPT(3, "IID cannot be null or empty."); @@ -64,7 +64,7 @@ DECLSPEC_DLL extern const ErrorMessage UNRECOGNISED_ANNOTATION = ERR_CONCEPT(9, namespace QueryError { -#define ERR_QUERY(ID, MSG) ERRMSG("CQY", "Query Error", ID, MSG) +#define ERR_QUERY(ID, MSG) ERRMSG("QRY", "Query Error", ID, MSG) DECLSPEC_DLL extern const ErrorMessage VARIABLE_DOES_NOT_EXIST = ERR_QUERY(1, "The variable '%s' does not exist."); DECLSPEC_DLL extern const ErrorMessage MISSING_QUERY = ERR_QUERY(2, "Query cannot be null or empty."); #undef ERR_QUERY @@ -73,7 +73,7 @@ DECLSPEC_DLL extern const ErrorMessage MISSING_QUERY = ERR_QUERY(2, "Query canno namespace InternalError { -#define ERR_INTERNAL(ID, MSG) ERRMSG("CIN", "C++ Internal Error", ID, MSG) +#define ERR_INTERNAL(ID, MSG) ERRMSG("INT", "C++ Internal Error", ID, MSG) DECLSPEC_DLL extern const ErrorMessage UNEXPECTED_NATIVE_VALUE = ERR_INTERNAL(1, "Unexpected native value encountered!"); DECLSPEC_DLL extern const ErrorMessage ILLEGAL_STATE = ERR_INTERNAL(2, "Illegal state has been reached! (%s : %d)."); DECLSPEC_DLL extern const ErrorMessage ILLEGAL_CAST = ERR_INTERNAL(3, "Illegal casting operation to '%s'."); diff --git a/csharp/Common/Exception/ErrorMessage.cs b/csharp/Common/Exception/ErrorMessage.cs index 0a483476f5..1da8abc9cd 100644 --- a/csharp/Common/Exception/ErrorMessage.cs +++ b/csharp/Common/Exception/ErrorMessage.cs @@ -50,7 +50,7 @@ namespace Error { public class Driver : ErrorMessage { - private const string CODE_PREFIX = "CSCL"; + private const string CODE_PREFIX = "DRI"; private const string MESSAGE_PREFIX = "Driver Error"; public Driver(int codeNumber, string message) @@ -76,7 +76,7 @@ public Driver(int codeNumber, string message) public class Concept : ErrorMessage { - private const string CODE_PREFIX = "CSCO"; + private const string CODE_PREFIX = "CON"; private const string MESSAGE_PREFIX = "Concept Error"; public Concept(int codeNumber, string message) @@ -106,7 +106,7 @@ public Concept(int codeNumber, string message) public class Query : ErrorMessage { - private const string CODE_PREFIX = "CSQY"; + private const string CODE_PREFIX = "QRY"; private const string MESSAGE_PREFIX = "Query Error"; public Query(int codeNumber, string message) @@ -122,7 +122,7 @@ public Query(int codeNumber, string message) public class Internal : ErrorMessage { - private const string CODE_PREFIX = "CSIN"; + private const string CODE_PREFIX = "INT"; private const string MESSAGE_PREFIX = "C# Internal Error"; public Internal(int codeNumber, string message) diff --git a/csharp/Test/Integration/Memory/BUILD b/csharp/Test/Integration/Marshal/BUILD similarity index 97% rename from csharp/Test/Integration/Memory/BUILD rename to csharp/Test/Integration/Marshal/BUILD index 0b6989b75c..772925c0e7 100644 --- a/csharp/Test/Integration/Memory/BUILD +++ b/csharp/Test/Integration/Marshal/BUILD @@ -26,7 +26,7 @@ load("@vaticle_dependencies//tool/checkstyle:rules.bzl", "checkstyle_test") csharp_integration_test( name = "test", - srcs = ["MemoryTest.cs"], + srcs = ["MarshalTest.cs"], deps = [ "//csharp:driver-csharp", "//csharp/Api:api", diff --git a/csharp/Test/Integration/Memory/MemoryTest.cs b/csharp/Test/Integration/Marshal/MarshalTest.cs similarity index 99% rename from csharp/Test/Integration/Memory/MemoryTest.cs rename to csharp/Test/Integration/Marshal/MarshalTest.cs index 1d72b9ddef..16a4cd6c32 100644 --- a/csharp/Test/Integration/Memory/MemoryTest.cs +++ b/csharp/Test/Integration/Marshal/MarshalTest.cs @@ -94,7 +94,7 @@ public static void CheckAllDatabases(IDatabaseManager dbManager, ICollection