Skip to content

Commit

Permalink
Merge pull request temporalio#84 from temporalio/vkarpov15/upgrade-017
Browse files Browse the repository at this point in the history
Upgrade some examples to SDK 0.17
  • Loading branch information
vkarpov15 authored Jan 11, 2022
2 parents b03e9dd + fa91401 commit 933545e
Show file tree
Hide file tree
Showing 34 changed files with 131 additions and 11,809 deletions.
2 changes: 1 addition & 1 deletion activities-cancellation-heartbeating/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion activities-dependency-injection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion activities-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"axios": "0.21.1",
"node-fetch": "2.x",
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion activities-sticky-queues/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x",
"temporalio": "0.17.x",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion child-workflows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
15 changes: 15 additions & 0 deletions continue-as-new/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,18 @@ This sample demonstrates the [continueAsNew API](https://docs.temporal.io/docs/t
In Temporal Web ([localhost:8088](http://localhost:8088)), you will see 10 Workflows spun out as new Workflows with new event histories and `Continuedasnew` status:

![image](https://user-images.githubusercontent.com/6764957/139667701-25369e04-5cad-4721-bbff-3d12bf8bfd66.png)

Example output:

```
[loopingWorkflow(loop-0)] Running Workflow iteration: 0
[loopingWorkflow(loop-0)] Running Workflow iteration: 1
[loopingWorkflow(loop-0)] Running Workflow iteration: 2
[loopingWorkflow(loop-0)] Running Workflow iteration: 3
[loopingWorkflow(loop-0)] Running Workflow iteration: 4
[loopingWorkflow(loop-0)] Running Workflow iteration: 5
[loopingWorkflow(loop-0)] Running Workflow iteration: 6
[loopingWorkflow(loop-0)] Running Workflow iteration: 7
[loopingWorkflow(loop-0)] Running Workflow iteration: 8
[loopingWorkflow(loop-0)] Running Workflow iteration: 9
```
2 changes: 1 addition & 1 deletion continue-as-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions cron-workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Note that when we're changing code and restarting Workers, unless we cancel all
Example Worker output:

```bash
Hello from 075f6172-9151-43d8-9848-b8ddb615a3a5, Temporal!
Hello from my-schedule, Temporal!
Workflow time: 1636333860201
Activity time: 1636333860241
Hello from 075f6172-9151-43d8-9848-b8ddb615a3a5, Temporal!
Hello from my-schedule, Temporal!
Workflow time: 1636333920319
Activity time: 1636333920340
```
Expand Down
2 changes: 1 addition & 1 deletion cron-workflows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
18 changes: 18 additions & 0 deletions dsl-interpreter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,21 @@ See also:
1. `npm install` to install dependencies.
1. `npm run start.watch` to start the Worker.
1. In another terminal, `npm run workflow1` or `npm run workflow2` to run the Workflows accordingly

Example output from workflow1:

```
[ '[activity1] arg1: ', '!' ] value1
[ '[activity2] arg: ', '!' ] [result from activity1: value1]
```

Example output from workflow2:

```
[ '[activity1] arg1: ', '!' ] value1
[ '[activity2] arg: ', '!' ] [result from activity1: value1]
[ '[activity4] result1: ', '!' ] [result from activity1: value1]
[ '[activity1] arg1: ', '!' ] activity3 received arg2: value2:
And received: [result from activity2: [result from activity1: value1]]
```
6 changes: 3 additions & 3 deletions dsl-interpreter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"build.watch": "tsc --build --watch",
"start": "ts-node src/worker.ts",
"start.watch": "nodemon src/worker.ts",
"workflow1": "ts-node src/client.ts ../workflow1.yaml",
"workflow2": "ts-node src/client.ts ../workflow2.yaml",
"workflow1": "ts-node src/client.ts ./workflow1.yaml",
"workflow2": "ts-node src/client.ts ./workflow2.yaml",
"lint": "eslint ."
},
"nodemonConfig": {
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"js-yaml": "^4.1.0",
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion expense/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"axios": "0.21.1",
"express": "~4.17.1",
"temporalio": "0.16.x",
"temporalio": "0.17.x",
"uuid": "8.3.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion fetch-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion hello-world-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"eslint": "^7.32.0",
Expand Down
2 changes: 1 addition & 1 deletion hello-world-mtls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x",
"temporalio": "0.17.x",
"triple-beam": "^1.3.0",
"winston": "^3.3.3"
},
Expand Down
15 changes: 14 additions & 1 deletion interceptors-opentelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ This sample features '@temporalio/interceptors-opentelemetry`, which uses [Inter
1. `npm run start.watch` to start the Worker.
1. In another shell, `npm run workflow` to run the Workflow.

The Workflow should return:
Example output:

```
Hello, Temporal!
{
traceId: '74bf8e700df7dd3d8e140feebe70927b',
parentId: undefined,
name: 'StartWorkflow:example',
id: 'ab6e93cce7ed7a15',
kind: 0,
timestamp: 1641749671800859,
duration: 515453,
attributes: { run_id: '00cf070e-b691-4943-a8e9-9696c1baef4a' },
status: { code: 1 },
events: []
}
```
5 changes: 2 additions & 3 deletions interceptors-opentelemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
"@opentelemetry/resources": "^1.0.0",
"@opentelemetry/sdk-trace-base": "^1.0.0",
"@opentelemetry/sdk-node": "^0.26.0",
"@opentelemetry/sdk-trace-base": "^1.0.0",
"@temporalio/interceptors-opentelemetry": "0.16.x",
"temporalio": "0.16.x"
"@temporalio/interceptors-opentelemetry": "0.17.x",
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
6 changes: 6 additions & 0 deletions logging-sinks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ The [Logging docs](https://docs.temporal.io/docs/typescript/logging/) explains s
1. `npm install` to install dependencies.
1. `npm run start.watch` to start the Worker.
1. In another shell, `npm run workflow` to run the Workflow.

Example output:

```
Hello, Temporal!
```
2 changes: 1 addition & 1 deletion logging-sinks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
},
"dependencies": {
"temporalio": "0.16.x"
"temporalio": "0.17.x"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion nextjs-ecommerce-oneclick/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"react-dom": "^17.0.2",
"react-toastify": "^8.0.3",
"swr": "^1.0.1",
"temporalio": "0.16.x",
"temporalio": "0.17.x",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 933545e

Please sign in to comment.