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: Add execution_mode arg to aws_codepipeline #35875

Merged

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented Feb 18, 2024

Description

This PR adds a new argument called execution_mode to the aws_codepipeline resource to support additional execution mode for V2 pipelines per https://aws.amazon.com/about-aws/whats-new/2024/02/codepipeline-trigger-filters-execution-modes/.

Relations

Closes #35810

References

Referred to the AWS API reference for specs of the new argument.

Output from Acceptance Testing

Note that TestAccCodePipeline_pipelinetype was enhanced to validate the new execution_mode argument.

Separately, there is a failure in the TestAccCodePipeline_MultiRegion_convertSingleRegion test case which is unrelated. I will try to see if I can fix it, but it's not caused by this PR's changes.

Updated: It looks like the test case is failing because the region attribute for artifact_store has Computed set when it probably shouldn't have. Removing it seems to fix the test case, and I've also added region checks to TestAccCodePipeline_MultiRegion_convertSingleRegion. Here are the updated results:

$ make testacc TESTS=TestAccCodePipeline_ PKG=codepipeline ACCTEST_PARALLELISM=10
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/codepipeline/... -v -count 1 -parallel 10 -run='TestAccCodePipeline_'  -timeout 360m
=== RUN   TestAccCodePipeline_basic
=== PAUSE TestAccCodePipeline_basic
=== RUN   TestAccCodePipeline_disappears
=== PAUSE TestAccCodePipeline_disappears
=== RUN   TestAccCodePipeline_emptyStageArtifacts
=== PAUSE TestAccCodePipeline_emptyStageArtifacts
=== RUN   TestAccCodePipeline_deployWithServiceRole
=== PAUSE TestAccCodePipeline_deployWithServiceRole
=== RUN   TestAccCodePipeline_tags
=== PAUSE TestAccCodePipeline_tags
=== RUN   TestAccCodePipeline_MultiRegion_basic
=== PAUSE TestAccCodePipeline_MultiRegion_basic
=== RUN   TestAccCodePipeline_MultiRegion_update
=== PAUSE TestAccCodePipeline_MultiRegion_update
=== RUN   TestAccCodePipeline_MultiRegion_convertSingleRegion
=== PAUSE TestAccCodePipeline_MultiRegion_convertSingleRegion
=== RUN   TestAccCodePipeline_withNamespace
=== PAUSE TestAccCodePipeline_withNamespace
=== RUN   TestAccCodePipeline_withGitHubV1SourceAction
    acctest.go:2482: Environment variable GITHUB_TOKEN is not set, skipping test
