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

chore(awslint): rules permit constructs to extend from 'constructs' module #10472

Merged
merged 14 commits into from
Sep 23, 2020

Conversation

nija-at
Copy link
Contributor

@nija-at nija-at commented Sep 22, 2020

Introduce an environment variable - AWSLINT_BASE_CONSTRUCT
recognized by awslint. This environment variable indicates that the
module has migrated away from construct classes and
interfaces from @aws-cdk/core module to those in constructs
module.

Specific rules in the linter recognize this variable and modify their
expectations.

Motivation
The primary motivation is to move the code base towards removal of the
construct compat layer
as part of CDKv2.

A large number of code changes to adopt "constructs" module can already
be done as part of CDKv1 without incurring breaking changes to the API.

This change enables these changes to be performed module-by-module. As
modules are migrated, this flag will be enabled, to ensure no
regression.


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

@nija-at nija-at self-assigned this Sep 22, 2020
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 22, 2020
@nija-at nija-at requested a review from a team September 22, 2020 10:47
@nija-at nija-at marked this pull request as ready for review September 22, 2020 10:47
@nija-at nija-at requested a review from eladb September 22, 2020 10:47
@nija-at nija-at force-pushed the nija-at/change-construct-interface branch from 0b63043 to c2a8405 Compare September 22, 2020 11:45
packages/@aws-cdk/aws-s3/package.json Outdated Show resolved Hide resolved
packages/@aws-cdk/core/lib/resource.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/core/package.json Show resolved Hide resolved
packages/awslint/README.md Outdated Show resolved Hide resolved
packages/awslint/lib/rules/construct.ts Outdated Show resolved Hide resolved
@nija-at nija-at requested review from eladb and a team September 22, 2020 13:34
Niranjan Jayakar added 5 commits September 23, 2020 10:38
@nija-at nija-at changed the title feat(awslint): rules permit constructs to extend from 'constructs' module chore(awslint): rules permit constructs to extend from 'constructs' module Sep 23, 2020
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Lgtm. Minor comments (added do-not-merge)

packages/awslint/lib/rules/construct.ts Show resolved Hide resolved
packages/awslint/lib/rules/construct.ts Show resolved Hide resolved
packages/awslint/lib/rules/core-types.ts Show resolved Hide resolved
packages/awslint/lib/rules/imports.ts Show resolved Hide resolved
@eladb eladb added the pr/do-not-merge This PR should not be merged at this time. label Sep 23, 2020
@nija-at nija-at removed the pr/do-not-merge This PR should not be merged at this time. label Sep 23, 2020
@mergify
Copy link
Contributor

mergify bot commented Sep 23, 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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: e5996d8
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

mergify bot commented Sep 23, 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 c179699 into master Sep 23, 2020
@mergify mergify bot deleted the nija-at/change-construct-interface branch September 23, 2020 14:26
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.

3 participants