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(aws-cloudformation): change use of Role to IRole in CodePipeline Actions #1364

Merged
merged 1 commit into from
Dec 18, 2018

Conversation

skinny85
Copy link
Contributor

@skinny85 skinny85 commented Dec 14, 2018

BREAKING CHANGE: this changes the type of the role property in CFN CodePipeline Actions
from Role to IRole.

This is needed to use imported Roles when creating Actions.

Fixes #1361


Pull Request Checklist

Please check all boxes, including N/A items:

Testing

  • Unit test and/or integration test added
  • Toolkit change?: integration tests manually executed (paste output to the PR description)
  • Init template change?: coordinated update of integration tests (currently maintained in a private repo).

Documentation

  • README: README and/or documentation topic updated
  • jsdocs: All public APIs documented

Title and description

  • Change type: Title is prefixed with change type:
    • fix(module): <title> bug fix (patch)
    • feat(module): <title> feature/capability (minor)
    • chore(module): <title> won't appear in changelog
    • build(module): <title> won't appear in changelog
  • Title format: Title uses lower case and doesn't end with a period
  • Breaking change?: Last paragraph of description is: BREAKING CHANGE: <describe exactly what changed and how to achieve similar behavior + link to documentation/gist/issue if more details are required>
  • References: Indicate issues fixed via: Fixes #xxx or Closes #xxx

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

@skinny85 skinny85 requested a review from a team as a code owner December 14, 2018 00:45
@RomainMuller RomainMuller changed the title fix(aws-cloudformation): change the type of Role in CodePipeline Acti… fix(aws-cloudformation): change use of Role to IRole in CodePipeline Actions Dec 14, 2018
Copy link
Contributor

@RomainMuller RomainMuller 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 to me, but I'm not sure this counts as a Breaking change, since Role implements IRole.

@eladb what do you think?

@RomainMuller
Copy link
Contributor

I've added the necessary (hopefully sufficient) fix to @aws-cdk/app-delivery.

@skinny85
Copy link
Contributor Author

Thanks for taking this one over @RomainMuller!

@skinny85
Copy link
Contributor Author

skinny85 commented Dec 14, 2018

I think it's still a breaking change, as Role is a supertype subtype of IRole. A change the other way would be backwards compatible.

@@ -51,7 +51,7 @@ export interface PipelineDeployStackActionProps {
*
* @default A fresh role with admin or no permissions (depending on the value of `adminPermissions`).
*/
role?: iam.Role;
role?: iam.IRole;
Copy link
Contributor

Choose a reason for hiding this comment

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

The change in props is not a breaking change (code that passed Role here would still work)

@@ -97,7 +97,7 @@ export class PipelineDeployStackAction extends cdk.Construct {
/**
* The role used by CloudFormation for the deploy action
*/
public readonly role: iam.Role;
public readonly role: iam.IRole;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a breaking change (code that expects to find Role here now finds something more abstract).

…ons to IRole.

BREAKING CHANGE: this changes the type of the `role` property in CFN CodePipeline Actions
from `Role` to `IRole`.

This is needed to use imported Roles when creating Actions.

Fixes aws#1361
@skinny85 skinny85 force-pushed the feature/irole-in-cfn-actions branch from 0c6e2f3 to e825527 Compare December 17, 2018 22:32
@skinny85
Copy link
Contributor Author

Changed the test according to @eladb's suggestion.

@skinny85 skinny85 merged commit 3d07e48 into aws:master Dec 18, 2018
@skinny85 skinny85 deleted the feature/irole-in-cfn-actions branch December 18, 2018 00:37
@NGL321 NGL321 added the contribution/core This is a PR that came from AWS. label Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CloudFormation CodePipeline Actions should accept IRole instead of Role
4 participants