diff --git a/.gitignore b/.gitignore index d0ef8f27..b3f86bdf 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ hosts_*.json # TODO figure out how to properly solve the issue with these target directories showing up networking/target/ networking/topology/target/ + +build/ diff --git a/justfile b/justfile index 209cb5e5..a327859d 100644 --- a/justfile +++ b/justfile @@ -32,4 +32,15 @@ protobufs: just regenerate-protobufs build: regenerate-protobufs - uv build --all-packages \ No newline at end of file + uv build --all-packages + +# Build the Go forwarder binary +build-forwarder: + cd networking/forwarder && go build -buildvcs=false -o ../../build/forwarder . + +# Run forwarder tests +test-forwarder: + cd networking/forwarder && go test ./src/... + +# Build all components (Python packages and Go forwarder) +build-all: build build-forwarder \ No newline at end of file diff --git a/master/env.py b/master/env.py index 284bf585..a63914c2 100644 --- a/master/env.py +++ b/master/env.py @@ -5,4 +5,5 @@ from shared.env import BaseEnv class MasterEnvironmentSchema(BaseEnv): # Master-specific: forwarder configuration - FORWARDER_BINARY_PATH: Path | None = None + # Default to build/forwarder if not explicitly set + FORWARDER_BINARY_PATH: Path = Path("build/forwarder") diff --git a/test_shard_serialization.py b/test_shard_serialization.py deleted file mode 100644 index 0519ecba..00000000 --- a/test_shard_serialization.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/throwaway_tests/segfault_multiprocess.py b/throwaway_tests/segfault_multiprocess.py deleted file mode 100644 index 28c835f6..00000000 --- a/throwaway_tests/segfault_multiprocess.py +++ /dev/null @@ -1,31 +0,0 @@ -import ctypes; -from multiprocessing import Process - -def trigger_segfault(): - ctypes.string_at(0) - -def subprocess_main(id: int): - print(f"SUBPROCESS {id}: PROCESS START") - trigger_segfault() - print(f"SUBPROCESS {id}: PROCESS END") - -def main(): - """This code tests that a master process is not brought down by - segfaults that occur in the child processes - """ - - print("MASTER: PROCESS START") - procs: list[Process] = [] - for i in range(0, 10): - p = Process(target=subprocess_main, args=(i,)) - procs.append(p) - p.start() - - print("MASTER: JOINING SUBPROCESSES") - for p in procs: - p.join() - - print("MASTER: PROCESS END") - -if __name__ == "__main__": - main() \ No newline at end of file