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

feat(aws-lambda-stepfunctions): aws-lambda-stepfunctions implementation #285

Merged
merged 9 commits into from
Jul 29, 2021

Conversation

mickychetta
Copy link
Contributor

@mickychetta mickychetta commented Jul 28, 2021

Issue #271 , if available:

Description of changes:
Transitioning from aws-lambda-step-function to new construct aws-lambda-stepfunctions to adhere to consistent naming conventions.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 513cc14
  • Result: FAILED
  • Build Logs (available for 30 days)

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

*/
export interface LambdaToStepFunctionProps {
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't want to change anything in the old interface, if we change the name of the props interface and the construct class we will break any existing customer code.

* @since 0.8.0
* @access public
*/
constructor(scope: Construct, id: string, props: LambdaToStepFunctionProps) {
constructor(scope: Construct, id: string, props: LambdaToStepFunctionsProps) {
super(scope, id);
defaults.CheckProps(props);
Copy link
Contributor

Choose a reason for hiding this comment

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

This code in the constructor should all be deleted. A new LambdaToStepfunctionsProps object should be created and populated from the incoming LambdaToStepFunctionProps values. Then the constructor will make a call like:

const wrappedConstruct = new LambdaToStepfunctions(this, ${id}-wrapped, newLambdaToStepfunctionsProps);

// After that, the exposed properties of the construct class will need to be populated from the exposed properties of wrapptedConstruct.

Here is a minimal deployable pattern definition in Typescript:

``` typescript
import { LambdaToStepFunctions } from '@aws-solutions-constructs/aws-lambda-stepfunctions';
Copy link
Contributor

Choose a reason for hiding this comment

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

Name needs to be LambdaToStepfunctions to match design guidelines (we only uppercase the first letter - while that seems odd here if you think of LambdaToSqs the reason for the pattern becomes clearer).

(same for Props interface)

@mickychetta mickychetta linked an issue Jul 28, 2021 that may be closed by this pull request
2 tasks
@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 5db2626
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: b3ab8e4
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: b87238f
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: ae3934c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 5cee402
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
![Stability: Deprecated](https://img.shields.io/badge/STABILITY-DEPRECATED-red?style=for-the-badge)

> Construct will be deprecated in favor of aws-lambda-stepfunctions in v2.x, but will be supported in v1.x as long as v1.x is supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm going to write up a paragraph explaining what we are doing and why that I will send you to put here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's replace line 8 with:

Some of our early constructs don’t meet the naming standards that evolved for the library. We are releasing completely feature compatible versions with corrected names. The underlying implementation code is the same regardless of whether you deploy the construct using the old or new name. We will support both names for all 1.x releases, but in 2.x we will only publish the correctly named constructs.

@@ -25,7 +25,7 @@ import { LambdaToDynamoDB } from '@aws-solutions-constructs/aws-lambda-dynamodb'
import { LambdaToS3 } from '@aws-solutions-constructs/aws-lambda-s3';
import { LambdaToSns } from '@aws-solutions-constructs/aws-lambda-sns';
import { EventsRuleToLambda } from '@aws-solutions-constructs/aws-events-rule-lambda';
import { LambdaToStepFunction } from '@aws-solutions-constructs/aws-lambda-step-function';
import { LambdaToStepfunctions } from '@aws-solutions-constructs/aws-lambda-stepfunctions';
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow - nice catch.

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 477a86a
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mickychetta mickychetta merged commit 4bfa188 into awslabs:main Jul 29, 2021
@mickychetta mickychetta self-assigned this Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create aws-lambda-stepfunctions construct
3 participants