Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent dapr.yaml and appIDs #1152

Open
wants to merge 7 commits into
base: release-1.15
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions jobs/go/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Open a new terminal window and run the multi app run template:
<!-- STEP
name: Run multi app run template
expected_stdout_lines:
- '== APP - job-service == Received job request...'
- '== APP - job-service == Executing maintenance job: Oil Change'
- '== APP - job-scheduler == Job Scheduled: C-3PO'
- '== APP - job-service == Received job request...'
- '== APP - job-service == Executing maintenance job: Limb Calibration'
- '== APP - job-service-http == Received job request...'
- '== APP - job-service-http == Executing maintenance job: Oil Change'
- '== APP - job-scheduler-http == Job Scheduled: C-3PO'
- '== APP - job-service-http == Received job request...'
- '== APP - job-service-http == Executing maintenance job: Limb Calibration'
expected_stderr_lines:
output_match_mode: substring
match_order: none
Expand All @@ -45,20 +45,20 @@ The terminal console output should look similar to this, where:
- The `C-3PO` job is being retrieved.

```text
== APP - job-scheduler == Job Scheduled: R2-D2
== APP - job-service == Received job request...
== APP - job-service == Starting droid: R2-D2
== APP - job-service == Executing maintenance job: Oil Change
== APP - job-scheduler == Job Scheduled: C-3PO
== APP - job-scheduler == Job details: {"name":"C-3PO", "dueTime":"30s", "data":{"@type":"ttype.googleapis.com/google.protobuf.StringValue", "expression":"C-3PO:Limb Calibration"}}
== APP - job-scheduler-http == Job Scheduled: R2-D2
== APP - job-service-http == Received job request...
== APP - job-service-http == Starting droid: R2-D2
== APP - job-service-http == Executing maintenance job: Oil Change
== APP - job-scheduler-http == Job Scheduled: C-3PO
== APP - job-scheduler-http == Job details: {"name":"C-3PO", "dueTime":"30s", "data":{"@type":"ttype.googleapis.com/google.protobuf.StringValue", "expression":"C-3PO:Limb Calibration"}}
```

After 30 seconds, the terminal output should present the `C-3PO` job being processed:

```text
== APP - job-service == Received job request...
== APP - job-service == Starting droid: C-3PO
== APP - job-service == Executing maintenance job: Limb Calibration
== APP - job-service-http == Received job request...
== APP - job-service-http == Starting droid: C-3PO
== APP - job-service-http == Executing maintenance job: Limb Calibration
```

<!-- END_STEP -->
Expand All @@ -83,7 +83,7 @@ dapr stop -f .
1. Open a terminal and run the `job-service` app:

```bash
dapr run --app-id job-service --app-port 6200 --dapr-http-port 6280 -- go run .
dapr run --app-id job-service-http --app-port 6200 --dapr-http-port 6280 -- go run .
```

2. On a new terminal window, schedule the `R2-D2` Job using the Jobs API.
Expand All @@ -104,9 +104,9 @@ curl -X POST \
Back at the `job-service` app terminal window, the output should be:

```text
== APP - job-app == Received job request...
== APP - job-app == Starting droid: R2-D2
== APP - job-app == Executing maintenance job: Oil Change
== APP - job-service-http == Received job request...
== APP - job-service-http == Starting droid: R2-D2
== APP - job-service-http == Executing maintenance job: Oil Change
```

