Skip to content

Commit

Permalink
refactor(risedev): deprecate building dashboard locally
Browse files Browse the repository at this point in the history
  • Loading branch information
BugenZhao committed Mar 13, 2024
1 parent 66eaab3 commit f920970
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 61 deletions.
42 changes: 0 additions & 42 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -548,8 +508,6 @@ dependencies = [
"build-risingwave",
"build-connector-node",
"post-build-risingwave",
"extract-dashboard-artifact",
"export-dashboard",
"prepare-config",
]

Expand Down
6 changes: 2 additions & 4 deletions ci/scripts/standalone-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ start_standalone_without_compactor() {
--backend etcd \
--etcd-endpoints 127.0.0.1:2388 \
--state-store hummock+minio://hummockadmin:[email protected]: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 \
Expand Down Expand Up @@ -55,8 +54,7 @@ start_standalone() {
--backend etcd \
--etcd-endpoints 127.0.0.1:2388 \
--state-store hummock+minio://hummockadmin:[email protected]: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 \
Expand Down
5 changes: 2 additions & 3 deletions src/cmd_all/scripts/standalone-demo-full.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ start_standalone() {
--etcd-endpoints 127.0.0.1:2388 \
--state-store hummock+minio://hummockadmin:[email protected]: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 \
Expand All @@ -49,4 +48,4 @@ start_standalone() {
--meta-address http://127.0.0.1:5690"
}

start_standalone
start_standalone
1 change: 0 additions & 1 deletion src/risedevtool/common.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 0 additions & 8 deletions src/risedevtool/config/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ pub enum Components {
Tracing,
RustComponents,
BuildConnectorNode,
Dashboard,
Release,
Sanitizer,
DynamicLinking,
Expand All @@ -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",
Expand Down Expand Up @@ -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 => {
"
Expand Down Expand Up @@ -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),
Expand All @@ -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",
Expand Down
3 changes: 0 additions & 3 deletions src/risedevtool/src/task/meta_node_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit f920970

Please sign in to comment.