From d7c881267dc304dd2542656277e241fb1490f8be Mon Sep 17 00:00:00 2001 From: Yichen Wang <18348405+Aiee@users.noreply.github.com> Date: Tue, 18 Jan 2022 17:21:12 +0800 Subject: [PATCH] Update client version to v3.0.0 (#3741) * Update python package name to v3 * Update client version white list * Update go mod to v3 * Change the python package name used in tests * Update client version white list --- cmake/ThriftGenerate.cmake | 2 +- src/graph/service/GraphFlags.cpp | 2 +- .../service/test/StandAloneTestGraphFlags.cpp | 2 +- src/interface/common.thrift | 4 ++-- src/interface/graph.thrift | 2 +- src/interface/meta.thrift | 2 +- src/interface/storage.thrift | 2 +- .../admin/VerifyClientVersionProcessor.cpp | 2 +- tests/admin/test_permission.py | 2 +- tests/common/comparator.py | 2 +- tests/common/dataset_printer.py | 2 +- tests/common/nebula_service.py | 4 ++-- tests/common/nebula_test_suite.py | 8 ++++---- tests/common/path_value.py | 2 +- tests/common/utils.py | 8 ++++---- tests/conftest.py | 10 +++++----- tests/job/test_session.py | 14 +++++++------- tests/query/stateless/test_if_exists.py | 2 +- tests/query/stateless/test_keyword.py | 2 +- tests/query/stateless/test_range.py | 2 +- tests/tck/conftest.py | 10 +++++----- tests/tck/steps/conftest.py | 2 +- tests/tck/utils/nbv.py | 2 +- tests/tck/utils/table.py | 2 +- 24 files changed, 46 insertions(+), 46 deletions(-) diff --git a/cmake/ThriftGenerate.cmake b/cmake/ThriftGenerate.cmake index d82af8ef678..353a33c403b 100644 --- a/cmake/ThriftGenerate.cmake +++ b/cmake/ThriftGenerate.cmake @@ -86,7 +86,7 @@ add_custom_command( --gen "js:node:" --gen "csharp" --gen "java:hashcode" - --gen "go:thrift_import=github.com/facebook/fbthrift/thrift/lib/go/thrift,package_prefix=github.com/vesoft-inc/nebula-go/v2/,use_context" + --gen "go:thrift_import=github.com/facebook/fbthrift/thrift/lib/go/thrift,package_prefix=github.com/vesoft-inc/nebula-go/v3/,use_context" -o "." "${file_path}/${file_name}.thrift" COMMAND mkdir -p "./gen-rust/${file_name}" diff --git a/src/graph/service/GraphFlags.cpp b/src/graph/service/GraphFlags.cpp index 32fd80f2c14..532174509b4 100644 --- a/src/graph/service/GraphFlags.cpp +++ b/src/graph/service/GraphFlags.cpp @@ -56,7 +56,7 @@ DEFINE_bool(enable_optimizer, false, "Whether to enable optimizer"); DEFINE_uint32(ft_request_retry_times, 3, "Retry times if fulltext request failed"); DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list."); DEFINE_string(client_white_list, - nebula::getOriginVersion() + ":2.5.0:2.5.1:2.6.0", + nebula::getOriginVersion() + ":3.0.0", "A white list for different client versions, separate with colon."); #endif diff --git a/src/graph/service/test/StandAloneTestGraphFlags.cpp b/src/graph/service/test/StandAloneTestGraphFlags.cpp index de8de4c59d5..f53f1b44453 100644 --- a/src/graph/service/test/StandAloneTestGraphFlags.cpp +++ b/src/graph/service/test/StandAloneTestGraphFlags.cpp @@ -9,5 +9,5 @@ DEFINE_uint32(ft_request_retry_times, 3, "Retry times if fulltext request failed"); DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list."); DEFINE_string(client_white_list, - nebula::getOriginVersion() + ":2.5.0:2.5.1:2.6.0", + nebula::getOriginVersion() + ":3.0.0", "A white list for different client versions, separate with colon."); diff --git a/src/interface/common.thrift b/src/interface/common.thrift index 3075f3bd051..84e70effdcc 100644 --- a/src/interface/common.thrift +++ b/src/interface/common.thrift @@ -10,7 +10,7 @@ namespace java com.vesoft.nebula namespace go nebula namespace js nebula namespace csharp nebula -namespace py nebula2.common +namespace py nebula3.common cpp_include "common/thrift/ThriftTypes.h" cpp_include "common/datatypes/DateOps-inl.h" @@ -34,7 +34,7 @@ cpp_include "common/datatypes/DurationOps-inl.h" * */ -const binary (cpp.type = "char const *") version = "2.6.0" +const binary (cpp.type = "char const *") version = "3.0.0" typedef i64 (cpp.type = "nebula::ClusterID") ClusterID typedef i32 (cpp.type = "nebula::GraphSpaceID") GraphSpaceID diff --git a/src/interface/graph.thrift b/src/interface/graph.thrift index bfdad9cd1e1..d8bc4156158 100644 --- a/src/interface/graph.thrift +++ b/src/interface/graph.thrift @@ -9,7 +9,7 @@ namespace java com.vesoft.nebula.graph namespace go nebula.graph namespace js nebula.graph namespace csharp nebula.graph -namespace py nebula2.graph +namespace py nebula3.graph include "common.thrift" diff --git a/src/interface/meta.thrift b/src/interface/meta.thrift index b512c94ec11..1be7a816917 100644 --- a/src/interface/meta.thrift +++ b/src/interface/meta.thrift @@ -8,7 +8,7 @@ namespace java com.vesoft.nebula.meta namespace go nebula.meta namespace js nebula.meta namespace csharp nebula.meta -namespace py nebula2.meta +namespace py nebula3.meta include "common.thrift" diff --git a/src/interface/storage.thrift b/src/interface/storage.thrift index 1ff18fd1cd8..9ea758e82ec 100644 --- a/src/interface/storage.thrift +++ b/src/interface/storage.thrift @@ -9,7 +9,7 @@ namespace java com.vesoft.nebula.storage namespace go nebula.storage namespace csharp nebula.storage namespace js nebula.storage -namespace py nebula2.storage +namespace py nebula3.storage include "common.thrift" include "meta.thrift" diff --git a/src/meta/processors/admin/VerifyClientVersionProcessor.cpp b/src/meta/processors/admin/VerifyClientVersionProcessor.cpp index 3678c717a47..df00c1cdbff 100644 --- a/src/meta/processors/admin/VerifyClientVersionProcessor.cpp +++ b/src/meta/processors/admin/VerifyClientVersionProcessor.cpp @@ -9,7 +9,7 @@ DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list."); DEFINE_string(client_white_list, - nebula::getOriginVersion() + ":2.5.0:2.5.1:2.6.0", + nebula::getOriginVersion() + ":3.0.0", "A white list for different client versions, separate with colon."); namespace nebula { diff --git a/tests/admin/test_permission.py b/tests/admin/test_permission.py index 471e5645237..990e0972d6e 100644 --- a/tests/admin/test_permission.py +++ b/tests/admin/test_permission.py @@ -6,7 +6,7 @@ import time -from nebula2.common import ttypes +from nebula3.common import ttypes from tests.common.nebula_test_suite import NebulaTestSuite diff --git a/tests/common/comparator.py b/tests/common/comparator.py index b77870fe4f4..9fb42ddf85a 100644 --- a/tests/common/comparator.py +++ b/tests/common/comparator.py @@ -7,7 +7,7 @@ from enum import Enum from typing import Union, Dict, List -from nebula2.common.ttypes import ( +from nebula3.common.ttypes import ( DataSet, Edge, Path, diff --git a/tests/common/dataset_printer.py b/tests/common/dataset_printer.py index 12c09161293..3c4e5e420c8 100644 --- a/tests/common/dataset_printer.py +++ b/tests/common/dataset_printer.py @@ -6,7 +6,7 @@ from typing import List, Union -from nebula2.common.ttypes import DataSet, Edge, NullType, Path, Value, Vertex +from nebula3.common.ttypes import DataSet, Edge, NullType, Path, Value, Vertex Pattern = type(re.compile(r'\d+')) diff --git a/tests/common/nebula_service.py b/tests/common/nebula_service.py index 1958ca15086..c7d0495ad7d 100644 --- a/tests/common/nebula_service.py +++ b/tests/common/nebula_service.py @@ -20,8 +20,8 @@ from tests.common.constants import TMP_DIR from tests.common.utils import get_ssl_config -from nebula2.gclient.net import ConnectionPool -from nebula2.Config import Config +from nebula3.gclient.net import ConnectionPool +from nebula3.Config import Config NEBULA_START_COMMAND_FORMAT = "bin/nebula-{} --flagfile conf/nebula-{}.conf {}" diff --git a/tests/common/nebula_test_suite.py b/tests/common/nebula_test_suite.py index 1ff82bf2859..ce7c217ca25 100644 --- a/tests/common/nebula_test_suite.py +++ b/tests/common/nebula_test_suite.py @@ -11,10 +11,10 @@ from pathlib import Path from typing import Pattern, Set -from nebula2.common import ttypes as CommonTtypes -# from nebula2.gclient.net import ConnectionPool -# from nebula2.Config import Config -from nebula2.graph import ttypes +from nebula3.common import ttypes as CommonTtypes +# from nebula3.gclient.net import ConnectionPool +# from nebula3.Config import Config +from nebula3.graph import ttypes from tests.common.configs import get_delay_time from tests.common.utils import ( compare_value, diff --git a/tests/common/path_value.py b/tests/common/path_value.py index 68288e76274..50d1f1bc4dd 100644 --- a/tests/common/path_value.py +++ b/tests/common/path_value.py @@ -4,7 +4,7 @@ # # This source code is licensed under Apache 2.0 License. -from nebula2.common import ttypes as CommonTtypes +from nebula3.common import ttypes as CommonTtypes class PathVal: diff --git a/tests/common/utils.py b/tests/common/utils.py index 75323d0b83b..894e8ca91b3 100644 --- a/tests/common/utils.py +++ b/tests/common/utils.py @@ -13,10 +13,10 @@ import yaml from typing import Pattern -from nebula2.Config import Config, SSL_config -from nebula2.common import ttypes as CommonTtypes -from nebula2.gclient.net import Session -from nebula2.gclient.net import ConnectionPool +from nebula3.Config import Config, SSL_config +from nebula3.common import ttypes as CommonTtypes +from nebula3.gclient.net import Session +from nebula3.gclient.net import ConnectionPool from tests.common.constants import NB_TMP_PATH, NEBULA_HOME from tests.common.csv_import import CSVImporter diff --git a/tests/conftest.py b/tests/conftest.py index 4f79d1de866..c23d24a2401 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,11 +15,11 @@ from tests.common.constants import NB_TMP_PATH, SPACE_TMP_PATH, BUILD_DIR, NEBULA_HOME from tests.common.nebula_service import NebulaService -from nebula2.fbthrift.transport import TSocket -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol -from nebula2.gclient.net import Connection -from nebula2.graph import GraphService +from nebula3.fbthrift.transport import TSocket +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol +from nebula3.gclient.net import Connection +from nebula3.graph import GraphService tests_collected = set() diff --git a/tests/job/test_session.py b/tests/job/test_session.py index c08605fa919..5da0687c5bd 100644 --- a/tests/job/test_session.py +++ b/tests/job/test_session.py @@ -10,15 +10,15 @@ import pytest import concurrent -from nebula2.fbthrift.transport import TSocket -from nebula2.fbthrift.transport import TTransport -from nebula2.fbthrift.protocol import TBinaryProtocol +from nebula3.fbthrift.transport import TSocket +from nebula3.fbthrift.transport import TTransport +from nebula3.fbthrift.protocol import TBinaryProtocol -from nebula2.gclient.net import Connection -from nebula2.graph import GraphService -from nebula2.common import ttypes -from nebula2.data.ResultSet import ResultSet +from nebula3.gclient.net import Connection +from nebula3.graph import GraphService +from nebula3.common import ttypes +from nebula3.data.ResultSet import ResultSet from tests.common.nebula_test_suite import NebulaTestSuite class TestSession(NebulaTestSuite): diff --git a/tests/query/stateless/test_if_exists.py b/tests/query/stateless/test_if_exists.py index ffd075d25b6..1555f5cc0a1 100644 --- a/tests/query/stateless/test_if_exists.py +++ b/tests/query/stateless/test_if_exists.py @@ -9,7 +9,7 @@ import pytest import time -from nebula2.graph import ttypes +from nebula3.graph import ttypes from tests.common.nebula_test_suite import NebulaTestSuite diff --git a/tests/query/stateless/test_keyword.py b/tests/query/stateless/test_keyword.py index 0c970615f69..ec3ed0aac44 100644 --- a/tests/query/stateless/test_keyword.py +++ b/tests/query/stateless/test_keyword.py @@ -9,7 +9,7 @@ import pytest import time -from nebula2.graph import ttypes +from nebula3.graph import ttypes from tests.common.nebula_test_suite import NebulaTestSuite class TestReservedKeyword(NebulaTestSuite): diff --git a/tests/query/stateless/test_range.py b/tests/query/stateless/test_range.py index 60085e3b20a..73ee5490736 100644 --- a/tests/query/stateless/test_range.py +++ b/tests/query/stateless/test_range.py @@ -10,7 +10,7 @@ import pytest -from nebula2.common import ttypes +from nebula3.common import ttypes from tests.common.nebula_test_suite import NebulaTestSuite diff --git a/tests/tck/conftest.py b/tests/tck/conftest.py index f2abc3e57a1..4daaf78830c 100644 --- a/tests/tck/conftest.py +++ b/tests/tck/conftest.py @@ -12,9 +12,9 @@ import threading import json -from nebula2.common.ttypes import NList, NMap, Value, ErrorCode -from nebula2.data.DataObject import ValueWrapper -from nebula2.Exception import AuthFailedException +from nebula3.common.ttypes import NList, NMap, Value, ErrorCode +from nebula3.data.DataObject import ValueWrapper +from nebula3.Exception import AuthFailedException from pytest_bdd import given, parsers, then, when from tests.common.dataset_printer import DataSetPrinter @@ -37,8 +37,8 @@ from tests.tck.utils.table import dataset, table from tests.tck.utils.nbv import murmurhash2 -from nebula2.graph.ttypes import VerifyClientVersionReq -from nebula2.graph.ttypes import VerifyClientVersionResp +from nebula3.graph.ttypes import VerifyClientVersionReq +from nebula3.graph.ttypes import VerifyClientVersionResp parse = functools.partial(parsers.parse) rparse = functools.partial(parsers.re) diff --git a/tests/tck/steps/conftest.py b/tests/tck/steps/conftest.py index 16fca69f933..8122776bed3 100644 --- a/tests/tck/steps/conftest.py +++ b/tests/tck/steps/conftest.py @@ -8,7 +8,7 @@ then, ) -from nebula2.common.ttypes import Value, NullType +from nebula3.common.ttypes import Value, NullType from tests.tck.utils.nbv import register_function, parse # You could register functions that can be invoked from the parsing text diff --git a/tests/tck/utils/nbv.py b/tests/tck/utils/nbv.py index 75fbbbf4e45..ed694a0ee1f 100644 --- a/tests/tck/utils/nbv.py +++ b/tests/tck/utils/nbv.py @@ -12,7 +12,7 @@ else: from tests.tck.utils.mmh2 import mmh2 -from nebula2.common.ttypes import ( +from nebula3.common.ttypes import ( Value, NullType, NMap, diff --git a/tests/tck/utils/table.py b/tests/tck/utils/table.py index 3a8e0d1d2b7..7505c2a30ff 100644 --- a/tests/tck/utils/table.py +++ b/tests/tck/utils/table.py @@ -7,7 +7,7 @@ import re from tests.tck.utils.nbv import parse -from nebula2.common.ttypes import DataSet, Row, Value +from nebula3.common.ttypes import DataSet, Row, Value pattern = re.compile(r"^<\[(\w+)\]>$")