Skip to content

Commit

Permalink
Update client version to v3.0.0 (#3741)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Aiee authored and Sophie-Xie committed Jan 22, 2022
1 parent 8352799 commit c3946a6
Show file tree
Hide file tree
Showing 24 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion cmake/ThriftGenerate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion src/graph/service/GraphFlags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/graph/service/test/StandAloneTestGraphFlags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
4 changes: 2 additions & 2 deletions src/interface/common.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/interface/graph.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/interface/meta.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/interface/storage.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/meta/processors/admin/VerifyClientVersionProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/admin/test_permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import time

from nebula2.common import ttypes
from nebula3.common import ttypes
from tests.common.nebula_test_suite import NebulaTestSuite


Expand Down
2 changes: 1 addition & 1 deletion tests/common/comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/common/dataset_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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+'))

Expand Down
4 changes: 2 additions & 2 deletions tests/common/nebula_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}"

Expand Down
8 changes: 4 additions & 4 deletions tests/common/nebula_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/common/path_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions tests/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
14 changes: 7 additions & 7 deletions tests/job/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/query/stateless/test_if_exists.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/query/stateless/test_keyword.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/query/stateless/test_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import pytest

from nebula2.common import ttypes
from nebula3.common import ttypes

from tests.common.nebula_test_suite import NebulaTestSuite

Expand Down
10 changes: 5 additions & 5 deletions tests/tck/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/tck/steps/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/tck/utils/nbv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/tck/utils/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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+)\]>$")

Expand Down

0 comments on commit c3946a6

Please sign in to comment.