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(codepipeline): set correct prop names for KMS key #2517

Closed
wants to merge 1 commit into from

Conversation

CaerusKaru
Copy link
Contributor

It seems like this might actually be a bug in the serialization
generator, since the return object doesn't require this to generate
the correct Cfn syntax

Not sure where to look for that though. In the meantime, this fixes
the issue where Cfn will spit out an error for Encountered unsupported property type


Pull Request Checklist

  • Testing
    • Unit test added (prefer not to modify an existing test, otherwise, it's probably a breaking change)
    • CLI change?: coordinate update of integration tests with team
    • cdk-init template change?: coordinated update of integration tests with team
  • Docs
    • jsdocs: All public APIs documented
    • README: README and/or documentation topic updated
    • Design: For significant features, design document added to design folder
  • Title and Description
    • Change type: title prefixed with fix, feat and module name in parens, which will appear in changelog
    • Title: use lower-case and doesn't end with a period
    • Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
    • Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"
  • Sensitive Modules (requires 2 PR approvers)
    • IAM Policy Document (in @aws-cdk/aws-iam)
    • EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
    • Grant APIs (only if not based on official documentation with a reference)

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

It seems like this might actually be a bug in the serialization
generator, since the return object doesn't require this to generate
the correct Cfn syntax

Not sure where to look for that though. In the meantime, this fixes
the issue where Cfn will spit out an error for `Encountered unsupported property type`
@CaerusKaru CaerusKaru requested review from RomainMuller, skinny85 and a team as code owners May 10, 2019 04:56
@skinny85
Copy link
Contributor

Thanks for the contribution @CaerusKaru , but this is not the correct solution. See the CI error:

@aws-cdk/aws-codepipeline: lib/pipeline.ts:535:9 - error TS2322: Type '{ Type: string; Id: string; }' is not assignable to type 'EncryptionKeyProperty'.
@aws-cdk/aws-codepipeline:   Object literal may only specify known properties, but 'Type' does not exist in type 'EncryptionKeyProperty'. Did you mean to write 'type'?
@aws-cdk/aws-codepipeline: 535         Type: 'KMS',
@aws-cdk/aws-codepipeline:             ~~~~~~~~~~~

@CaerusKaru
Copy link
Contributor Author

@skinny85 Can you advise on the correct solution? There is clearly a bug, but I genuinely think that it's in the serialization, and not here (as CI clearly shows).

@rix0rrr
Copy link
Contributor

rix0rrr commented May 20, 2019

Please wait until #2576 has been applied and see if the error still persists.

@eladb
Copy link
Contributor

eladb commented May 30, 2019

Any updates on this?

@skinny85
Copy link
Contributor

I'm going to close this, as #3694 addresses the issue this PR was opened for.

@skinny85 skinny85 closed this Aug 17, 2019
@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2019

Pull Request Checklist

  • Testing
  • Unit test added (prefer to add a new test rather than modify existing tests)
  • CLI change? Re-run/add CLI integration tests
  • Documentation
  • Inline docs: make sure all public APIs are documented (copy & paste from official AWS docs)
  • README: update module README
  • Design: for significant features, follow the design process
  • Title uses the format type(scope): text
  • Type: fix, feat, refactor go into CHANGELOG, chore is hidden
  • Scope: name of the module without the aws- or cdk- prefix or postfix (e.g. s3 instead of aws-s3-deployment)
  • Style: use all lower-case, do not end with a period
  • Description
  • Rationale: describe rationale of change and approach taken
  • Issues: Indicate issues fixed via: fixes #xxx or closes #xxx
  • Breaking?: last paragraph: BREAKING CHANGE: <describe what changed + link for details>
  • Sensitive Modules (requires 2 PR approvers)
  • IAM document library (in @aws-cdk/aws-iam)
  • EC2 security groups and ACLs (in @aws-cdk/aws-ec2)
  • Grant APIs (if not based on official documentation with a reference)

@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2019

Codebuild (Continuous Integration) build failed for current commits. Please check log and resolve before PR is merged.

@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2019

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@CaerusKaru CaerusKaru deleted the patch-1 branch August 17, 2019 01:07
skinny85 added a commit that referenced this pull request Sep 11, 2019
This changes the scaffolding stack logic for the cross-region CodePipelines to include a KMS key and alias as part of it, which are required if an action is simultaneously cross-region and cross-account. We also change to use the KMS key ID instead of the key ARN when rendering the ArtifactStores property.

We also add an alias to the default pipeline artifact bucket.

This required a bunch of changes to the KMS and S3 modules:

* Alias now implements IKey
* Added the keyId property to IKey
* Added removalPolicy property to Alias
* Granting permissions to a key works if the principal belongs to a stack that is a dependent of the key stack
* Allow specifying a key when importing a bucket

Fixes #52
Concerns #1584
Fixes #2517
Fixes #2569
Concerns #3275
Fixes #3138
Fixes #3388
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.

4 participants