--- SKIP: TestAccCodePipeline_withGitHubV1SourceAction (0.00s)
=== RUN   TestAccCodePipeline_ecr
=== PAUSE TestAccCodePipeline_ecr
=== RUN   TestAccCodePipeline_pipelinetype
=== PAUSE TestAccCodePipeline_pipelinetype
=== CONT  TestAccCodePipeline_basic
=== CONT  TestAccCodePipeline_MultiRegion_update
=== CONT  TestAccCodePipeline_ecr
=== CONT  TestAccCodePipeline_pipelinetype
=== CONT  TestAccCodePipeline_emptyStageArtifacts
=== CONT  TestAccCodePipeline_withNamespace
=== CONT  TestAccCodePipeline_deployWithServiceRole
=== CONT  TestAccCodePipeline_MultiRegion_basic
=== CONT  TestAccCodePipeline_MultiRegion_convertSingleRegion
=== CONT  TestAccCodePipeline_tags
--- PASS: TestAccCodePipeline_ecr (268.33s)
=== CONT  TestAccCodePipeline_disappears
--- PASS: TestAccCodePipeline_emptyStageArtifacts (319.04s)
--- PASS: TestAccCodePipeline_withNamespace (319.29s)
--- PASS: TestAccCodePipeline_MultiRegion_basic (379.88s)
--- PASS: TestAccCodePipeline_deployWithServiceRole (437.43s)
--- PASS: TestAccCodePipeline_basic (470.45s)
--- PASS: TestAccCodePipeline_disappears (212.93s)
--- PASS: TestAccCodePipeline_MultiRegion_update (526.93s)
--- PASS: TestAccCodePipeline_tags (546.19s)
--- PASS: TestAccCodePipeline_pipelinetype (562.44s)
--- PASS: TestAccCodePipeline_MultiRegion_convertSingleRegion (584.70s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/codepipeline       584.885s
$

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/codepipeline Issues and PRs that pertain to the codepipeline service. labels Feb 18, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 18, 2024
@acwwat acwwat force-pushed the f-aws_codepipeline-add_execution_mode_arg branch from e600efc to 354c1c0 Compare February 18, 2024 06:58
@acwwat acwwat changed the title [WIP] feat: Add execution_mode arg to aws_codepipeline feat: Add execution_mode arg to aws_codepipeline Feb 18, 2024
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Feb 20, 2024
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccCodePipeline_' PKG=codepipeline ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/codepipeline/... -v -count 1 -parallel 3  -run=TestAccCodePipeline_ -timeout 360m
=== RUN   TestAccCodePipeline_basic
=== PAUSE TestAccCodePipeline_basic
=== RUN   TestAccCodePipeline_disappears
=== PAUSE TestAccCodePipeline_disappears
=== RUN   TestAccCodePipeline_emptyStageArtifacts
=== PAUSE TestAccCodePipeline_emptyStageArtifacts
=== RUN   TestAccCodePipeline_deployWithServiceRole
=== PAUSE TestAccCodePipeline_deployWithServiceRole
=== RUN   TestAccCodePipeline_tags
=== PAUSE TestAccCodePipeline_tags
=== RUN   TestAccCodePipeline_MultiRegion_basic
=== PAUSE TestAccCodePipeline_MultiRegion_basic
=== RUN   TestAccCodePipeline_MultiRegion_update
=== PAUSE TestAccCodePipeline_MultiRegion_update
=== RUN   TestAccCodePipeline_MultiRegion_convertSingleRegion
=== PAUSE TestAccCodePipeline_MultiRegion_convertSingleRegion
=== RUN   TestAccCodePipeline_withNamespace
=== PAUSE TestAccCodePipeline_withNamespace
=== RUN   TestAccCodePipeline_withGitHubV1SourceAction
    acctest.go:2482: Environment variable GITHUB_TOKEN is not set, skipping test
--- SKIP: TestAccCodePipeline_withGitHubV1SourceAction (0.00s)
=== RUN   TestAccCodePipeline_ecr
=== PAUSE TestAccCodePipeline_ecr
=== RUN   TestAccCodePipeline_pipelinetype
=== PAUSE TestAccCodePipeline_pipelinetype
=== CONT  TestAccCodePipeline_basic
=== CONT  TestAccCodePipeline_MultiRegion_update
=== CONT  TestAccCodePipeline_ecr
--- PASS: TestAccCodePipeline_ecr (39.73s)
=== CONT  TestAccCodePipeline_pipelinetype
--- PASS: TestAccCodePipeline_basic (64.83s)
=== CONT  TestAccCodePipeline_deployWithServiceRole
--- PASS: TestAccCodePipeline_MultiRegion_update (70.16s)
=== CONT  TestAccCodePipeline_MultiRegion_basic
--- PASS: TestAccCodePipeline_deployWithServiceRole (35.85s)
=== CONT  TestAccCodePipeline_tags
--- PASS: TestAccCodePipeline_MultiRegion_basic (45.51s)
=== CONT  TestAccCodePipeline_MultiRegion_convertSingleRegion
--- PASS: TestAccCodePipeline_pipelinetype (80.28s)
=== CONT  TestAccCodePipeline_emptyStageArtifacts
--- PASS: TestAccCodePipeline_emptyStageArtifacts (32.99s)
=== CONT  TestAccCodePipeline_disappears
--- PASS: TestAccCodePipeline_tags (74.16s)
=== CONT  TestAccCodePipeline_withNamespace
--- PASS: TestAccCodePipeline_disappears (31.77s)
--- PASS: TestAccCodePipeline_MultiRegion_convertSingleRegion (88.06s)
--- PASS: TestAccCodePipeline_withNamespace (33.74s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/codepipeline	219.810s

@ewbankkit
Copy link
Contributor

@acwwat Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 9eb5886 into hashicorp:main Feb 20, 2024
70 checks passed
@github-actions github-actions bot added this to the v5.38.0 milestone Feb 20, 2024
@acwwat acwwat deleted the f-aws_codepipeline-add_execution_mode_arg branch February 22, 2024 08:00
Copy link

This functionality has been released in v5.38.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/codepipeline Issues and PRs that pertain to the codepipeline service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: CodePipeline V2: Add support for different execution modes
2 participants