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: comment field appears not supported #27005

Closed
2 tasks
berenddeboer opened this issue Sep 5, 2023 · 4 comments · Fixed by #27010
Closed
2 tasks

aws-stepfunctions: comment field appears not supported #27005

berenddeboer opened this issue Sep 5, 2023 · 4 comments · Fixed by #27010
Labels
@aws-cdk/aws-stepfunctions Related to AWS StepFunctions effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@berenddeboer
Copy link
Contributor

Describe the feature

When editing a state machine via the AWS Console, I could provide a comment for a choice rule. It suggest my state language will look like this:

    "Verification needed?": {
      "Type": "Choice",
      "Choices": [
        {
          "Variable": "$.verification_needed",
          "IsBoolean": true,
          "Next": "Set status to pending verification",
          "Comment": "yes"
        }
      ],
      "Default": "Wait for approval"
    },

This "yes" comment gets nicely displayed in the graph. However, I could not see a way to generate this comment field withi CDK. Is that correct?

Are there any plans to introduce that? Really great for more complex flows.

Unfortunately this comment is only visible in the editor, not in the "Definition" tab.

Use Case

Improve output of state machine graph.

Proposed Solution

Add a property or optional input to sfn.Condition.isBoolean().

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.91.0

Environment details (OS name and version, etc.)

Mac x86_64, Darwin kernel 22.6.0

@berenddeboer berenddeboer added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 5, 2023
@github-actions github-actions bot added the @aws-cdk/aws-stepfunctions Related to AWS StepFunctions label Sep 5, 2023
@msambol
Copy link
Contributor

msambol commented Sep 5, 2023

@mrgrain I'll take this. It's there but not implemented.

https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-stepfunctions/lib/states/choice.ts#L17

@msambol
Copy link
Contributor

msambol commented Sep 5, 2023

@mrgrain I'll take this. It's there but not implemented.

https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-stepfunctions/lib/states/choice.ts#L17

I linked the wrong type of comment jfyi. That is working as expected. But my PR adds the requested comment.

@khushail khushail added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 5, 2023
@khushail
Copy link
Contributor

khushail commented Sep 5, 2023

Thanks @berenddeboer for reaching out with this request. Thanks @msambol for submitting a PR. Appreciate your contribution.

@mergify mergify bot closed this as completed in #27010 Sep 19, 2023
mergify bot pushed a commit that referenced this issue Sep 19, 2023
Currently you can comment on a `Choice` state. 
This adds the ability to comment on a when condition.

<img width="437" alt="Screenshot 2023-09-05 at 7 47 35 AM" src="https://github.com/aws/aws-cdk/assets/3310356/4cb92427-c16c-4994-9e86-0384c4c2b075">

<img width="473" alt="Screenshot 2023-09-05 at 7 54 29 AM" src="https://github.com/aws/aws-cdk/assets/3310356/4dc1857e-5515-4510-8fde-a5eb8bc93afe">

Closes #27005.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️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.

HBobertz pushed a commit that referenced this issue Sep 19, 2023
Currently you can comment on a `Choice` state. 
This adds the ability to comment on a when condition.

<img width="437" alt="Screenshot 2023-09-05 at 7 47 35 AM" src="https://github.com/aws/aws-cdk/assets/3310356/4cb92427-c16c-4994-9e86-0384c4c2b075">

<img width="473" alt="Screenshot 2023-09-05 at 7 54 29 AM" src="https://github.com/aws/aws-cdk/assets/3310356/4dc1857e-5515-4510-8fde-a5eb8bc93afe">

Closes #27005.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions Related to AWS StepFunctions effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants