Skip to content

Commit 8cdae25

Browse files
authored
Update contributing guide (#3236)
* fix: minor incoming taffic info log correction Signed-off-by: Yuan Lyu <[email protected]> * doc: contributing guide updates Signed-off-by: Yuan Lyu <[email protected]> --------- Signed-off-by: Yuan Lyu <[email protected]>
1 parent 712b224 commit 8cdae25

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

CONTRIBUTING.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Make sure to take a look at the project's [style guide](STYLE.md).
1313
- [Getting Started](#getting-started)
1414
- [Debugging mirrord](#debugging-mirrord)
1515
- [New Hook Guidelines](#new-hook-guidelines)
16-
- [Compiling on MacOs](#compliling-on-macos)
16+
- [Compiling on MacOs](#compiling-on-macos)
1717
- [Adding new target types](#adding-new-target-types)
1818
- [Testing the release workflow](#testing-the-release-workflow)
1919
- [Architecture](#architecture)
@@ -27,7 +27,7 @@ The following guide details the steps to setup a local development environment f
2727
- [GCC](https://gcc.gnu.org/) - only on Linux, GCC is needed for Go dynamic linking
2828
- [Rust](https://www.rust-lang.org/)
2929
- [NodeJS](https://nodejs.org/en/), [ExpressJS](https://expressjs.com/)
30-
- [Python](https://www.python.org/), [Flask](https://flask.palletsprojects.com/en/2.1.x/), [FastAPI](https://fastapi.tiangolo.com/)
30+
- [Python](https://www.python.org/), [Flask](https://flask.palletsprojects.com/en/2.1.x/), [FastAPI](https://fastapi.tiangolo.com/), [Uvicorn](https://www.uvicorn.org/)
3131
- [Go](https://go.dev/)
3232
- Kubernetes Cluster (local/remote)
3333

@@ -94,6 +94,12 @@ with the mirrord CLI. The mirrord CLI spawns an agent for the target on the clus
9494
layer injected into it. Some test apps need to be compiled before they can be used in the tests
9595
([this should be automated in the future](https://github.com/metalbear-co/mirrord/issues/982)).
9696

97+
> **Note:** `//go:build linux` prevents certain Go test apps from being built on macOS. When using
98+
> `scripts/build_go_apps.sh`, make the change below so the script continues building all other apps.
99+
> ```bash
100+
> go build -o "$1.go_test_app" || echo "Failed to build $directory/$1.go_test_app"
101+
> ```
102+
97103
The basic command to run the E2E tests is:
98104
```bash
99105
cargo test --package tests
@@ -407,12 +413,20 @@ RUST_LOG=debug target/debug/mirrord exec -i test -l debug -c --target pod/py-ser
407413
Server listening on port 80
408414
```
409415
410-
Send traffic to the Kubernetes Pod through the service
416+
Send traffic to the Kubernetes Pod through the service. On Linux, run the following command:
411417
412418
```bash
413419
curl $(minikube service py-serv --url)
414420
```
415421
422+
On macOS, run the command below and keep the terminal open.
423+
424+
```bash
425+
minikube service py-serv --url
426+
```
427+
428+
Open another terminal and send traffic with `curl` to the service URL displayed by `minikube`.
429+
416430
Check the traffic was received by the local process
417431
418432
```bash
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated contributing guidance.

mirrord/cli/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ fn print_config<P>(
461461
progress.info(&format!("fs: file operations will default to {}", fs_info));
462462

463463
let incoming_info = match config.feature.network.incoming.mode {
464-
IncomingMode::Mirror => "be mirrored",
465-
IncomingMode::Steal => "be stolen",
464+
IncomingMode::Mirror => "mirrored",
465+
IncomingMode::Steal => "stolen",
466466
IncomingMode::Off => "ignored",
467467
};
468468
progress.info(&format!(

0 commit comments

Comments
 (0)