Skip to content

Commit

Permalink
fix: argo node set panic: index out of range and correct docs (argo…
Browse files Browse the repository at this point in the history
…proj#6653)

Signed-off-by: Jesse Suen <[email protected]>
  • Loading branch information
jessesuen committed Sep 1, 2021
1 parent 946a9c3 commit 2ac3c48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/argo/commands/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewNodeCommand() *cobra.Command {
argo node set my-wf --message "We did it!"" --node-field-selector displayName=approve
`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) < 1 {
if len(args) < 2 {
cmd.HelpFunc()(cmd, args)
os.Exit(1)
}
Expand Down
11 changes: 5 additions & 6 deletions examples/suspend-template-outputs.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# This example uses a suspend template that expects outputs to be provided to it. These outputs may be provided by the CLI
# with the 'argo set' command, the API with the '/set' endpoint, or directly via K8s.
# with the 'argo node set' command, the API with the '/set' endpoint, or directly via K8s.
#
# Example:
# argo set outputs my-wf '{"message": "Hello, world!"}' --node-field-selector displayName=approve
# argo set message my-wf 'Test message' --node-field-selector displayName=approve
# argo resume my-wf
# argo node set suspend-outputs -p message="Hello, world!" --node-field-selector displayName=approve
# argo node set suspend-outputs --message="Test message" --node-field-selector displayName=approve
# argo resume suspend-outputs

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: simon
#generateName: suspend-template-
generateName: suspend-outputs
spec:
entrypoint: suspend
templates:
Expand Down

0 comments on commit 2ac3c48

Please sign in to comment.