diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 93edc0147b0..6f76ccba573 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -97,7 +97,7 @@ jobs: -DENABLE_COVERAGE=on \ -B build echo "::set-output name=j::10" - echo "::set-output name=t::10" + echo "::set-output name=t::7" ;; esac ;; diff --git a/cmake/CPackage.cmake b/cmake/CPackage.cmake index b26eda90e5a..36a9acbc149 100644 --- a/cmake/CPackage.cmake +++ b/cmake/CPackage.cmake @@ -129,10 +129,11 @@ macro(package to_one name home_page scripts_dir) set(HOST_SYSTEM_VER "Unknown") endif() - message(STATUS "HOST_SYSTEM_NAME is ${HOST_SYSTEM_NAME}") - message(STATUS "HOST_SYSTEM_VER is ${HOST_SYSTEM_VER}") - message(STATUS "CPACK_GENERATOR is ${CPACK_GENERATOR}") - message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR is ${CMAKE_HOST_SYSTEM_PROCESSOR}") + print_config(NEBULA_BUILD_VERSION) + print_config(HOST_SYSTEM_NAME) + print_config(HOST_SYSTEM_VER) + print_config(CPACK_GENERATOR) + print_config(CMAKE_HOST_SYSTEM_PROCESSOR) set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${HOST_SYSTEM_VER}.${CMAKE_HOST_SYSTEM_PROCESSOR}) if (${to_one}) diff --git a/src/clients/meta/MetaClient.cpp b/src/clients/meta/MetaClient.cpp index a3e46fc9c0d..d4766213d32 100644 --- a/src/clients/meta/MetaClient.cpp +++ b/src/clients/meta/MetaClient.cpp @@ -2335,9 +2335,7 @@ folly::Future> MetaClient::heartbeat() { req.set_host(options_.localHost_); req.set_role(options_.role_); req.set_git_info_sha(options_.gitInfoSHA_); -#if defined(NEBULA_BUILD_VERSION) - req.set_version(versionString(false)); -#endif + req.set_version(getOriginVersion()); if (options_.role_ == cpp2::HostRole::STORAGE) { if (options_.clusterId_.load() == 0) { options_.clusterId_ = FileBasedClusterIdMan::getClusterIdFromFile(FLAGS_cluster_id_path); diff --git a/src/meta/processors/parts/ListHostsProcessor.cpp b/src/meta/processors/parts/ListHostsProcessor.cpp index ff4c7547468..cea7e8b7d66 100644 --- a/src/meta/processors/parts/ListHostsProcessor.cpp +++ b/src/meta/processors/parts/ListHostsProcessor.cpp @@ -90,7 +90,7 @@ nebula::cpp2::ErrorCode ListHostsProcessor::allMetaHostsStatus() { item.set_role(cpp2::HostRole::META); item.set_git_info_sha(gitInfoSha()); item.set_status(cpp2::HostStatus::ONLINE); - item.set_version(versionString(false)); + item.set_version(getOriginVersion()); hostItems_.emplace_back(item); } return nebula::cpp2::ErrorCode::SUCCEEDED; @@ -111,13 +111,11 @@ nebula::cpp2::ErrorCode ListHostsProcessor::allHostsWithStatus(cpp2::HostRole ro return retCode; } - auto iter = nebula::value(ret).get(); auto now = time::WallClock::fastNowInMilliSec(); std::vector removeHostsKey; - while (iter->valid()) { + for (auto iter = nebula::value(ret).get(); iter->valid(); iter->next()) { HostInfo info = HostInfo::decode(iter->val()); if (info.role_ != role) { - iter->next(); continue; } @@ -143,7 +141,6 @@ nebula::cpp2::ErrorCode ListHostsProcessor::allHostsWithStatus(cpp2::HostRole ro } else { removeHostsKey.emplace_back(iter->key()); } - iter->next(); } removeExpiredHosts(std::move(removeHostsKey)); diff --git a/src/version/Version.cpp.in b/src/version/Version.cpp.in index f8675b605e0..c23cd34fc8e 100644 --- a/src/version/Version.cpp.in +++ b/src/version/Version.cpp.in @@ -15,10 +15,10 @@ namespace nebula { std::string gitInfoSha() { return "@GIT_INFO_SHA@"; } std::string versionString(bool verbose) { - std::string version; -#if defined(NEBULA_BUILD_VERSION) - version = folly::stringPrintf("%s, ", "@NEBULA_BUILD_VERSION@"); -#endif + std::string version = getOriginVersion(); + if (!version.empty()) { + version += ", "; + } if (verbose) { version += folly::sformat("Git: {}, ", gitInfoSha()); }