Skip to content

Commit

Permalink
Update white list default value.
Browse files Browse the repository at this point in the history
  • Loading branch information
CPWstatic committed Sep 28, 2021
1 parent 4101caf commit f6fc10d
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/graph/context/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ SET(CONTEXT_TEST_LIBS
$<TARGET_OBJECTS:planner_obj>
$<TARGET_OBJECTS:idgenerator_obj>
$<TARGET_OBJECTS:ssl_obj>
$<TARGET_OBJECTS:version_obj>
)

nebula_add_test(
Expand Down
1 change: 1 addition & 0 deletions src/graph/executor/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ SET(EXEC_QUERY_TEST_OBJS
$<TARGET_OBJECTS:expr_visitor_obj>
$<TARGET_OBJECTS:graph_obj>
$<TARGET_OBJECTS:ssl_obj>
$<TARGET_OBJECTS:version_obj>
)

SET(EXEC_QUERY_TEST_LIBS
Expand Down
1 change: 1 addition & 0 deletions src/graph/optimizer/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ set(OPTIMIZER_TEST_LIB
$<TARGET_OBJECTS:validator_obj>
$<TARGET_OBJECTS:optimizer_obj>
$<TARGET_OBJECTS:ssl_obj>
$<TARGET_OBJECTS:version_obj>
)

nebula_add_test(
Expand Down
1 change: 1 addition & 0 deletions src/graph/planner/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ nebula_add_test(
$<TARGET_OBJECTS:util_obj>
$<TARGET_OBJECTS:idgenerator_obj>
$<TARGET_OBJECTS:graph_context_obj>
$<TARGET_OBJECTS:version_obj>
LIBRARIES
gtest
${PROXYGEN_LIBRARIES}
Expand Down
4 changes: 3 additions & 1 deletion src/graph/service/GraphFlags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include "graph/service/GraphFlags.h"

#include "version/Version.h"

DEFINE_int32(port, 3699, "Nebula Graph daemon's listen port");
DEFINE_int32(client_idle_timeout_secs,
0,
Expand Down Expand Up @@ -68,5 +70,5 @@ DEFINE_bool(enable_experimental_feature, false, "Whether to enable experimental

DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list.");
DEFINE_string(client_white_list,
"2.5.0:2.5.1",
nebula::getOriginVersion() + ":2.5.0:2.5.1",
"A white list for diffrent client versions, seperate with colon.");
1 change: 1 addition & 0 deletions src/graph/util/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ nebula_add_test(
$<TARGET_OBJECTS:parser_obj>
$<TARGET_OBJECTS:graph_context_obj>
$<TARGET_OBJECTS:validator_obj>
$<TARGET_OBJECTS:version_obj>
LIBRARIES
gtest
gtest_main
Expand Down
4 changes: 3 additions & 1 deletion src/meta/processors/admin/VerifyClientVersionProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

#include "meta/processors/admin/VerifyClientVersionProcessor.h"

#include "version/Version.h"

DEFINE_bool(enable_client_white_list, true, "Turn on/off the client white list.");
DEFINE_string(client_white_list,
"2.5.0:2.5.1",
nebula::getOriginVersion() + ":2.5.0:2.5.1",
"A white list for diffrent client versions, seperate with colon.");

namespace nebula {
Expand Down
1 change: 1 addition & 0 deletions src/parser/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ set(PARSER_TEST_LIBS
$<TARGET_OBJECTS:idgenerator_obj>
$<TARGET_OBJECTS:graph_obj>
$<TARGET_OBJECTS:ssl_obj>
$<TARGET_OBJECTS:version_obj>
)

nebula_add_test(
Expand Down
7 changes: 7 additions & 0 deletions src/version/Version.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,11 @@ std::string versionString(bool verbose) {
return version;
}

std::string getOriginVersion() {
#if defined(NEBULA_BUILD_VERSION)
return NEBULA_BUILD_VERSION;
#else
return "";
#endif
}
} // namespace nebula
1 change: 1 addition & 0 deletions src/version/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace nebula {

std::string gitInfoSha();
std::string versionString(bool verbose = true);
std::string getOriginVersion();

} // namespace nebula

Expand Down

0 comments on commit f6fc10d

Please sign in to comment.