Skip to content

Commit

Permalink
fix(risedev): fill-in CONNECTOR_LIBS_PATH if set (#12928)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxa21 authored Oct 18, 2023
1 parent 52f4c63 commit 0908740
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/risedevtool/config/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,6 @@ fn main() -> Result<()> {
)?;
if chosen.contains(&component) {
writeln!(file, "{}=true", component.env())?;
if component == Components::BuildConnectorNode {
writeln!(
file,
"CONNECTOR_LIBS_PATH=.risingwave/bin/connector-node/libs/"
)?;
}
} else {
writeln!(file, "# {}=true", component.env())?;
}
Expand Down
8 changes: 8 additions & 0 deletions src/risedevtool/src/task/compute_node_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ impl Task for ComputeNodeService {
cmd.env("MALLOC_CONF", conf); // unprefixed for linux
}

if crate::util::is_env_set("ENABLE_BUILD_RW_CONNECTOR") {
let prefix_bin = env::var("PREFIX_BIN")?;
cmd.env(
"CONNECTOR_LIBS_PATH",
Path::new(&prefix_bin).join("connector-node/libs/"),
);
}

cmd.arg("--config-path")
.arg(Path::new(&prefix_config).join("risingwave.toml"));
Self::apply_command_args(&mut cmd, &self.config)?;
Expand Down
8 changes: 8 additions & 0 deletions src/risedevtool/src/task/meta_node_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ impl Task for MetaNodeService {
cmd.env("MALLOC_CONF", conf); // unprefixed for linux
}

if crate::util::is_env_set("ENABLE_BUILD_RW_CONNECTOR") {
let prefix_bin = env::var("PREFIX_BIN")?;
cmd.env(
"CONNECTOR_LIBS_PATH",
Path::new(&prefix_bin).join("connector-node/libs/"),
);
}

Self::apply_command_args(&mut cmd, &self.config, HummockInMemoryStrategy::Isolated)?;

let prefix_config = env::var("PREFIX_CONFIG")?;
Expand Down

0 comments on commit 0908740

Please sign in to comment.