-
Notifications
You must be signed in to change notification settings - Fork 4k
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: upgrade jsii-pacmak and other jsii tools to 1.106.0 #33057
Conversation
This must be the same version as used by CloudAssemblySchema, otherwise .NET projects cannot pick the right version.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33057 +/- ##
=======================================
Coverage 81.52% 81.52%
=======================================
Files 224 224
Lines 13762 13762
Branches 2414 2414
=======================================
Hits 11220 11220
Misses 2270 2270
Partials 272 272
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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). |
Comments on closed issues and PRs are hard for our team to see. |
After the version upgrade of
@aws-cdk/cloud-assembly-schema
to^39.2.0
in #32998 our cli integration and init tests started failing with the following error in all .NET projects:Reason for this change
This error is documented in the NuGet docs as Example 1.
The .NET CDK project that is created in these tests declares a dependency on depending on
Amazon.CDK.Lib
.Amazon.CDK.Lib
declares a direct dependency onAmazon.JSII.Runtime (>= 1.104.0 && < 2.0.0)
. But it also declares an indirect dependency onAmazon.JSII.Runtime (>= 1.106.0 && < 2.0.0)
through theAmazon.CDK.CloudAssembly.Schema
package:Because of the direct-dependency-wins rule
Amazon.JSII.Runtime (>= 1.104.0 && < 2.0.0)
would be selected. It overrules the distant package and thus causes the package downgrade, which is an error.Why does the issue surface now?
The previous (released) version of
Amazon.CDK.Lib
declares these dependencies (Source):And
Amazon.CDK.CloudAssembly.Schema
v39.0.1 declares this dependency (Source):As you can see, both versions of
Amazon.JSII.Runtime
are the same.The pre-released package of
Amazon.CDK.Lib
however has updated its dependency onAmazon.CDK.CloudAssembly.Schema
to(>= 39.2.0 && < 40.0.0)
. And if we check the distant dependencies for the newer version ofAmazon.CDK.CloudAssembly.Schema
, we get this (Source):This is where the problem stems from.
Root cause
The dependency constraint for
Amazon.JSII.Runtime
is determined by the used version ofjsii-pacmak
in each package. The root cause is that the tested versions ofaws-cdk-lib
and@aws-cdk/cloud-assembly-schema
are build with a different version ofjsii-pacmak
.Description of changes
Update the version of
jsii-pacmak
in all monorepo packages to be the latest version and the same as in@aws-cdk/cloud-assembly-schema
.Describe any new or updated permissions being added
n/a
Description of how you validated changes
Run through the integration test pipeline.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license