Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating pipelines.Step with aws_codepipeline_actions.StepFunctionInvokeAction fails #3041

Closed
1 of 5 tasks
psolaimani opened this issue Oct 7, 2021 · 2 comments
Closed
1 of 5 tasks
Labels
bug This issue is a bug. cdk-blocker language/python Related to Python bindings p2

Comments

@psolaimani
Copy link

🐛 Bug Report

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)
  • Go

General Information

  • JSII Version: 1.37.0
  • Platform: Linux ip-10-223-200-227.eu-west-1.compute.internal 4.14.248-189.473.amzn2.x86_64 Consider adding support for Set<T> #1 SMP Mon Sep 27 05:52:26 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

What is the problem?

Creating pipelines.Step with aws_codepipeline_actions.StepFunctionInvokeAction fails. This seems related to #2963

Verbose Log

cdk synth on original repro-jsii fails, saying:

$ cdk synth
jsii.errors.JavaScriptError: 
  Error: from_state_machine_arn() missing 2 required positional arguments: 'id' and 'state_machine_arn'
      at KernelHost.completeCallback (/tmp/tmp60h0j7on/lib/program.js:9740:35)
      at KernelHost.processRequest (/tmp/tmp60h0j7on/lib/program.js:9786:24)
      at KernelHost.completeCallback (/tmp/tmp60h0j7on/lib/program.js:9744:33)
      at KernelHost.processRequest (/tmp/tmp60h0j7on/lib/program.js:9786:24)
      at KernelHost.completeCallback (/tmp/tmp60h0j7on/lib/program.js:9744:33)
      at KernelHost.processRequest (/tmp/tmp60h0j7on/lib/program.js:9786:24)
      at KernelHost.completeCallback (/tmp/tmp60h0j7on/lib/program.js:9744:33)
      at KernelHost.processRequest (/tmp/tmp60h0j7on/lib/program.js:9786:24)
      at KernelHost.completeCallback (/tmp/tmp60h0j7on/lib/program.js:9744:33)
      at KernelHost.processRequest (/tmp/tmp60h0j7on/lib/program.js:9786:24)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "app.py", line 47, in <module>
    app.synth()
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/aws_cdk/core/__init__.py", line 16432, in synth
    return typing.cast(aws_cdk.cx_api.CloudAssembly, jsii.invoke(self, "synth", [options]))
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/__init__.py", line 143, in wrapped
    return _recursize_dereference(kernel, fn(kernel, *args, **kwargs))
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/__init__.py", line 363, in invoke
    return _callback_till_result(self, response, InvokeResponse)
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/__init__.py", line 232, in _callback_till_result
    response.cbid, str(exc), None, response_type
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/__init__.py", line 405, in sync_complete
    response_type=response_type,
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/providers/process.py", line 382, in sync_complete
    resp = self._process.send(_CompleteRequest(complete=request), response_type)
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/providers/process.py", line 326, in send
    raise JSIIError(resp.error) from JavaScriptError(resp.stack)
jsii.errors.JSIIError: from_state_machine_arn() missing 2 required positional arguments: 'id' and 'state_machine_arn'

if you provide the missing scope and id arguments by:

                state_machine=aws_stepfunctions.StateMachine.from_state_machine_arn(self, "mysf", "SF_ARN"),

you get the following error:

$ cdk synth
jsii.errors.JavaScriptError: 
  Error: Object of type @aws-cdk/pipelines.Step is not convertible to constructs.Construct
      at KernelHost.completeCallback (/tmp/tmpls92n7h_/lib/program.js:9740:35)
      at KernelHost.processRequest (/tmp/tmpls92n7h_/lib/program.js:9786:24)
      at KernelHost.completeCallback (/tmp/tmpls92n7h_/lib/program.js:9744:33)
      at KernelHost.processRequest (/tmp/tmpls92n7h_/lib/program.js:9786:24)
      at KernelHost.completeCallback (/tmp/tmpls92n7h_/lib/program.js:9744:33)
      at KernelHost.processRequest (/tmp/tmpls92n7h_/lib/program.js:9786:24)
      at KernelHost.completeCallback (/tmp/tmpls92n7h_/lib/program.js:9744:33)
      at KernelHost.processRequest (/tmp/tmpls92n7h_/lib/program.js:9786:24)
      at KernelHost.completeCallback (/tmp/tmpls92n7h_/lib/program.js:9744:33)
      at KernelHost.processRequest (/tmp/tmpls92n7h_/lib/program.js:9786:24)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "app.py", line 47, in <module>
    app.synth()
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/aws_cdk/core/__init__.py", line 16432, in synth
    return typing.cast(aws_cdk.cx_api.CloudAssembly, jsii.invoke(self, "synth", [options]))
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/__init__.py", line 143, in wrapped
    return _recursize_dereference(kernel, fn(kernel, *args, **kwargs))
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/__init__.py", line 363, in invoke
    return _callback_till_result(self, response, InvokeResponse)
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/__init__.py", line 232, in _callback_till_result
    response.cbid, str(exc), None, response_type
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/__init__.py", line 405, in sync_complete
    response_type=response_type,
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/providers/process.py", line 382, in sync_complete
    resp = self._process.send(_CompleteRequest(complete=request), response_type)
  File "/home/ec2-user/environment/tmp/jsii-repro/.e/lib64/python3.7/site-packages/jsii/_kernel/providers/process.py", line 326, in send
    raise JSIIError(resp.error) from JavaScriptError(resp.stack)
jsii.errors.JSIIError: Object of type @aws-cdk/pipelines.Step is not convertible to constructs.Construct
Subprocess exited with error 1
@psolaimani psolaimani added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 7, 2021
@NGL321 NGL321 added cdk-blocker language/python Related to Python bindings p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 7, 2022
@RomainMuller
Copy link
Contributor

Well... @aws-cdk/pipelines.Step does not implement constructs.Construct so it cannot be used as a scope... So this error is completely accurate, and you need to use something that is a construct as the state machine's scope...

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. cdk-blocker language/python Related to Python bindings p2
Projects
None yet
Development

No branches or pull requests

3 participants