vmware / vmware-aria-operations-integration-sdk

The VMware Aria Operations Integration SDK contains libraries, tools, and documentation for developing Management Packs for VMware Aria Operations. It is intended to make creating a Management Pack simple and fast, while allowing developers to use the language of their choice.
https://vmware.github.io/vmware-aria-operations-integration-sdk/
Apache License 2.0
17 stars 6 forks source link

Updates dependency version constraints and regenerates lock file #206

Closed kjrokos closed 1 year ago

kjrokos commented 1 year ago

Best practice for Python package dependency management is to:

  1. Keep a lock file with verified good versions. This is primarily for developers.
  2. Use semantic versioning.
  3. Do not be overly-restrictive when specifying dependencies in the project file. These constraints are what pip will use when resolving versions.

The reason for (3) is:

The downside is if a dependency has a constraint that is too loose, or if a dependency make a breaking change but only bumps (say) the patch version, then things could break unexpectedly.

In our case, we had an issue where a dependency had a too-loose constraint, and when one of its dependencies released a new major version, it broke some functionality.

However, we were also specifying our immediate dependency exactly, and the issue was resolved quickly on the next point release of our dependency. If we had allowed all point release updates, the issue would have been resolved without any effort on our part before we were aware of the problem.

This update loosens version restrictions for our dependencies by using the ^ operator, which generally does the correct thing (dependencies that we added using poetry already had this). This will lock the left-most (non-zero) version number, but allow updates to the right. For example, ^4.0.1 will allow updates to the minor and patch versions, and 0.2.3 will allow updates to the patch version.

This does not replace the need for CI/CD (#156) .

Resolves #175