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

aws-stepfunctions-tasks: EcsRunTask is not actually a construct? #28665

Open
julianskartor opened this issue Jan 11, 2024 · 5 comments
Open

aws-stepfunctions-tasks: EcsRunTask is not actually a construct? #28665

julianskartor opened this issue Jan 11, 2024 · 5 comments
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. effort/medium Medium work item – several days of effort p3

Comments

@julianskartor
Copy link

Describe the bug

EcsRunTask implements IConstruct even though to my understanding it's not actually a construct (that's my understanding from reading design guidelines as well as the user guide) as it does not represent a CloudFormation resource definition.

Expected Behavior

EcsRunTask does not implement IConstruct.

Current Behavior

EcsRunTask implements IConstruct.

Reproduction Steps

Library API.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

N/A

Framework Version

2.118.0

Node.js Version

N/A

OS

N/A

Language

TypeScript

Language Version

N/A

Other information

No response

@julianskartor julianskartor added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 11, 2024
@pahud
Copy link
Contributor

pahud commented Jan 12, 2024

EcsRunTask is actually a Construct which implements IConstruct.

Can you elaborate on why it should not?

@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 12, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jan 15, 2024
@julianskartor
Copy link
Author

EcsRunTask is actually a Construct which implements IConstruct.

Can you elaborate on why it should not?

@pahud Reading the cdk design guidelines, the cdk constructs module and the cdk user guide, EcsRunTask (or any of the state machine state types for that matter) does not seem to fulfill the definition of a CDK "construct". In particular, it does not represent a CloudFormation resource definition.

Some highlights:

from design guidelines:

The AWS Construct Library has multiple layers of constructs, beginning with low-level constructs, which we call CFN Resources (short for CloudFormation resources), or L1 (short for "level 1"). These constructs directly represent all resources available in AWS CloudFormation.

from the constructs module's overview:

Constructs are often used to represent the desired state of cloud applications. For example, in the AWS CDK, which is used to define the desired state for AWS infrastructure using CloudFormation, the lowest-level construct represents a resource definition in a CloudFormation template. These resources are composed to represent higher-level logical units of a cloud application, etc.

from IConstruct's documentation:

Represents a construct.

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Jan 15, 2024
@pahud
Copy link
Contributor

pahud commented Jun 4, 2024

A Construct does not necessary to be a cloudformation resource.

EcsRunTask extends sfn.TaskStateBase, which extends State, which extends Construct so EcsRunTask is technically a Construct.

@pahud pahud added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 4, 2024
@julianskartor
Copy link
Author

A Construct does not necessary to be a cloudformation resource.

As far as I can find, and as I've pointed out above, a Construct do always represent a CloudFormation resource. If the definition of "Construct" as it is used in the CDK library is different from how it is defined in CloudFormation, the CDK documentation for Construct should specify this.

I know this is a minor detail... But I do think it's technically incorrect given by the current documentation.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 5, 2024
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions-tasks bug This issue is a bug. effort/medium Medium work item – several days of effort p3
Projects
None yet
Development

No branches or pull requests

2 participants