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(core): new APIs for Aspects and Tags #9558

Merged
merged 3 commits into from
Aug 10, 2020
Merged

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Aug 10, 2020

In CDK 2.0, the applyAspect API will be removed and instead will be accessible through a "trait" pattern:

Aspects.of(scope).add(aspect)

Similarly, we are normalizing the tagging API to use the same pattern:

Tags.of(scope).add(x, y)
Tags.of(scope).remove(x)

The existing APIs are still supported but marked as @deprecated.

Related: aws/aws-cdk-rfcs#192, See Design.


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

In [CDK 2.0], the `applyAspect` API will be removed and instead will be accessible through a "trait" pattern:

    Aspects.of(scope).add(aspect)

Similarly, we are normalizing the tagging API to use the same pattern:

    Tags.of(scope).add(x, y)
    Tags.of(scope).remove(x)
    
The existing APIs are still supported but marked as @deprecated.

Related: aws/aws-cdk-rfcs#192

[CDK 2.0]: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md
@eladb eladb requested a review from a team August 10, 2020 07:11
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 10, 2020
@eladb eladb added the pr-linter/exempt-readme The PR linter will not require README changes label Aug 10, 2020
@eladb eladb self-assigned this Aug 10, 2020
@jogold
Copy link
Contributor

jogold commented Aug 10, 2020

Update here also?

resource.construct.node.applyAspect(this.backupableResourcesCollector);

@mergify
Copy link
Contributor

mergify bot commented Aug 10, 2020

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

@mergify mergify bot merged commit a311428 into master Aug 10, 2020
@mergify mergify bot deleted the benisrae/new-aspects-api branch August 10, 2020 12:11
eladb pushed a commit that referenced this pull request Aug 10, 2020
In [CDK 2.0], the `applyAspect` API will be removed and instead will be accessible through a "trait" pattern:

    Aspects.of(scope).add(aspect)

Similarly, we are normalizing the tagging API to use the same pattern:

    Tags.of(scope).add(x, y)
    Tags.of(scope).remove(x)
    
The existing APIs are still supported but marked as @deprecated.

Related: aws/aws-cdk-rfcs#192, See [Design].

[CDK 2.0]: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md
[Design]: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#02-aspects

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 9b0301c
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@eladb
Copy link
Contributor Author

eladb commented Aug 10, 2020

Update here also?

resource.construct.node.applyAspect(this.backupableResourcesCollector);

Planning to update the AWS Construct Library in a separate PR.

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. pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants