diff --git a/.github/workflows/flex-interactive.yml b/.github/workflows/flex-interactive.yml index 379f5faf2780..2df123e7386a 100644 --- a/.github/workflows/flex-interactive.yml +++ b/.github/workflows/flex-interactive.yml @@ -52,11 +52,15 @@ jobs: if: false - name: Test gsctl + env: + CYPHER_PORT: 7688 + COORDINATOR_PORT: 8080 + COORDINATOR_ENDPOINT: "http://127.0.0.1:8080" run: | # install gsctl python3 -m pip install ${GITHUB_WORKSPACE}/python/dist/*.whl - # launch service: 8080 for coordinator http port; 7687 for cypher port; - gsctl instance deploy --type interactive --image-registry graphscope --image-tag latest --cypher-port 7688 --interactive-config ${GITHUB_WORKSPACE}/flex/tests/hqps/interactive_config_test.yaml + # launch service: ${COORDINATOR_PORT} for coordinator http port; ${CYPHER_PORT} for cypher port; + gsctl instance deploy --type interactive --image-registry graphscope --image-tag latest --cypher-port ${CYPHER_PORT} --coordinator-port ${COORDINATOR_PORT} --interactive-config ${GITHUB_WORKSPACE}/flex/tests/hqps/interactive_config_test.yaml sleep 20 # test python3 -m pip install --no-cache-dir pytest pytest-cov pytest-timeout pytest-xdist @@ -67,8 +71,8 @@ jobs: $(dirname $(python3 -c "import graphscope.gsctl as gsctl; print(gsctl.__file__)"))/tests/test_interactive.py # test coordinator - res=`curl http://127.0.0.1:8080/api/v1/service` - echo $res | grep 7688 || exit 1 + res=`curl http://127.0.0.1:${COORDINATOR_PORT}/api/v1/service` + echo $res | grep ${CYPHER_PORT} || exit 1 # destroy instance gsctl instance destroy --type interactive -y diff --git a/flex/CMakeLists.txt b/flex/CMakeLists.txt index c0385658cec2..050a944e1b31 100644 --- a/flex/CMakeLists.txt +++ b/flex/CMakeLists.txt @@ -16,6 +16,7 @@ option(BUILD_ODPS_FRAGMENT_LOADER "Whether to build odps fragment loader" OFF) option(USE_PTHASH "Whether to use pthash" OFF) option(OPTIMIZE_FOR_HOST "Whether to optimize on host" ON) # Whether to build optimized code on host option(USE_STATIC_ARROW "Whether to use static arrow" ON) # Whether to link arrow statically, default is ON +option(BUILD_WITH_OTEL "Whether to build with opentelemetry-cpp" OFF) # Whether to build with opentelemetry-cpp, default is OFF #print options message(STATUS "Build test: ${BUILD_TEST}") @@ -164,14 +165,16 @@ endif () find_package(Protobuf REQUIRED) include_directories(${Protobuf_INCLUDE_DIRS}) -find_package(opentelemetry-cpp CONFIG) -if (OPENTELEMETRY_CPP_FOUND) - message(STATUS "opentelemetry-cpp found") - find_package(CURL REQUIRED) - add_definitions(-DHAVE_OPENTELEMETRY_CPP) -else() - message(STATUS "opentelemetry-cpp not found, build without opentelemetry-cpp") -endif () +if (BUILD_WITH_OTEL) + find_package(opentelemetry-cpp CONFIG) + if (OPENTELEMETRY_CPP_FOUND) + message(STATUS "opentelemetry-cpp found") + find_package(CURL REQUIRED) + add_definitions(-DHAVE_OPENTELEMETRY_CPP) + else() + message(STATUS "opentelemetry-cpp not found, build without opentelemetry-cpp") + endif () +endif() # Find Doxygen if (BUILD_DOC) diff --git a/python/graphscope/gsctl/tests/test_interactive.py b/python/graphscope/gsctl/tests/test_interactive.py index 01132fa9c5cc..f828d409e3fa 100644 --- a/python/graphscope/gsctl/tests/test_interactive.py +++ b/python/graphscope/gsctl/tests/test_interactive.py @@ -16,6 +16,7 @@ # limitations under the License. # +import os import warnings # Disable warnings @@ -219,6 +220,8 @@ class ExampleQuery : public CypherReadAppBase { class TestE2EInteractive(object): def setup_class(self): + if "COORDINATOR_ENDPOINT" in os.environ: + COORDINATOR_ENDPOINT = os.environ["COORDINATOR_ENDPOINT"] self.deployment_info = connect_coordinator(COORDINATOR_ENDPOINT) def test_deployment_info(self):