admin管理员组文章数量:1302936
With this smallest example I could come up with:
from aws_cdk import aws_stepfunctions_tasks as tasks
from aws_cdk import aws_stepfunctions as sfn
states = tasks.GlueStartJobRun.jsonata( # actual type does not matter, this is just have something to catch errors on
self,
"Start_job",
glue_job_name="{% $states.input %}",
).add_catch(
sfn.Fail.jsonata(self, "boom"),
errors=["States.ALL"],
outputs="a string", # Not appearing!
)
sfn.StateMachine(
self,
"State_machine",
query_language=sfn.QueryLanguage.JSON_PATH,
definition_body=sfn.ChainDefinitionBody.from_chainable(states),
)
After having deploying with cdk, the catcher of the "Start Job" step does not have any output defined. I can see that even the cloudformation template does not have it. It is not a syntax error, though, and this is documented. Trying with a string or any other data type does not change the issue.
As I am using the latest aws-cdk-lib (2.178.1 at time of writing), I think this is a bug.
I think it should be possible to "manually" override this, with something like add_property_override
but I cannot find a way.
How can I have the outputs I define in the the catcher?
With this smallest example I could come up with:
from aws_cdk import aws_stepfunctions_tasks as tasks
from aws_cdk import aws_stepfunctions as sfn
states = tasks.GlueStartJobRun.jsonata( # actual type does not matter, this is just have something to catch errors on
self,
"Start_job",
glue_job_name="{% $states.input %}",
).add_catch(
sfn.Fail.jsonata(self, "boom"),
errors=["States.ALL"],
outputs="a string", # Not appearing!
)
sfn.StateMachine(
self,
"State_machine",
query_language=sfn.QueryLanguage.JSON_PATH,
definition_body=sfn.ChainDefinitionBody.from_chainable(states),
)
After having deploying with cdk, the catcher of the "Start Job" step does not have any output defined. I can see that even the cloudformation template does not have it. It is not a syntax error, though, and this is documented. Trying with a string or any other data type does not change the issue.
As I am using the latest aws-cdk-lib (2.178.1 at time of writing), I think this is a bug.
I think it should be possible to "manually" override this, with something like add_property_override
but I cannot find a way.
How can I have the outputs I define in the the catcher?
Share Improve this question asked Feb 10 at 15:01 GuillaumeGuillaume 2,9092 gold badges28 silver badges49 bronze badges1 Answer
Reset to default 0This was a bug in the cdk, now fixed. It works as expected.
本文标签: python 3xAWS step functioncdk cannot add output to catcherStack Overflow
版权声明:本文标题:python 3.x - AWS step functioncdk: cannot add output to catcher - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741710102a2393794.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论