3. On the same terminal window, schedule the `C-3PO` Job using the Jobs API.
Expand Down Expand Up @@ -155,5 +155,5 @@ curl -X GET http://localhost:6280/v1.0-alpha1/jobs/c-3po -H "Content-Type: appli
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
ERRO[0249] Error getting job c-3po due to: rpc error: code = Unknown desc = job not found: app||default||job-service-http||c-3po instance=diagrid.local scope=dapr.api type=log ver=1.14.0-rc.2
```
8 changes: 4 additions & 4 deletions jobs/go/http/dapr.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: 1
apps:
- appDirPath: ./job-service/
appID: job-service
- appID: job-service-http
appDirPath: ./job-service/
appPort: 6200
daprHTTPPort: 6280
schedulerHostAddress: localhost
marcduiker marked this conversation as resolved.
Show resolved Hide resolved
command: ["go", "run", "."]
- appDirPath: ./job-scheduler/
appID: job-scheduler
- appID: job-scheduler-http
appDirPath: ./job-scheduler/
appPort: 6300
daprHTTPPort: 6380
command: ["go", "run", "."]
46 changes: 23 additions & 23 deletions jobs/go/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Open a new terminal window and run the multi app run template:
<!-- STEP
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'
- '== APP - job-service-sdk == Starting droid: R2-D2'
- '== APP - job-service-sdk == Executing maintenance job: Oil Change'
- '== APP - job-service-sdk == Starting droid: C-3PO'
- '== APP - job-service-sdk == Executing maintenance job: Memory Wipe'
expected_stderr_lines:
output_match_mode: substring
match_order: none
Expand All @@ -49,33 +49,33 @@ The terminal console output should look similar to this, where:


```text
== APP - job-service == dapr client initializing for: 127.0.0.1:6481
== APP - job-service == Registered job handler for: R2-D2
== APP - job-service == Registered job handler for: C-3PO
== APP - job-service == Registered job handler for: BB-8
== APP - job-service == Starting server on port: 6400
== APP - job-service == Job scheduled: R2-D2
== APP - job-service == Job scheduled: C-3PO
== APP - job-service == 2024/07/17 18:09:59 job:{name:"C-3PO" due_time:"10s" data:{value:"{\"droid\":\"C-3PO\",\"Task\":\"Memory Wipe\"}"}}
== APP - job-scheduler == Get job response: {"droid":"C-3PO","Task":"Memory Wipe"}
== APP - job-service == Job scheduled: BB-8
== APP - job-service == 2024/07/17 18:09:59 job:{name:"BB-8" due_time:"15s" data:{value:"{\"droid\":\"BB-8\",\"Task\":\"Internal Gyroscope Check\"}"}}
== APP - job-scheduler == Get job response: {"droid":"BB-8","Task":"Internal Gyroscope Check"}
== APP - job-scheduler == Deleted job: BB-8
== APP - job-service-sdk == dapr client initializing for: 127.0.0.1:6481
== APP - job-service-sdk == Registered job handler for: R2-D2
== APP - job-service-sdk == Registered job handler for: C-3PO
== APP - job-service-sdk == Registered job handler for: BB-8
== APP - job-service-sdk == Starting server on port: 6400
== APP - job-service-sdk == Job scheduled: R2-D2
== APP - job-service-sdk == Job scheduled: C-3PO
== APP - job-service-sdk == 2024/07/17 18:09:59 job:{name:"C-3PO" due_time:"10s" data:{value:"{\"droid\":\"C-3PO\",\"Task\":\"Memory Wipe\"}"}}
== APP - job-scheduler-sdk == Get job response: {"droid":"C-3PO","Task":"Memory Wipe"}
== APP - job-service-sdk == Job scheduled: BB-8
== APP - job-service-sdk == 2024/07/17 18:09:59 job:{name:"BB-8" due_time:"15s" data:{value:"{\"droid\":\"BB-8\",\"Task\":\"Internal Gyroscope Check\"}"}}
== APP - job-scheduler-sdk == Get job response: {"droid":"BB-8","Task":"Internal Gyroscope Check"}
== APP - job-scheduler-sdk == Deleted job: BB-8
```

After 5 seconds, the terminal output should present the `R2-D2` job being processed:

```text
== APP - job-service == Starting droid: R2-D2
== APP - job-service == Executing maintenance job: Oil Change
== APP - job-service-sdk == Starting droid: R2-D2
== APP - job-service-sdk == Executing maintenance job: Oil Change
```

After 10 seconds, the terminal output should present the `C3-PO` job being processed:

```text
== APP - job-service == Starting droid: C-3PO
== APP - job-service == Executing maintenance job: Memory Wipe
== APP - job-service-sdk == Starting droid: C-3PO
== APP - job-service-sdk == Executing maintenance job: Memory Wipe
```

<!-- END_STEP -->
Expand All @@ -99,7 +99,7 @@ dapr stop -f .
1. Open a terminal and run the `job-service` app:

```bash
dapr run --app-id job-service --app-port 6400 --dapr-grpc-port 6481 --app-protocol grpc -- go run .
dapr run --app-id job-service-sdk --app-port 6400 --dapr-grpc-port 6481 --app-protocol grpc -- go run .
```

The output should be:
Expand All @@ -115,7 +115,7 @@ The output should be:
2. On a new terminal window, run the `job-scheduler` app:

```bash
dapr run --app-id job-scheduler --app-port 6500 -- go run .
dapr run --app-id job-scheduler-sdk --app-port 6500 -- go run .
```

The output should be:
Expand Down
8 changes: 4 additions & 4 deletions jobs/go/sdk/dapr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ common:
daprdLogDestination: console
logLevel: info
apps:
- appDirPath: ./job-service/
appID: job-service
- appID: job-service-sdk
appDirPath: ./job-service/
appPort: 6400
daprGRPCPort: 6481
appProtocol: grpc
schedulerHostAddress: localhost
command: ["go", "run", "."]
- appDirPath: ./job-scheduler/
appID: job-scheduler
- appID: job-scheduler-sdk
appDirPath: ./job-scheduler/
appPort: 6500
command: ["go", "run", "."]
2 changes: 1 addition & 1 deletion jobs/go/sdk/job-scheduler/job-scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func schedule(droidJob DroidJob) error {
}

// Schedule Job
_, err = app.daprClient.InvokeMethodWithContent(context.Background(), "job-service", "scheduleJob", "POST", content)
_, err = app.daprClient.InvokeMethodWithContent(context.Background(), "job-service-sdk", "scheduleJob", "POST", content)
if err != nil {
fmt.Println("Error invoking method: ", err)
return err
Expand Down
26 changes: 13 additions & 13 deletions pub_sub/csharp/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This section shows how to run both applications at once using [multi-app run tem
<!-- STEP
name: Run multi app run template
expected_stdout_lines:
- 'Started Dapr with app id "order-processor"'
- 'Started Dapr with app id "order-processor-sdk"'
- 'Started Dapr with app id "checkout-sdk"'
- 'Published data: Order { OrderId = 2 }'
- 'Subscriber received : Order { OrderId = 2 }'
Expand All @@ -43,25 +43,25 @@ The terminal console output should look similar to this:

```text
== APP - checkout-sdk == Published data: Order { OrderId = 1 }
== APP - order-processor == Subscriber received : Order { OrderId = 1 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 1 }
== APP - checkout-sdk == Published data: Order { OrderId = 2 }
== APP - order-processor == Subscriber received : Order { OrderId = 2 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 2 }
== APP - checkout-sdk == Published data: Order { OrderId = 3 }
== APP - order-processor == Subscriber received : Order { OrderId = 3 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 3 }
== APP - checkout-sdk == Published data: Order { OrderId = 4 }
== APP - order-processor == Subscriber received : Order { OrderId = 4 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 4 }
== APP - checkout-sdk == Published data: Order { OrderId = 5 }
== APP - order-processor == Subscriber received : Order { OrderId = 5 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 5 }
== APP - checkout-sdk == Published data: Order { OrderId = 6 }
== APP - order-processor == Subscriber received : Order { OrderId = 6 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 6 }
== APP - checkout-sdk == Published data: Order { OrderId = 7 }
== APP - order-processor == Subscriber received : Order { OrderId = 7 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 7 }
== APP - checkout-sdk == Published data: Order { OrderId = 8 }
== APP - order-processor == Subscriber received : Order { OrderId = 8 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 8 }
== APP - checkout-sdk == Published data: Order { OrderId = 9 }
== APP - order-processor == Subscriber received : Order { OrderId = 9 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 9 }
== APP - checkout-sdk == Published data: Order { OrderId = 10 }
== APP - order-processor == Subscriber received : Order { OrderId = 10 }
== APP - order-processor-sdk == Subscriber received : Order { OrderId = 10 }
```

2. Stop and clean up application processes
Expand All @@ -81,7 +81,7 @@ An alternative to running all or multiple applications at once is to run single

```bash
cd ./order-processor
dapr run --app-id order-processor --resources-path ../../../components/ --app-port 7006 -- dotnet run
dapr run --app-id order-processor-sdk --resources-path ../../../components/ --app-port 7006 -- dotnet run
```

### Run Dotnet message publisher with Dapr
Expand All @@ -97,6 +97,6 @@ dapr run --app-id checkout-sdk --resources-path ../../../components/ -- dotnet r
2. Stop and clean up application processes

```bash
dapr stop --app-id order-processor
dapr stop --app-id order-processor-sdk
dapr stop --app-id checkout-sdk
```
2 changes: 1 addition & 1 deletion pub_sub/csharp/sdk/dapr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 1
common:
resourcesPath: ../../components/
apps:
- appID: order-processor
- appID: order-processor-sdk
appDirPath: ./order-processor/
appPort: 7006
command: ["dotnet", "run"]
Expand Down
24 changes: 12 additions & 12 deletions pub_sub/go/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ This section shows how to run both applications at once using [multi-app run tem
<!-- STEP
name: Run multi app run template
expected_stdout_lines:
- 'Started Dapr with app id "order-processor"'
- 'Started Dapr with app id "order-processor-sdk"'
- 'Started Dapr with app id "checkout-sdk"'
- '== APP - checkout-sdk == Published data: {"orderId":1}'
- '== APP - order-processor == Subscriber received: map[orderId:1]'
- '== APP - order-processor-sdk == Subscriber received: map[orderId:1]'
expected_stderr_lines:
output_match_mode: substring
match_order: none
Expand All @@ -39,25 +39,25 @@ The terminal console output should look similar to this:

```text
== APP - checkout-sdk == Published data: {"orderId":1}
== APP - order-processor == Subscriber received: map[orderId:1]
== APP - order-processor-sdk == Subscriber received: map[orderId:1]
== APP - checkout-sdk == Published data: {"orderId":2}
== APP - order-processor == Subscriber received: map[orderId:2]
== APP - order-processor-sdk == Subscriber received: map[orderId:2]
== APP - checkout-sdk == Published data: {"orderId":3}
== APP - order-processor == Subscriber received: map[orderId:3]
== APP - order-processor-sdk == Subscriber received: map[orderId:3]
== APP - checkout-sdk == Published data: {"orderId":4}
== APP - order-processor == Subscriber received: map[orderId:4]
== APP - order-processor-sdk == Subscriber received: map[orderId:4]
== APP - checkout-sdk == Published data: {"orderId":5}
== APP - order-processor == Subscriber received: map[orderId:5]
== APP - order-processor-sdk == Subscriber received: map[orderId:5]
== APP - checkout-sdk == Published data: {"orderId":6}
== APP - order-processor == Subscriber received: map[orderId:6]
== APP - order-processor-sdk == Subscriber received: map[orderId:6]
== APP - checkout-sdk == Published data: {"orderId":7}
== APP - order-processor == Subscriber received: map[orderId:7]
== APP - order-processor-sdk == Subscriber received: map[orderId:7]
== APP - checkout-sdk == Published data: {"orderId":8}
== APP - order-processor == Subscriber received: map[orderId:8]
== APP - order-processor-sdk == Subscriber received: map[orderId:8]
== APP - checkout-sdk == Published data: {"orderId":9}
== APP - order-processor == Subscriber received: map[orderId:9]
== APP - order-processor-sdk == Subscriber received: map[orderId:9]
== APP - checkout-sdk == Published data: {"orderId":10}
== APP - order-processor == Subscriber received: map[orderId:10]
== APP - order-processor-sdk == Subscriber received: map[orderId:10]
```
<!-- END_STEP -->

Expand Down
2 changes: 1 addition & 1 deletion pub_sub/go/sdk/dapr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 1
common:
resourcesPath: ../../components/
apps:
- appID: order-processor
- appID: order-processor-sdk
appDirPath: ./order-processor/
appPort: 6005
command: ["go", "run", "."]
Expand Down
24 changes: 12 additions & 12 deletions pub_sub/javascript/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ cd ..
<!-- STEP
name: Run multi app run template
expected_stdout_lines:
- 'Started Dapr with app id "order-processor"'
- 'Started Dapr with app id "order-processor-sdk"'
- 'Started Dapr with app id "checkout-sdk"'
- '== APP - checkout-sdk == Published data: {"orderId":1}'
- '== APP - order-processor == Subscriber received: {"orderId":1}'
- '== APP - order-processor-sdk == Subscriber received: {"orderId":1}'
expected_stderr_lines:
output_match_mode: substring
match_order: none
Expand All @@ -59,25 +59,25 @@ The terminal console output should look similar to this:

```text
== APP - checkout-sdk == Published data: {"orderId":1}
== APP - order-processor == Subscriber received: {"orderId":1}
== APP - order-processor-sdk == Subscriber received: {"orderId":1}
== APP - checkout-sdk == Published data: {"orderId":2}
== APP - order-processor == Subscriber received: {"orderId":2}
== APP - order-processor-sdk == Subscriber received: {"orderId":2}
== APP - checkout-sdk == Published data: {"orderId":3}
== APP - order-processor == Subscriber received: {"orderId":3}
== APP - order-processor-sdk == Subscriber received: {"orderId":3}
== APP - checkout-sdk == Published data: {"orderId":4}
== APP - order-processor == Subscriber received: {"orderId":4}
== APP - order-processor-sdk == Subscriber received: {"orderId":4}
== APP - checkout-sdk == Published data: {"orderId":5}
== APP - order-processor == Subscriber received: {"orderId":5}
== APP - order-processor-sdk == Subscriber received: {"orderId":5}
== APP - checkout-sdk == Published data: {"orderId":6}
== APP - order-processor == Subscriber received: {"orderId":6}
== APP - order-processor-sdk == Subscriber received: {"orderId":6}
== APP - checkout-sdk == Published data: {"orderId":7}
== APP - order-processor == Subscriber received: {"orderId":7}
== APP - order-processor-sdk == Subscriber received: {"orderId":7}
== APP - checkout-sdk == Published data: {"orderId":8}
== APP - order-processor == Subscriber received: {"orderId":8}
== APP - order-processor-sdk == Subscriber received: {"orderId":8}
== APP - checkout-sdk == Published data: {"orderId":9}
== APP - order-processor == Subscriber received: {"orderId":9}
== APP - order-processor-sdk == Subscriber received: {"orderId":9}
== APP - checkout-sdk == Published data: {"orderId":10}
== APP - order-processor == Subscriber received: {"orderId":10}
== APP - order-processor-sdk == Subscriber received: {"orderId":10}
```

3. Stop and clean up application processes
Expand Down
2 changes: 1 addition & 1 deletion pub_sub/javascript/sdk/dapr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 1
common:
resourcesPath: ../../components/
apps:
- appID: order-processor
- appID: order-processor-sdk
appDirPath: ./order-processor/
appPort: 5002
command: ["npm", "run", "start"]
Expand Down
Loading
Loading