Skip to content

feat(aws-cdk-lib): aws-cdk-lib assembly file is compressed#21481

Merged
mergify[bot] merged 7 commits intomainfrom
conroy/finalcompress2
Aug 8, 2022
Merged

feat(aws-cdk-lib): aws-cdk-lib assembly file is compressed#21481
mergify[bot] merged 7 commits intomainfrom
conroy/finalcompress2

Conversation

@kaizencc
Copy link
Copy Markdown
Contributor

@kaizencc kaizencc commented Aug 5, 2022

This is part of the Reduce Package Size project. Assembly compression is supported in jsii v1.64.0 (see this jsii PR for details + discussion about how compressed assemblies are handled). This PR includes the following:

  • --compress-assembly flag turned on for aws-cdk-lib only
  • run-rosetta.sh depends on cdk-generate-synthetic-examples@^0.1.14 which is the minimum version with compressed assembly support.

This --compress-assembly flag was tested in the following way:

  • this branch was pushed to test-main-pipeline and successfully built in the test pipeline.
  • the build artifact was downloaded from s3, unzipped, and verified to have the correct .jsii and .jsii.gz structure in both TypeScript and Python.
  • the build artifact was used to synth and deploy basic CDK apps in TypeScript and Python.
  • the build artifact was privately published to a codeartifact repository.
  • the codeartifact repository was used as a source to a local instance of construct hub.
  • verified that the published library was ingested correctly by the ingestion lambda and shows up on construct hub.
  • verified (via eye test, nothing too rigorous) that documentation was generated correctly on construct hub, including generated examples.

On code artifact, the package size shows up as 54 MB, compared to 194 MB, which is the size of the current package in npm.


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

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


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

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 Aug 5, 2022

@github-actions github-actions bot added the p2 label Aug 5, 2022
@kaizencc kaizencc marked this pull request as draft August 5, 2022 15:46
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 5, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team August 5, 2022 15:47
@TheRealAmazonKendra
Copy link
Copy Markdown
Contributor

Is there any reasonable/viable way to add tests in code for this? If no, that's fine.

@TheRealAmazonKendra TheRealAmazonKendra added the pr/do-not-merge This PR should not be merged at this time. label Aug 5, 2022
@kaizencc kaizencc changed the title chore(aws-cdk-lib): compress assembly file feat(aws-cdk-lib): aws-cdk-lib assembly file is compressed Aug 5, 2022
@kaizencc kaizencc added pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes pr-linter/exempt-integ-test The PR linter will not require integ test changes labels Aug 5, 2022
@kaizencc
Copy link
Copy Markdown
Contributor Author

kaizencc commented Aug 5, 2022

Upgrading this to a feat so that it will show up in the changelog, adding all the requisite tags to make that possible.

@kaizencc kaizencc marked this pull request as ready for review August 5, 2022 21:03
@kaizencc kaizencc requested a review from RomainMuller August 5, 2022 21:03
@kaizencc kaizencc added p1 and removed pr/do-not-merge This PR should not be merged at this time. p2 labels Aug 8, 2022
@kaizencc
Copy link
Copy Markdown
Contributor Author

kaizencc commented Aug 8, 2022

@Mergifyio refresh

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 8, 2022

refresh

✅ Pull request refreshed

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 8, 2022

Thank you for contributing! Your pull request will be updated from main 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
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: ebef83e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 0767873 into main Aug 8, 2022
@mergify mergify bot deleted the conroy/finalcompress2 branch August 8, 2022 16:19
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 8, 2022

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

kaizencc added a commit that referenced this pull request Aug 8, 2022
This is part of the Reduce Package Size [project](https://github.com/aws/aws-cdk/projects/15). Assembly compression is supported in jsii v1.64.0 (see this jsii [PR](aws/jsii#3570) for details + discussion about how compressed assemblies are handled). This PR includes the following:

- `--compress-assembly` flag turned on for `aws-cdk-lib` only
- `run-rosetta.sh` depends on `cdk-generate-synthetic-examples@^0.1.14` which is the minimum version with compressed assembly [support](cdklabs/cdk-generate-synthetic-examples#16).

----

This `--compress-assembly` flag was tested in the following way:

- this branch was pushed to `test-main-pipeline` and successfully built in the test pipeline.
- the build artifact was downloaded from s3, unzipped, and verified to have the correct `.jsii` and `.jsii.gz` structure in both TypeScript and Python.
- the build artifact was used to synth and deploy basic CDK apps in TypeScript and Python.
- the build artifact was privately published to a codeartifact repository.
- the codeartifact repository was used as a source to a local instance of construct hub.
- verified that the published library was ingested correctly by the ingestion lambda and shows up on construct hub.
- verified (via eye test, nothing too rigorous) that documentation was generated correctly on construct hub, including generated examples.

----

On code artifact, the package size shows up as 54 MB, compared to 194 MB, which is the size of the current package in npm.

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

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


----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
jmortlock pushed a commit to jmortlock/aws-cdk that referenced this pull request Aug 8, 2022
This is part of the Reduce Package Size [project](https://github.com/aws/aws-cdk/projects/15). Assembly compression is supported in jsii v1.64.0 (see this jsii [PR](aws/jsii#3570) for details + discussion about how compressed assemblies are handled). This PR includes the following:

- `--compress-assembly` flag turned on for `aws-cdk-lib` only
- `run-rosetta.sh` depends on `cdk-generate-synthetic-examples@^0.1.14` which is the minimum version with compressed assembly [support](cdklabs/cdk-generate-synthetic-examples#16).

----

This `--compress-assembly` flag was tested in the following way:

- this branch was pushed to `test-main-pipeline` and successfully built in the test pipeline.
- the build artifact was downloaded from s3, unzipped, and verified to have the correct `.jsii` and `.jsii.gz` structure in both TypeScript and Python.
- the build artifact was used to synth and deploy basic CDK apps in TypeScript and Python.
- the build artifact was privately published to a codeartifact repository.
- the codeartifact repository was used as a source to a local instance of construct hub.
- verified that the published library was ingested correctly by the ingestion lambda and shows up on construct hub.
- verified (via eye test, nothing too rigorous) that documentation was generated correctly on construct hub, including generated examples.

----

On code artifact, the package size shows up as 54 MB, compared to 194 MB, which is the size of the current package in npm.

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

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


----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*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

contribution/core This is a PR that came from AWS. p1 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants