From f92097049450af8ee6d2c559d6003d9dac165a6d Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Wed, 13 Mar 2024 13:48:03 +0800 Subject: [PATCH] refactor(risedev): deprecate building dashboard locally --- Makefile.toml | 42 ------------------- ci/scripts/standalone-utils.sh | 6 +-- src/cmd_all/scripts/standalone-demo-full.sh | 5 +-- src/risedevtool/common.toml | 1 - src/risedevtool/config/src/main.rs | 8 ---- src/risedevtool/src/task/meta_node_service.rs | 3 -- 6 files changed, 4 insertions(+), 61 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index ed39ea0fc9425..f60b624f19c0b 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -352,46 +352,6 @@ alias = "build-risingwave" [tasks.build] alias = "build-risingwave" -[tasks.extract-dashboard-artifact] -private = true -category = "RiseDev - Build" -description = "Extract dashboard artifact" -condition = { env_not_set = ["ENABLE_BUILD_DASHBOARD"] } -script = ''' -#!/usr/bin/env bash - -# we allow this script to fail - -echo "Extracting dashboard artifacts to ${PREFIX_UI}" - -rm -rf "${PREFIX_UI}" -git worktree prune -git worktree add "${PREFIX_UI}" origin/dashboard-artifact -''' - -[tasks.export-dashboard] -private = true -category = "RiseDev - Build" -description = "Build dashboard" -condition = { env_set = [ - "ENABLE_BUILD_DASHBOARD", -], files_modified = { input = [ - "./dashboard/**/*.js", - "./dashboard/**/*.ts*", - "./dashboard/package.json", - "./dashboard/next.config.js", -], output = [ - "./dashboard/out/**/*.html", -] } } -script = """ -#!/usr/bin/env bash -set -e - -rm -rf "${PREFIX_UI}" -cd dashboard && npm run build-static -cd .. && ln -s "$(pwd)/dashboard/out" "${PREFIX_UI}" -""" - [tasks.build-risingwave] category = "RiseDev - Build" description = "Build Rust components" @@ -548,8 +508,6 @@ dependencies = [ "build-risingwave", "build-connector-node", "post-build-risingwave", - "extract-dashboard-artifact", - "export-dashboard", "prepare-config", ] diff --git a/ci/scripts/standalone-utils.sh b/ci/scripts/standalone-utils.sh index 438f413ebe4dc..630d99f9bb9bd 100755 --- a/ci/scripts/standalone-utils.sh +++ b/ci/scripts/standalone-utils.sh @@ -20,8 +20,7 @@ start_standalone_without_compactor() { --backend etcd \ --etcd-endpoints 127.0.0.1:2388 \ --state-store hummock+minio://hummockadmin:hummockadmin@127.0.0.1:9301/hummock001 \ - --data-directory hummock_001 \ - --dashboard-ui-path $RW_PREFIX/ui" \ + --data-directory hummock_001" \ --compute-opts=" \ --listen-addr 127.0.0.1:5688 \ --prometheus-listener-addr 127.0.0.1:1222 \ @@ -55,8 +54,7 @@ start_standalone() { --backend etcd \ --etcd-endpoints 127.0.0.1:2388 \ --state-store hummock+minio://hummockadmin:hummockadmin@127.0.0.1:9301/hummock001 \ - --data-directory hummock_001 \ - --dashboard-ui-path $RW_PREFIX/ui" \ + --data-directory hummock_001" \ --compute-opts=" \ --listen-addr 127.0.0.1:5688 \ --prometheus-listener-addr 127.0.0.1:1222 \ diff --git a/src/cmd_all/scripts/standalone-demo-full.sh b/src/cmd_all/scripts/standalone-demo-full.sh index 46ca69b982593..28135e7453669 100755 --- a/src/cmd_all/scripts/standalone-demo-full.sh +++ b/src/cmd_all/scripts/standalone-demo-full.sh @@ -22,8 +22,7 @@ start_standalone() { --etcd-endpoints 127.0.0.1:2388 \ --state-store hummock+minio://hummockadmin:hummockadmin@127.0.0.1:9301/hummock001 \ --data-directory hummock_001 \ - --config-path src/config/standalone-example.toml \ - --dashboard-ui-path $RW_PREFIX/ui" \ + --config-path src/config/standalone-example.toml" \ --compute-opts=" \ --config-path src/config/standalone-example.toml \ --listen-addr 127.0.0.1:5688 \ @@ -49,4 +48,4 @@ start_standalone() { --meta-address http://127.0.0.1:5690" } -start_standalone \ No newline at end of file +start_standalone diff --git a/src/risedevtool/common.toml b/src/risedevtool/common.toml index 9e0b30ae7e561..97ddcd0485f9d 100644 --- a/src/risedevtool/common.toml +++ b/src/risedevtool/common.toml @@ -14,7 +14,6 @@ PREFIX_CONFIG = "${PREFIX}/config" PREFIX_DATA = "${PREFIX}/data" PREFIX_LOG = "${PREFIX}/log" PREFIX_TMP = "${PREFIX}/tmp" -PREFIX_UI = "${PREFIX}/ui" PREFIX_DOCKER = "${PREFIX}/rw-docker" PREFIX_PROFILING = "${PREFIX}/profiling" diff --git a/src/risedevtool/config/src/main.rs b/src/risedevtool/config/src/main.rs index e8874456bb50b..b34c6a5bd4e5d 100644 --- a/src/risedevtool/config/src/main.rs +++ b/src/risedevtool/config/src/main.rs @@ -68,7 +68,6 @@ pub enum Components { Tracing, RustComponents, BuildConnectorNode, - Dashboard, Release, Sanitizer, DynamicLinking, @@ -88,7 +87,6 @@ impl Components { Self::Redis => "[Component] Redis", Self::BuildConnectorNode => "[Build] Build RisingWave Connector (Java)", Self::RustComponents => "[Build] Rust components", - Self::Dashboard => "[Build] Dashboard", Self::Tracing => "[Component] Tracing: Grafana Tempo", Self::Release => "[Build] Enable release mode", Self::Sanitizer => "[Build] Enable sanitizer", @@ -133,10 +131,6 @@ Required if you want to create source from Emulated Google Pub/sub. Required if you want to build compute-node and meta-node. Otherwise you will need to manually download and copy it to RiseDev directory." - } - Self::Dashboard => { - " -Required if you want to build dashboard from source." } Self::Tracing => { " @@ -200,7 +194,6 @@ As a result, RisingWave will dump the core on panics. "ENABLE_KAFKA" => Some(Self::Kafka), "ENABLE_PUBSUB" => Some(Self::Pubsub), "ENABLE_BUILD_RUST" => Some(Self::RustComponents), - "ENABLE_BUILD_DASHBOARD" => Some(Self::Dashboard), "ENABLE_COMPUTE_TRACING" => Some(Self::Tracing), "ENABLE_RELEASE_PROFILE" => Some(Self::Release), "ENABLE_DYNAMIC_LINKING" => Some(Self::DynamicLinking), @@ -222,7 +215,6 @@ As a result, RisingWave will dump the core on panics. Self::Pubsub => "ENABLE_PUBSUB", Self::Redis => "ENABLE_REDIS", Self::RustComponents => "ENABLE_BUILD_RUST", - Self::Dashboard => "ENABLE_BUILD_DASHBOARD", Self::Tracing => "ENABLE_COMPUTE_TRACING", Self::Release => "ENABLE_RELEASE_PROFILE", Self::Sanitizer => "ENABLE_SANITIZER", diff --git a/src/risedevtool/src/task/meta_node_service.rs b/src/risedevtool/src/task/meta_node_service.rs index d88580618763a..91288538303a0 100644 --- a/src/risedevtool/src/task/meta_node_service.rs +++ b/src/risedevtool/src/task/meta_node_service.rs @@ -196,9 +196,6 @@ impl Task for MetaNodeService { cmd.arg("--config-path") .arg(Path::new(&prefix_config).join("risingwave.toml")); - cmd.arg("--dashboard-ui-path") - .arg(env::var("PREFIX_UI").unwrap_or_else(|_| ".risingwave/ui".to_owned())); - if !self.config.user_managed { ctx.run_command(ctx.tmux_run(cmd)?)?; ctx.pb.set_message("started");