Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Jun 8, 2021
1 parent abbf7d0 commit d2f219f
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ This example shows reading and writing to a STAN subject
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/301-stan-pipeline.yaml
```

### [two-sinks](https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/301-two-sinks-pipeline.yaml)
### [301-two-sinks](https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/301-two-sinks-pipeline.yaml)

This example has two sinks

Expand All @@ -320,7 +320,7 @@ This example has two sinks
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/301-two-sinks-pipeline.yaml
```

### [two-sources](https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/301-two-sources-pipeline.yaml)
### [301-two-sources](https://raw.githubusercontent.com/argoproj-labs/argo-dataflow/main/examples/301-two-sources-pipeline.yaml)

This example has two sources

Expand Down
2 changes: 1 addition & 1 deletion dsls/python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def dump(self):
y = {'subject': self._subject}
if self._parallel:
y['parallel'] = self._parallel
x['stan'] = y
x['stan'] = y
return x


Expand Down
3 changes: 2 additions & 1 deletion examples/101-two-node-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ spec:
- kafka:
topic: output-topic
sources:
- {}
- stan:
subject: a-b
6 changes: 4 additions & 2 deletions examples/102-flatten-expand-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ spec:
- stan:
subject: flattened
sources:
- {}
- stan:
subject: data
- expand: {}
name: expand
sinks:
- log: {}
sources:
- {}
- stan:
subject: flattened
1 change: 1 addition & 0 deletions examples/108-container-pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
(pipeline("108-container")
.owner('argoproj-labs')
.describe("""This example showcases container options.""")
.annotate('dataflow.argoproj.io/wait-for', 'Completed')
.step(
(container('main',
args=['sh', '-c', 'exit 0'],
Expand Down
1 change: 1 addition & 0 deletions examples/108-container-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
annotations:
dataflow.argoproj.io/description: This example showcases container options.
dataflow.argoproj.io/owner: argoproj-labs
dataflow.argoproj.io/wait-for: Completed
name: 108-container
spec:
steps:
Expand Down
12 changes: 8 additions & 4 deletions examples/201-vetinary-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,32 @@ spec:
- stan:
subject: cats
sources:
- {}
- stan:
subject: pets
- map: |-
json("Meow! " + object(msg).name)
name: process-cats
sinks:
- kafka:
topic: output-topic
sources:
- {}
- stan:
subject: cats
- filter: |-
string(msg) contains "dog"
name: filter-dogs
sinks:
- stan:
subject: dogs
sources:
- {}
- stan:
subject: pets
- map: |-
json("Woof! " + object(msg).name)
name: process-dogs
sinks:
- kafka:
topic: output-topic
sources:
- {}
- stan:
subject: dogs
6 changes: 4 additions & 2 deletions examples/201-word-count-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ spec:
- stan:
subject: words
sources:
- {}
- stan:
subject: lines
- container:
args:
- bash
Expand All @@ -75,5 +76,6 @@ spec:
- kafka:
topic: output-topic
sources:
- {}
- stan:
subject: words
terminator: true
1 change: 1 addition & 0 deletions examples/301-erroring-pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def handler(msg):
(pipeline("301-erroring")
.owner('argoproj-labs')
.describe("""This example showcases retry policies.""")
.annotate('dataflow.argoproj.io/wait-for', 'Errors')
.step(
(cron('*/3 * * * * *', retryPolicy='Always')
.handler('always', handler=handler)
Expand Down
1 change: 1 addition & 0 deletions examples/301-erroring-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
annotations:
dataflow.argoproj.io/description: This example showcases retry policies.
dataflow.argoproj.io/owner: argoproj-labs
dataflow.argoproj.io/wait-for: Errors
name: 301-erroring
spec:
steps:
Expand Down
1 change: 1 addition & 0 deletions examples/301-stan-pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
(pipeline("301-stan")
.owner('argoproj-labs')
.describe("""This example shows reading and writing to a STAN subject""")
.annotate('dataflow.argoproj.io/test', 'false')
.step(
(stan('input-subject')
.cat('main')
Expand Down
4 changes: 3 additions & 1 deletion examples/301-stan-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
dataflow.argoproj.io/description: This example shows reading and writing to a
STAN subject
dataflow.argoproj.io/owner: argoproj-labs
dataflow.argoproj.io/test: 'false'
name: 301-stan
spec:
steps:
Expand All @@ -14,4 +15,5 @@ spec:
- stan:
subject: output-subject
sources:
- {}
- stan:
subject: input-subject
2 changes: 1 addition & 1 deletion examples/301-two-sinks-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
dataflow.argoproj.io/description: |
This example has two sinks
creationTimestamp: null
name: two-sinks
name: 301-two-sinks
spec:
steps:
- cat: {}
Expand Down
2 changes: 1 addition & 1 deletion examples/301-two-sources-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
dataflow.argoproj.io/description: |
This example has two sources
creationTimestamp: null
name: two-sources
name: 301-two-sources
spec:
steps:
- cat: {}
Expand Down

0 comments on commit d2f219f

Please sign in to comment.