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(stepfunctions-tasks): start build batch integration #29296

Merged
merged 22 commits into from Mar 7, 2024

Conversation

badmintoncryer
Copy link
Contributor

@badmintoncryer badmintoncryer commented Feb 28, 2024

Issue # (if applicable)

Closes #29119.

Reason for this change

There is an optimized integration with codebuild but it is not able to integrate by AWS CDK.

Description of changes

Add CodeBuildStartBuildBatch class

declare const project: codebuild.Project;

const buildconfig = project.enableBatchBuilds();

const startBuildBatch = new tasks.CodeBuildStartBuildBatch(this, 'buildTask', {
      project,
      integrationPattern: sfn.IntegrationPattern.REQUEST_RESPONSE,
      environmentVariablesOverride: {
        test: {
          type: codebuild.BuildEnvironmentVariableType.PLAINTEXT,
          value: 'testValue',
        },
      },
});

Description of how you validated changes

I've implemented both unit and integ tests.

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team February 28, 2024 15:47
@github-actions github-actions bot added star-contributor [Pilot] contributed between 25-49 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 labels Feb 28, 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.

@aws-cdk-automation aws-cdk-automation dismissed their stale review February 29, 2024 15:39

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

@badmintoncryer badmintoncryer marked this pull request as ready for review February 29, 2024 16:34
@badmintoncryer badmintoncryer force-pushed the 29119-startBuildBatch branch 2 times, most recently from 3f45609 to da7c40b Compare February 29, 2024 16:35
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 29, 2024
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Looks good 👍
I left some suggestions for cleaning up the documentation.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 2, 2024
badmintoncryer and others added 3 commits March 3, 2024 07:09
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
badmintoncryer and others added 4 commits March 3, 2024 07:11
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
@badmintoncryer
Copy link
Contributor Author

@lpizzinidev Thank you for your review!! I've addressed your comment.

},
}),
});
project.enableBatchBuilds();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add a note below explaining the scenarios when enableBatchBuilds() returns undefined?
Eg:

**Note**: Batch builds are not supported for ... 

You can verify if batch builds are enabled by checking `enableBatchBuilds()` returned value:

```ts
const enabled = project.enableBatchBuilds();
if (enabled === undefined) {
  throw new Error('Batch build were not enabled');
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lpizzinidev

I have added only Notes.

The enableBatchBuilds() returns undefined exclusively for imported projects, and this return value persists regardless of the batch build's actual status (enabled or not) within those projects. Consequently, users working with imported projects must manually ensure that batch builds are enabled, as relying on the return value of enableBatchBuilds() is not informative.

I believe it suffices to include this as a note without detailing the process of verifying the return value of enableBatchBuilds().
What do you think about that?
I'm sorry for my initial README desciption confused you...

Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks for the detailed clarification 👍

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 3, 2024
@badmintoncryer
Copy link
Contributor Author

@lpizzinidev Thanks!!

Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Thanks @badmintoncryer for the PR and @lpizzinidev for the detailed review. The changes look good. Happy to approve it.

Copy link
Contributor

mergify bot commented Mar 7, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 7, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 95b5412
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 4f2b757 into aws:main Mar 7, 2024
13 checks passed
Copy link
Contributor

mergify bot commented Mar 7, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@badmintoncryer badmintoncryer deleted the 29119-startBuildBatch branch March 8, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_stepfunctions_tasks: Implement StartBuildBatch
4 participants