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(cloudformation-diff): use awscdk-service-spec as data source #27813

Merged

Conversation

mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Nov 2, 2023

We already changed the datasource for generated resource to use @aws-cdk/awscdk-service-spec.
However cloudformation-diff was still using the old data source.

This PR swaps out the source, with minimal further changes.
Hence no additional tests are required.

Note that this new implementation does not apply temporary-schemas defined in spec2cdk.
This is because temporary-schemas is a mechanism to unblock development of unreleased features, and not a mechanism to publish schema changes.
For the latter, changes must be made in cdklabs/awscdk-service-spec.

I ran a local benchmark and cdk diff is now running ~1.03 slower than before.
I investigated why and this appears to be mostly due to the gzip compression of the database file.
If we load the DB from an uncompressed source, the new code path performs ~1.07 times faster than the old code path. This trade-off is acceptable.

Compressed package size of aws-cdk is reducing with this change from 11.7MB to 8.9MB


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

@github-actions github-actions bot added the p2 label Nov 2, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team November 2, 2023 16:28
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 2, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@mrgrain mrgrain force-pushed the mrgrain/feat/cloudformation-diff-to-use-new-servicespec branch from 3ac396d to df120c2 Compare November 3, 2023 12:45
@mrgrain mrgrain 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 Nov 3, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review November 3, 2023 13:20

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@mrgrain mrgrain force-pushed the mrgrain/feat/cloudformation-diff-to-use-new-servicespec branch 2 times, most recently from bff13b6 to a103043 Compare November 3, 2023 13:34
@mrgrain mrgrain force-pushed the mrgrain/feat/cloudformation-diff-to-use-new-servicespec branch 3 times, most recently from e6d4c09 to 3dc78f7 Compare November 6, 2023 12:22
@mrgrain mrgrain marked this pull request as ready for review November 6, 2023 12:22
@mrgrain mrgrain force-pushed the mrgrain/feat/cloudformation-diff-to-use-new-servicespec branch 2 times, most recently from 5932514 to 97f9dc8 Compare November 6, 2023 12:27
@mrgrain mrgrain force-pushed the mrgrain/feat/cloudformation-diff-to-use-new-servicespec branch from 97f9dc8 to 3bd52d9 Compare November 6, 2023 12:28
@mrgrain mrgrain added the pr/do-not-merge This PR should not be merged at this time. label Nov 6, 2023
@mrgrain mrgrain removed the pr/do-not-merge This PR should not be merged at this time. label Nov 6, 2023
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Copy link
Contributor

mergify bot commented Nov 6, 2023

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).

@mergify mergify bot merged commit aac52e5 into main Nov 6, 2023
15 checks passed
@mergify mergify bot deleted the mrgrain/feat/cloudformation-diff-to-use-new-servicespec branch November 6, 2023 15:38
mergify bot pushed a commit that referenced this pull request Nov 30, 2023
…e_modules/@aws-cdk/integ-runner/lib/workers/db.json.gz'" (#28199)

After #27813 the `deploy` action was broken with the above error. This is effectively the same as #27983 .

To ensure these kind of issues are not slipping through again, the PR is adding a basic testing harness for `cli-lib` to `@aws-cdk-testing/cli-integtests`.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
chenjane-dev pushed a commit to chenjane-dev/aws-cdk that referenced this pull request Dec 5, 2023
…e_modules/@aws-cdk/integ-runner/lib/workers/db.json.gz'" (aws#28199)

After aws#27813 the `deploy` action was broken with the above error. This is effectively the same as aws#27983 .

To ensure these kind of issues are not slipping through again, the PR is adding a basic testing harness for `cli-lib` to `@aws-cdk-testing/cli-integtests`.

----

*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. p2 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.

3 participants