「:」前後に空白があるとエラー
$ cat a.dig
+task1:
_export:
val: ${true ? 1 : 2}
echo>: ${val}
$ digdag run a.dig
2017-03-29 14:08:07 +0900: Digdag v0.9.7
error: Validating project failed
workflow /tmp/a.dig mapping values are not allowed here
in 'string', line 3, column 22:
val: ${true ? 1 : 2}
^
(model validation)
「:」前後の空白を詰めると動く
$ cat a.dig
+task1:
_export:
val: ${true ? 1:2}
echo>: ${val}
$ digdag run a.dig
2017-03-29 14:11:33 +0900: Digdag v0.9.7
2017-03-29 14:11:36 +0900 [WARN] (main): Using a new session time 2017-03-29T00:00:00+00:00.
2017-03-29 14:11:36 +0900 [INFO] (main): Using session /tmp/.digdag/status/20170329T000000+0000.
2017-03-29 14:11:36 +0900 [INFO] (main): Starting a new session project id=1 workflow name=a session_time=2017-03-29T00:00:00+00:00
2017-03-29 14:11:40 +0900 [INFO] (0016@+a+task1): echo>: 1
1
Success. Task state is saved at /tmp/.digdag/status/20170329T000000+0000 directory.
* Use --session <daily | hourly | "yyyy-MM-dd[ HH:mm:ss]"> to not reuse the last session time.
* Use --rerun, --start +NAME, or --goal +NAME argument to rerun skipped tasks.
「"」で囲んだ方が良さそう
$ cat a.dig
+task1:
_export:
val: "${true ? 1 : 2}"
echo>: ${val}
$ digdag run a.dig
2017-03-29 14:38:36 +0900: Digdag v0.9.7
2017-03-29 14:38:39 +0900 [WARN] (main): Using a new session time 2017-03-29T00:00:00+00:00.
2017-03-29 14:38:39 +0900 [INFO] (main): Using session /tmp/.digdag/status/20170329T000000+0000.
2017-03-29 14:38:39 +0900 [INFO] (main): Starting a new session project id=1 workflow name=a session_time=2017-03-29T00:00:00+00:00
2017-03-29 14:38:42 +0900 [INFO] (0016@+a+task1): echo>: 1
1
Success. Task state is saved at /tmp/.digdag/status/20170329T000000+0000 directory.
* Use --session <daily | hourly | "yyyy-MM-dd[ HH:mm:ss]"> to not reuse the last session time.
* Use --rerun, --start +NAME, or --goal +NAME argument to rerun skipped tasks.