diff --git a/.github/workflows/validate_go_quickstarts.yaml b/.github/workflows/validate_go_quickstarts.yaml index b79a0d052..8c9e5ce68 100644 --- a/.github/workflows/validate_go_quickstarts.yaml +++ b/.github/workflows/validate_go_quickstarts.yaml @@ -95,6 +95,19 @@ jobs: echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV pip3 install setuptools wheel pip3 install mechanical-markdown + - name: Checkout Dapr + uses: actions/checkout@v4 + with: + repository: dapr/dapr + ref: df7ece7b8b717b991b22e0e94556e3b16effd034 + path: './dapr-dapr' + - name: Build Dapr + run: | + cd ./dapr-dapr/ + make build + - name: Override dapr + run: | + cp ./dapr-dapr/dist/linux_amd64/release/daprd ~/.dapr/bin/daprd - name: Validate building blocks with GO run: | variants=("http" "sdk") @@ -102,13 +115,13 @@ jobs: for building_block in $building_blocks; do for variant in "${variants[@]}" do - if [ ! -d "$building_block/go/$variant" ]; + if [ ! -d "$building_block/go/$variant" ]; then echo "$building_block/go/$variant does not exist." else pushd $building_block/go/$variant echo "Validating $building_block/go/$variant quickstart" - make validate + make validate popd fi done diff --git a/jobs/go/http/README.md b/jobs/go/http/README.md index 30cab37f9..0c71fb989 100644 --- a/jobs/go/http/README.md +++ b/jobs/go/http/README.md @@ -28,7 +28,7 @@ expected_stdout_lines: expected_stderr_lines: output_match_mode: substring match_order: none -background: true +background: false sleep: 60 timeout_seconds: 120 --> @@ -61,8 +61,15 @@ After 30 seconds, the terminal output should present the `C-3PO` job being proce == APP - job-service == Executing maintenance job: Limb Calibration ``` + + 2. Stop and clean up application processes + + ```bash dapr stop -f . ``` @@ -149,4 +156,4 @@ Back at the `job-service` app terminal window, the output should be: ```text ERRO[0249] Error getting job c-3po due to: rpc error: code = Unknown desc = job not found: app||default||job-service||c-3po instance=diagrid.local scope=dapr.api type=log ver=1.14.0-rc.2 -``` \ No newline at end of file +``` diff --git a/jobs/go/sdk/README.md b/jobs/go/sdk/README.md index 682855a8d..0938ebd7e 100644 --- a/jobs/go/sdk/README.md +++ b/jobs/go/sdk/README.md @@ -18,16 +18,19 @@ This section shows how to run both applications at once using [multi-app run tem Open a new terminal window and run the multi app run template: - + name: Run multi app run template + expected_stdout_lines: + - '== APP - job-service == Starting droid: R2-D2' + - '== APP - job-service == Executing maintenance job: Oil Change' + - '== APP - job-service == Starting droid: C-3PO' + - '== APP - job-service == Executing maintenance job: Memory Wipe' + expected_stderr_lines: + output_match_mode: substring + match_order: none + background: false + sleep: 120 + timeout_seconds: 180 + --> ```bash dapr run -f . @@ -75,13 +78,19 @@ After 10 seconds, the terminal output should present the `C3-PO` job being proce == APP - job-service == Executing maintenance job: Memory Wipe ``` + + 2. Stop and clean up application processes + ```bash dapr stop -f . ``` - + ## Run the Jobs APIs individually diff --git a/jobs/go/sdk/dapr.yaml b/jobs/go/sdk/dapr.yaml index a826cb55b..4d0f47f98 100644 --- a/jobs/go/sdk/dapr.yaml +++ b/jobs/go/sdk/dapr.yaml @@ -1,4 +1,7 @@ version: 1 +common: + daprdLogDestination: console + logLevel: info apps: - appDirPath: ./job-service/ appID: job-service @@ -9,4 +12,4 @@ apps: - appDirPath: ./job-scheduler/ appID: job-scheduler appPort: 6500 - command: ["go", "run", "."] \ No newline at end of file + command: ["go", "run", "."] diff --git a/pub_sub/go/http/README.md b/pub_sub/go/http/README.md index b56b7f2d8..71294e024 100644 --- a/pub_sub/go/http/README.md +++ b/pub_sub/go/http/README.md @@ -26,7 +26,7 @@ expected_stdout_lines: expected_stderr_lines: output_match_mode: substring match_order: none -background: true +background: false sleep: 30 timeout_seconds: 60 --> @@ -59,9 +59,15 @@ The terminal console output should look similar to this: == APP - checkout-http == Published data: {"orderId":10} == APP - order-processor-http == Subscriber received: {"orderId":10} ``` + 2. Stop and clean up application processes + + ```bash dapr stop -f . ``` diff --git a/pub_sub/go/sdk/README.md b/pub_sub/go/sdk/README.md index 5e78c5c55..2d85e4fb6 100644 --- a/pub_sub/go/sdk/README.md +++ b/pub_sub/go/sdk/README.md @@ -26,7 +26,7 @@ expected_stdout_lines: expected_stderr_lines: output_match_mode: substring match_order: none -background: true +background: false sleep: 30 timeout_seconds: 60 --> @@ -59,8 +59,14 @@ The terminal console output should look similar to this: == APP - checkout-sdk == Published data: {"orderId":10} == APP - order-processor == Subscriber received: map[orderId:10] ``` + 2. Stop and clean up application processes + + ```bash dapr stop -f . diff --git a/service_invocation/go/http/README.md b/service_invocation/go/http/README.md index c36459dc0..e2ad274e1 100644 --- a/service_invocation/go/http/README.md +++ b/service_invocation/go/http/README.md @@ -23,7 +23,7 @@ expected_stdout_lines: expected_stderr_lines: output_match_mode: substring match_order: none -background: true +background: false sleep: 30 timeout_seconds: 60 --> @@ -56,9 +56,15 @@ The terminal console output should look similar to this: == APP - checkout-http == Published data: {"orderId":10} == APP - order-processor == Subscriber received: {"orderId":10} ``` + 3. Stop and clean up application processes + + ```bash dapr stop -f . ``` diff --git a/state_management/go/http/README.md b/state_management/go/http/README.md index 1e7d93699..efcc40a44 100644 --- a/state_management/go/http/README.md +++ b/state_management/go/http/README.md @@ -25,7 +25,7 @@ expected_stdout_lines: expected_stderr_lines: output_match_mode: substring match_order: none -background: true +background: false sleep: 15 --> @@ -33,7 +33,13 @@ sleep: 15 dapr run -f . ``` + + 2. Stop and cleanup application process + ```bash dapr stop -f . diff --git a/state_management/go/sdk/README.md b/state_management/go/sdk/README.md index af7bed04e..312c16417 100644 --- a/state_management/go/sdk/README.md +++ b/state_management/go/sdk/README.md @@ -25,7 +25,7 @@ expected_stdout_lines: expected_stderr_lines: output_match_mode: substring match_order: none -background: true +background: false sleep: 15 --> @@ -33,8 +33,15 @@ sleep: 15 dapr run -f . ``` + + 2. Stop and cleanup application process + + ```bash dapr stop -f . ``` diff --git a/workflows/go/sdk/README.md b/workflows/go/sdk/README.md index 55e2e42f1..f329334ee 100644 --- a/workflows/go/sdk/README.md +++ b/workflows/go/sdk/README.md @@ -32,7 +32,7 @@ expected_stdout_lines: - "There are now 90 cars left in stock" - "Workflow completed - result: COMPLETED" output_match_mode: substring -background: true +background: false timeout_seconds: 120 sleep: 30 --> @@ -70,10 +70,17 @@ dapr run -f . 4. Stop Dapr workflow with CTRL-C or: + + ```sh dapr stop -f . ``` + + ### View workflow output with Zipkin