Skip to content

chore(aws-cdk-lib): extract experimental L2s from aws-cdk-lib #14135

Merged
mergify[bot] merged 25 commits intomasterfrom
neta/remove-unstable
Apr 19, 2021
Merged

chore(aws-cdk-lib): extract experimental L2s from aws-cdk-lib #14135
mergify[bot] merged 25 commits intomasterfrom
neta/remove-unstable

Conversation

@NetaNir
Copy link
Copy Markdown
Contributor

@NetaNir NetaNir commented Apr 13, 2021

This PR adds logic to extract the L2 of experimental modules from aws-cdk-lib. The reason for keeping the L1s of experimental modules is twofold:

  1. Removing the L1 means that modules with an experimental L2 are in a disadvantage in comparison to modules that does not have an L2.
  2. CfnInclude requires the L1.

The main logic was added in ubergen. If the monolithic package includes the key ubergen.stripExperimental in its package.json file, experimental modules source files will not be copied, instead we execute cfn2ts to regenerate the L1.

Testing

  1. Added a post-package script -verify-stripped-exp.js, to aws-cdk-lib. The script will install the tarball and verify that only L1 files are includes in experimental modules.

  2. verified that the generated tarball can be used with a consumer application, and that experimental modules are working properly.

adding do-not-merege as some stable modules still depends on experimental modules, the work to remove these dependencies is in progress.

Unrelated callout

We found a bug in a util function copied from ubergen, this PR adds a fix to both code path, but clearly this copy-pasta is not a great mechanism. This kind of copied util scripts is prevalent across our repo and we don't yet have a mechnisam to share sure common runtime functionally between modules. Not sure what is the right solution here but wanted to call it out, in case someone has a fix/methodology I have missed.


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

@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Apr 13, 2021

@NetaNir NetaNir marked this pull request as draft April 13, 2021 09:15
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Apr 13, 2021
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 13, 2021
@NetaNir NetaNir added the pr/do-not-merge This PR should not be merged at this time. label Apr 14, 2021
@NetaNir NetaNir marked this pull request as ready for review April 14, 2021 06:53
@NetaNir NetaNir requested review from a team and nija-at April 14, 2021 06:56
@NetaNir NetaNir force-pushed the neta/remove-unstable branch from f0df306 to d29a2a2 Compare April 15, 2021 04:23
@NetaNir NetaNir requested a review from nija-at April 15, 2021 04:41
@NetaNir NetaNir force-pushed the neta/remove-unstable branch from a0357d3 to b32dd03 Compare April 16, 2021 00:49
NetaNir and others added 2 commits April 19, 2021 02:00
Co-authored-by: Niranjan Jayakar <nija@amazon.com>
Co-authored-by: Niranjan Jayakar <nija@amazon.com>
@NetaNir NetaNir removed the pr/do-not-merge This PR should not be merged at this time. label Apr 19, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 19, 2021

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
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 19, 2021

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 f8b6445 into master Apr 19, 2021
@mergify mergify bot deleted the neta/remove-unstable branch April 19, 2021 09:52
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 94811c5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
)


This PR adds logic to extract the L2 of experimental modules from `aws-cdk-lib`.  The reason for keeping the L1s of experimental modules is twofold: 

1. Removing the L1 means that modules with an experimental L2 are in a disadvantage in comparison to modules that does not have an L2. 
2. `CfnInclude` requires the L1.

The main logic was added in `ubergen`. If the monolithic package includes the key `ubergen.stripExperimental` in its `package.json` file, experimental modules source files will not be copied, instead we  execute `cfn2ts` to regenerate the L1.

#### Testing

1. Added a post-package script -`verify-stripped-exp.js`, to `aws-cdk-lib`. The script will install the tarball and verify that only L1 files are includes in experimental modules. 

2. verified that the generated tarball can be used with a consumer application, and that experimental modules are working properly.

adding `do-not-merege` as some stable modules still depends on experimental modules, the work to remove these dependencies is in progress.

#### Unrelated callout

We found a bug in a util function copied from `ubergen`, this PR adds a fix to both code path, but clearly this copy-pasta is not a great mechanism. This kind of copied util scripts is prevalent across our repo and we don't yet have a mechnisam to share sure common runtime functionally between modules. Not sure what is the right solution here but wanted to call it out, in case someone has a fix/methodology I have missed.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws-cdk-lib Related to the aws-cdk-lib package contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants