This commit is contained in:
parent
9a072ff74d
commit
d812bb51e2
5 changed files with 19 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -17,6 +17,7 @@ generated_number
|
|||
target
|
||||
logs/databuild/
|
||||
**/logs/databuild/
|
||||
**/.databuild
|
||||
|
||||
# DSL generated code
|
||||
**/generated/
|
||||
|
|
|
|||
|
|
@ -200,8 +200,8 @@ fn cmd_status(config_path: &str) {
|
|||
println!("━━━━━━━━━━━━━━━━━━━━━━━━");
|
||||
println!("Graph: {}", config.graph_label);
|
||||
println!("Status: {}", if healthy { "Running" } else if running { "Unhealthy" } else { "Stopped" });
|
||||
println!("URL: http://127.0.0.1:{}", state.port);
|
||||
println!("PID: {}", state.pid);
|
||||
println!("Port: {}", state.port);
|
||||
println!("Database: {}", config.effective_bel_uri());
|
||||
if config_changed {
|
||||
println!();
|
||||
|
|
|
|||
1
scripts/databuild
Symbolic link
1
scripts/databuild
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../bazel-bin/databuild/databuild
|
||||
|
|
@ -3,9 +3,11 @@ set -euo pipefail
|
|||
|
||||
# Navigate to repository root
|
||||
cd "$(dirname "$0")/.."
|
||||
REPO_ROOT="$(pwd)"
|
||||
|
||||
CONFIG="examples/multihop/config.json"
|
||||
EXAMPLE_DIR="$REPO_ROOT/examples/multihop"
|
||||
FLAG_FILE="/tmp/databuild_multihop_alpha_complete"
|
||||
CLI="$REPO_ROOT/bazel-bin/databuild/databuild"
|
||||
|
||||
echo "=== DataBuild Multi-Hop Example ==="
|
||||
echo
|
||||
|
|
@ -13,8 +15,8 @@ echo
|
|||
# Clean up previous state
|
||||
echo "Cleaning up previous state..."
|
||||
rm -f "$FLAG_FILE"
|
||||
rm -rf .databuild/multihop/
|
||||
./bazel-bin/databuild/databuild --config "$CONFIG" stop 2>/dev/null || true
|
||||
rm -rf "$EXAMPLE_DIR/.databuild/"
|
||||
(cd "$EXAMPLE_DIR" && "$CLI" stop 2>/dev/null || true)
|
||||
|
||||
# Build the binary
|
||||
echo "Building databuild CLI..."
|
||||
|
|
@ -25,34 +27,36 @@ echo "=== Starting server ==="
|
|||
echo
|
||||
|
||||
# Start the server by making a request (triggers auto-start)
|
||||
OUTPUT=$(./bazel-bin/databuild/databuild --config "$CONFIG" wants list 2>&1)
|
||||
cd "$EXAMPLE_DIR"
|
||||
OUTPUT=$("$CLI" wants list 2>&1)
|
||||
|
||||
# Extract port from status
|
||||
PORT=$(./bazel-bin/databuild/databuild --config "$CONFIG" status 2>&1 | grep "Port:" | awk '{print $2}')
|
||||
PORT=$("$CLI" status 2>&1 | grep "Port:" | awk '{print $2}')
|
||||
|
||||
echo
|
||||
echo "Server running at: http://127.0.0.1:${PORT}"
|
||||
echo
|
||||
echo "=== Ready to run example ==="
|
||||
echo
|
||||
echo "Try the following commands:"
|
||||
echo "From the examples/multihop directory, try the following commands:"
|
||||
echo "(The CLI uses databuild.json by default)"
|
||||
echo
|
||||
echo " # Check server status"
|
||||
echo " ./bazel-bin/databuild/databuild --config $CONFIG status"
|
||||
echo " databuild status"
|
||||
echo
|
||||
echo " # Create a want for data/beta (triggers dependency chain)"
|
||||
echo " ./bazel-bin/databuild/databuild --config $CONFIG want data/beta"
|
||||
echo " databuild want data/beta"
|
||||
echo
|
||||
echo " # Monitor wants"
|
||||
echo " ./bazel-bin/databuild/databuild --config $CONFIG wants list"
|
||||
echo " databuild wants list"
|
||||
echo
|
||||
echo " # Monitor job runs"
|
||||
echo " ./bazel-bin/databuild/databuild --config $CONFIG job-runs list"
|
||||
echo " databuild job-runs list"
|
||||
echo
|
||||
echo " # Monitor partitions"
|
||||
echo " ./bazel-bin/databuild/databuild --config $CONFIG partitions list"
|
||||
echo " databuild partitions list"
|
||||
echo
|
||||
echo " # Stop the server when done"
|
||||
echo " ./bazel-bin/databuild/databuild --config $CONFIG stop"
|
||||
echo " databuild stop"
|
||||
echo
|
||||
echo "==========================================="
|
||||
|
|
|
|||
Loading…
Reference in a new issue