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(codepipeline): executionMode property for Pipeline #29148

Merged
merged 10 commits into from
Mar 8, 2024

Conversation

go-to-k
Copy link
Contributor

@go-to-k go-to-k commented Feb 17, 2024

Issue # (if applicable)

Closes #29147.

Reason for this change

We would be good to add a new parameter for execution mode.

see:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-pipeline.html#cfn-codepipeline-pipeline-executionmode

https://aws.amazon.com/about-aws/whats-new/2024/02/codepipeline-trigger-filters-execution-modes

Description of changes

Add an executionMode parameter to the PipelineProps interface.

Description of how you validated changes

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 17, 2024 15:10
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Feb 17, 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.

Comment on lines +524 to +531
if (
props.executionMode
&& [ExecutionMode.QUEUED, ExecutionMode.PARALLEL].includes(props.executionMode)
&& this.pipelineType !== PipelineType.V2
) {
throw new Error(`${props.executionMode} execution mode can only be used with V2 pipelines, \`PipelineType.V2\` must be specified for \`pipelineType\``);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have confirmed that the error occurs when QUEUED or PARALLEL mode is specified in the AWS console.

QUEUED or PARALLEL mode can only be used with V2 pipelines

@github-actions github-actions bot added the effort/medium Medium work item – several days of effort label Feb 22, 2024
@go-to-k go-to-k marked this pull request as ready for review February 22, 2024 11:02
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 22, 2024 11:03

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

@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 22, 2024
Copy link
Contributor

@jumic jumic left a comment

Choose a reason for hiding this comment

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

From my point of view, the PR already looks good. I would suggest adding some descriptions for the execution modes. (Copied from https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works.html)

packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts Outdated Show resolved Hide resolved
packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts Outdated Show resolved Hide resolved
@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 1, 2024
@go-to-k go-to-k requested a review from jumic March 3, 2024 08:12
@go-to-k
Copy link
Contributor Author

go-to-k commented Mar 3, 2024

@jumic

Thanks for your review. I modified them, could you please check? (The format of line breaks, etc. has been slightly changed.)

Copy link
Contributor

@jumic jumic left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM! 👍

@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
gracelu0
gracelu0 previously approved these changes Mar 7, 2024
Copy link
Contributor

@gracelu0 gracelu0 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for your contribution! :)

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
@mergify mergify bot dismissed gracelu0’s stale review March 8, 2024 06:20

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 8, 2024
@go-to-k go-to-k requested a review from gracelu0 March 8, 2024 07:54
@go-to-k
Copy link
Contributor Author

go-to-k commented Mar 8, 2024

@gracelu0

Thanks for your approval.
The merge of the main branch caused a difference in the integ test snapshot, so I modified the snapshot again.
Could you please approve it again?

  CHANGED    aws-codepipeline-actions/test/integ.pipeline-type-v2 3.224s
      Resources
[~] AWS::Lambda::Function CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F 
 └─ [~] Code
     └─ [~] .S3Key:
         ├─ [-] 2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3.zip
         └─ [+] 54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c.zip

Copy link
Contributor

mergify bot commented Mar 8, 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 8, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: c1fcdba
  • 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 3bb2944 into aws:main Mar 8, 2024
12 checks passed
Copy link
Contributor

mergify bot commented Mar 8, 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-codepipeline: add executionMode property to Pipeline
4 participants