-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Introduce dependency test suite for runtime closure #8512
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8512 +/- ##
=======================================
Coverage 0.08% 0.08%
=======================================
Files 208 208
Lines 16706 16706
=======================================
Hits 14 14
Misses 16692 16692 ☔ View full report in Codecov by Sentry. |
84833e0
to
0b4524c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit but otherwise looks good.
0b4524c
to
f72ff0b
Compare
The plan is to build out this test suite to test against the AWS CLI's dependencies to help facilitate dependency upgrades. To start, this test suite contains the following new test cases to better monitor the overall dependency closure of the awscli package: * Assert expected packages in runtime closure. This will alert us if a dependency introduces a new transitive depenency to the AWS CLI closure. * Assert expected unbounded dependencies in runtime closure. Specifically these are dependencies that do not have a version ceiling. This will alert us if a new unbounded dependency is introduced into the AWS CLI runtime dependency closure. See additional implementation notes below: * These tests were broken into a separate test suite (i.e. instead of adding them to the unit and functional test suite) to allow more granularity when running them. Specifically, it is useful for: 1. Avoiding the main unit and functional CI test suite from failing if a dependency changes from underneath of us (e.g. a new build dependency is added that we cannot control). 2. For individuals that package the awscli, they generally will not want to run this test suite as it is fairly specific to how pip installs dependencies. * To determine the runtime dependency closure, the Package and DependencyClosure utilities traverse the dist-info METADATA files of the packages installed in the current site packages to build the runtime graph. This approach was chosen because: 1. Since pip already installed the package, this logic avoids having to reconstruct the logic of how pip decides to resolve dependencies to figure out how to traverse the runtime graph. Any custom logic may deviate from how pip behaves which is what most users will be using to install the awscli as a Python package 2. It's faster. The runtime closure test cases do not require downloading or installing any additional packages.
f72ff0b
to
555acb8
Compare
The plan is to build out this test suite to test against the AWS CLI's dependencies to help facilitate dependency upgrades.
To start, this test suite contains the following new test cases to better monitor the overall dependency closure of the awscli package:
Assert expected packages in runtime closure. This will alert us if a dependency introduces a new transitive depenency to the AWS CLI closure.
Assert expected unbounded dependencies in runtime closure. Specifically these are dependencies that do not have a version ceiling. This will alert us if a new unbounded dependency is introduced into the AWS CLI runtime dependency closure.
See additional implementation notes below:
These tests were broken into a separate test suite (i.e. instead of adding them to the unit and functional test suite) to allow more granularity when running them. Specifically, it is useful for:
Avoiding the main unit and functional CI test suite from failing if a dependency changes from underneath of us (e.g. a new build dependency is added that we cannot control).
For individuals that package the
awscli
, they generally will not want to run this test suite as it is fairly specific to how pip installs dependencies.To determine the runtime dependency closure, the
Package
andDependencyClosure
utilities traverse the dist-infoMETADATA
files of the packages installed in the current site packages to build the runtime graph. This approach was chosen because:awscli
as a Python package