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

fix(stepfunctions-tasks): allow passing apiEndpoint as intrinsic function #30954

Conversation

MathieuGilbert
Copy link
Contributor

@MathieuGilbert MathieuGilbert commented Jul 25, 2024

Closes #29925, #30749

Reason for this change

The apiEndpoint prop currently only works when it's a string (ie. TaskInput.fromText('some/text')), with the task failing when passed as a reference (ie. TaskInput.fromText(JsonPath.format('some/text/{}', '123')). This is needed to allow for dynamic parts in the path.

Description of changes

  • Use the JsonPath.format intrinsic function to combine the apiRoot and apiEndpoint instead of string concatenation.
  • Add unit and integration tests to cover passing formatted input.
  • Update (and fix) README entry's usage example.
  • Add AWS::ApiGateway::Deployment to the IntegTest's allowDestroy prop, as updating the integration test led to this build error:
Failed: /codebuild/output/src2296678373/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/http/integ.invoke.js
!!! This test contains destructive changes !!!
    Stack: aws-stepfunctions-tasks-http-invoke-integ - Resource: IntegRestApiDeploymentD67E59EC852098a1c127ca9d7d16d22086273910 - Impact: WILL_DESTROY
!!! If these destructive changes are necessary, please indicate this on the PR !!!

Description of how you validated changes

  • Unit and integration test cases were added.
  • Proved out by copying the construct to an existing app, with a stack similar to what's in the integration test, and invoking via console.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…int instead of string concatenation. This is required when apiEndpoint requires resolving and isn't just plain text.

Add unit test to cover passing JsonPath.formatted input.
Update integration test.
Update (and fix) README entry's usage example.
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Jul 25, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team July 25, 2024 19:29
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 labels Jul 25, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@MathieuGilbert MathieuGilbert changed the title (fix)(stepfunctions-tasks): allow passing apiEndpoint as intrinsic function fix(stepfunctions-tasks): allow passing apiEndpoint as intrinsic function Jul 25, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review July 25, 2024 19:32

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@MathieuGilbert
Copy link
Contributor Author

Clarification Request
How do I get CI to accept the updated integration test and snapshot?

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Aug 8, 2024
@MathieuGilbert MathieuGilbert marked this pull request as ready for review August 8, 2024 19:43
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 54e62bf
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

@eliasericsson
Copy link

@MathieuGilbert Have you gotten any notice on how to get the build to pass? This PR is relevant to my interests. Good work!

@MathieuGilbert
Copy link
Contributor Author

MathieuGilbert commented Sep 4, 2024

Thanks @eliasericsson, but no updates yet. I tried opening a discussion question, but no response there either. I'm not sure how to get some actual help 🤷

@aws-cdk-automation
Copy link
Collaborator

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Sep 6, 2024
Copy link

github-actions bot commented Sep 6, 2024

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort p2 pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run
Projects
None yet
3 participants