Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: deprecate non all-in-one binary #15356

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 3 additions & 37 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ env_scripts = [
set_env ENABLE_TELEMETRY "false"

is_sanitizer_enabled = get_env ENABLE_SANITIZER
is_all_in_one_enabled = get_env ENABLE_ALL_IN_ONE
is_hdfs_backend = get_env ENABLE_HDFS
is_release = get_env ENABLE_RELEASE_PROFILE
is_not_release = not ${is_release}
Expand All @@ -46,13 +45,8 @@ else
set_env RISEDEV_BUILD_TARGET_DIR ""
end

if ${is_all_in_one_enabled}
set_env RISEDEV_CARGO_BUILD_CRATE "risingwave_cmd_all"
set_env RISEDEV_CTL_RUN_CMD "-- risectl"
else
set_env RISEDEV_CARGO_BUILD_CRATE "risingwave_cmd"
set_env RISEDEV_CTL_RUN_CMD "--bin risectl --"
end
set_env RISEDEV_CARGO_BUILD_CRATE "risingwave_cmd_all"
set_env RISEDEV_CTL_RUN_CMD "-- risectl"
Comment on lines +48 to +49
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can inline these variables.


if ${is_hdfs_backend}
set_env BUILD_HDFS_BACKEND_CMD "-p risingwave_object_store --features hdfs-backend"
Expand Down Expand Up @@ -268,31 +262,10 @@ set -e
python -mwebbrowser file://$(pwd)/target/doc/index.html
'''

[tasks.link-standalone-binaries]
private = true
category = "RiseDev - Build"
description = "Link standalone cmds to RiseDev bin"
condition = { env_not_set = ["ENABLE_ALL_IN_ONE"] }
script = '''
#!/usr/bin/env bash
set -e
rm -f "${PREFIX_BIN}/compute-node"
rm -f "${PREFIX_BIN}/meta-node"
rm -f "${PREFIX_BIN}/frontend"
rm -f "${PREFIX_BIN}/compactor"
rm -f "${PREFIX_BIN}/risectl"
ln -s "$(pwd)/target/${RISEDEV_BUILD_TARGET_DIR}${BUILD_MODE_DIR}/compute-node" "${PREFIX_BIN}/compute-node"
ln -s "$(pwd)/target/${RISEDEV_BUILD_TARGET_DIR}${BUILD_MODE_DIR}/meta-node" "${PREFIX_BIN}/meta-node"
ln -s "$(pwd)/target/${RISEDEV_BUILD_TARGET_DIR}${BUILD_MODE_DIR}/frontend" "${PREFIX_BIN}/frontend"
ln -s "$(pwd)/target/${RISEDEV_BUILD_TARGET_DIR}${BUILD_MODE_DIR}/compactor" "${PREFIX_BIN}/compactor"
ln -s "$(pwd)/target/${RISEDEV_BUILD_TARGET_DIR}${BUILD_MODE_DIR}/risectl" "${PREFIX_BIN}/risectl"
'''

[tasks.link-all-in-one-binaries]
private = true
category = "RiseDev - Build"
description = "Link all-in-one cmds to RiseDev bin"
condition = { env_set = ["ENABLE_ALL_IN_ONE"] }
script = '''
#!/usr/bin/env bash
set -e
Expand Down Expand Up @@ -339,13 +312,7 @@ script = '''
#!/usr/bin/env bash
set -e

binaries=()

if [[ "$ENABLE_ALL_IN_ONE" == "true" ]]; then
binaries=("risingwave")
else
binaries=("meta-node" "compute-node" "frontend" "compactor")
fi
binaries=("risingwave")

set -ex
echo -n "${binaries[*]}" | parallel -d ' ' \
Expand All @@ -356,7 +323,6 @@ echo -n "${binaries[*]}" | parallel -d ' ' \
private = true
category = "RiseDev - Build"
description = "Link all binaries to .bin"
condition = { env_set = ["ENABLE_ALL_IN_ONE"] }
script = '''
#!/usr/bin/env bash
set -e
Expand Down
3 changes: 0 additions & 3 deletions backwards-compat-tests/scripts/run_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ ENABLE_KAFKA=true
# Fetch risingwave binary from release.
ENABLE_BUILD_RUST=true

# Ensure it will link the all-in-one binary from our release.
ENABLE_ALL_IN_ONE=true

# ENABLE_RELEASE_PROFILE=true
EOF
}
Expand Down
1 change: 0 additions & 1 deletion ci/risedev-components.ci.benchmark.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
RISEDEV_CONFIGURED=true
ENABLE_MINIO=true
ENABLE_ETCD=true
ENABLE_ALL_IN_ONE=true
ENABLE_KAFKA=true
ENABLE_BUILD_RUST=true
ENABLE_RELEASE_PROFILE=true
Expand Down
1 change: 0 additions & 1 deletion ci/risedev-components.ci.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
RISEDEV_CONFIGURED=true
ENABLE_MINIO=true
ENABLE_ETCD=true
ENABLE_ALL_IN_ONE=true
1 change: 0 additions & 1 deletion ci/risedev-components.ci.source.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
RISEDEV_CONFIGURED=true
ENABLE_MINIO=true
ENABLE_ETCD=true
ENABLE_ALL_IN_ONE=true
ENABLE_KAFKA=true
ENABLE_PUBSUB=true
6 changes: 0 additions & 6 deletions ci/scripts/backwards-compat-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ ENABLE_KAFKA=true
# Fetch risingwave binary from release.
ENABLE_BUILD_RUST=false

# Ensure it will link the all-in-one binary from our release.
ENABLE_ALL_IN_ONE=true

# Use target/debug for simplicity.
ENABLE_RELEASE_PROFILE=false
EOF
Expand Down Expand Up @@ -94,9 +91,6 @@ ENABLE_KAFKA=true
# Make sure that it builds
ENABLE_BUILD_RUST=true

# Ensure it will link the all-in-one binary from our release.
ENABLE_ALL_IN_ONE=true

# Use target/debug for simplicity.
ENABLE_RELEASE_PROFILE=false
EOF
Expand Down
1 change: 0 additions & 1 deletion ci/scripts/gen-flamegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ ENABLE_KAFKA=true
ENABLE_COMPUTE_TRACING=true
ENABLE_BUILD_RUST=true
ENABLE_RELEASE_PROFILE=true
ENABLE_ALL_IN_ONE=true
EOF
popd
}
Expand Down
20 changes: 0 additions & 20 deletions src/cmd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,6 @@ task_stats_alloc = { path = "../utils/task_stats_alloc" }
[lib]
test = false

[[bin]]
name = "frontend"
path = "src/bin/frontend_node.rs"
test = false

[[bin]]
name = "meta-node"
path = "src/bin/meta_node.rs"
test = false

[[bin]]
name = "compute-node"
path = "src/bin/compute_node.rs"
test = false

[[bin]]
name = "compactor"
path = "src/bin/compactor.rs"
test = false

[[bin]]
name = "risectl"
path = "src/bin/ctl.rs"
Expand Down
17 changes: 0 additions & 17 deletions src/cmd/src/bin/compactor.rs

This file was deleted.

17 changes: 0 additions & 17 deletions src/cmd/src/bin/compute_node.rs

This file was deleted.

17 changes: 0 additions & 17 deletions src/cmd/src/bin/frontend_node.rs

This file was deleted.

17 changes: 0 additions & 17 deletions src/cmd/src/bin/meta_node.rs

This file was deleted.

10 changes: 0 additions & 10 deletions src/risedevtool/config/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ pub enum Components {
BuildConnectorNode,
Dashboard,
Release,
AllInOne,
Sanitizer,
DynamicLinking,
HummockTrace,
Expand All @@ -92,7 +91,6 @@ impl Components {
Self::Dashboard => "[Build] Dashboard",
Self::Tracing => "[Component] Tracing: Grafana Tempo",
Self::Release => "[Build] Enable release mode",
Self::AllInOne => "[Build] Enable all-in-one binary",
Self::Sanitizer => "[Build] Enable sanitizer",
Self::DynamicLinking => "[Build] Enable dynamic linking",
Self::HummockTrace => "[Build] Hummock Trace",
Expand Down Expand Up @@ -148,12 +146,6 @@ you download Grafana Tempo."
Self::Release => {
"
Build RisingWave in release mode"
}
Self::AllInOne => {
"
With this option enabled, RiseDev will help you create
symlinks to `risingwave` all-in-one binary, so as to build
and use `risingwave` in all-in-one mode."
}
Self::Sanitizer => {
"
Expand Down Expand Up @@ -212,7 +204,6 @@ As a result, RisingWave will dump the core on panics.
"ENABLE_COMPUTE_TRACING" => Some(Self::Tracing),
"ENABLE_RELEASE_PROFILE" => Some(Self::Release),
"ENABLE_DYNAMIC_LINKING" => Some(Self::DynamicLinking),
"ENABLE_ALL_IN_ONE" => Some(Self::AllInOne),
"ENABLE_SANITIZER" => Some(Self::Sanitizer),
"ENABLE_REDIS" => Some(Self::Redis),
"ENABLE_BUILD_RW_CONNECTOR" => Some(Self::BuildConnectorNode),
Expand All @@ -234,7 +225,6 @@ As a result, RisingWave will dump the core on panics.
Self::Dashboard => "ENABLE_BUILD_DASHBOARD",
Self::Tracing => "ENABLE_COMPUTE_TRACING",
Self::Release => "ENABLE_RELEASE_PROFILE",
Self::AllInOne => "ENABLE_ALL_IN_ONE",
Self::Sanitizer => "ENABLE_SANITIZER",
Self::BuildConnectorNode => "ENABLE_BUILD_RW_CONNECTOR",
Self::DynamicLinking => "ENABLE_DYNAMIC_LINKING",
Expand Down
12 changes: 3 additions & 9 deletions src/risedevtool/src/task/compactor_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,9 @@ impl CompactorService {
fn compactor(&self) -> Result<Command> {
let prefix_bin = env::var("PREFIX_BIN")?;

if let Ok(x) = env::var("ENABLE_ALL_IN_ONE")
&& x == "true"
{
Ok(Command::new(
Path::new(&prefix_bin).join("risingwave").join("compactor"),
))
} else {
Ok(Command::new(Path::new(&prefix_bin).join("compactor")))
}
Ok(Command::new(
Path::new(&prefix_bin).join("risingwave").join("compactor"),
))
}

/// Apply command args according to config
Expand Down
16 changes: 5 additions & 11 deletions src/risedevtool/src/task/compute_node_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,11 @@ impl ComputeNodeService {
fn compute_node(&self) -> Result<Command> {
let prefix_bin = env::var("PREFIX_BIN")?;

if let Ok(x) = env::var("ENABLE_ALL_IN_ONE")
&& x == "true"
{
Ok(Command::new(
Path::new(&prefix_bin)
.join("risingwave")
.join("compute-node"),
))
} else {
Ok(Command::new(Path::new(&prefix_bin).join("compute-node")))
}
Ok(Command::new(
Path::new(&prefix_bin)
.join("risingwave")
.join("compute-node"),
))
}

/// Apply command args according to config
Expand Down
16 changes: 5 additions & 11 deletions src/risedevtool/src/task/frontend_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,11 @@ impl FrontendService {
fn frontend(&self) -> Result<Command> {
let prefix_bin = env::var("PREFIX_BIN")?;

if let Ok(x) = env::var("ENABLE_ALL_IN_ONE")
&& x == "true"
{
Ok(Command::new(
Path::new(&prefix_bin)
.join("risingwave")
.join("frontend-node"),
))
} else {
Ok(Command::new(Path::new(&prefix_bin).join("frontend")))
}
Ok(Command::new(
Path::new(&prefix_bin)
.join("risingwave")
.join("frontend-node"),
))
}

/// Apply command args according to config
Expand Down
12 changes: 3 additions & 9 deletions src/risedevtool/src/task/meta_node_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,9 @@ impl MetaNodeService {
fn meta_node(&self) -> Result<Command> {
let prefix_bin = env::var("PREFIX_BIN")?;

if let Ok(x) = env::var("ENABLE_ALL_IN_ONE")
&& x == "true"
{
Ok(Command::new(
Path::new(&prefix_bin).join("risingwave").join("meta-node"),
))
} else {
Ok(Command::new(Path::new(&prefix_bin).join("meta-node")))
}
Ok(Command::new(
Path::new(&prefix_bin).join("risingwave").join("meta-node"),
))
}

/// Apply command args according to config
Expand Down
Loading