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

Pin botocore dependency to a minor version range (like boto3) rather than an exact patch version #5563

Closed
javulticat opened this issue Sep 22, 2020 · 2 comments
Labels
closed-for-staleness feature-request A feature should be added or improved. installation p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@javulticat
Copy link

Is your feature request related to a problem? Please describe.
awscli pins its botocore dependency to an exact patch version. For example, awscli==1.18.143 requires botocore==1.18.2. However, boto3 handles its botocore dependency in a different (and, seemingly, better) way, by pinning it to a range representing the current patch version up to the next minor version. For example, boto3==1.15.2 requires botocore>=1.18.2,<1.19.0. The effect that this ends up having is that for projects which depend on both awscli and boto3, awscli must always be updated before boto3 can be updated, for what seems like no necessary technical reason, in order for dependency resolution using common tools like pipenv (21k stars) to succeed.

And while this can be somewhat worked around in certain projects (by explicitly pinning versions of awscli and boto3, and making sure to update awscli before updating boto3), it becomes much more arduous if your project also relies on a 3rd party dependency which does not explicitly pin a version of boto3. For example, the latest version of the popular (4k stars) library moto==1.3.16 requires boto3>=1.9.201, which causes the transitive boto3 dependency identified by a tool like pipenv to always be the latest version of boto3. As we've established, attempting to resolve dependencies using a newer version of boto3 than awscli will always fail, so the end result of this is that anytime a new release of boto3/awscli is released (which is nearly every day), if using a 3rd party which has an unpinned transitive dependency on boto3, all dependency resolution using a tool like pipenv begins failing, even for completely unrelated dependencies, until awscli has been updated.

For example, here is the dependency resolution error we began receiving from pipenv yesterday upon the release of new boto3/awscli versions:

There are incompatible versions in the resolved dependencies:
  botocore<1.19.0,>=1.18.2 (from boto3==1.15.2->moto==1.3.16)
  botocore<2.0a.0,>=1.12.36 (from s3transfer==0.3.3->awscli==1.18.142)
  botocore==1.18.1 (from awscli==1.18.142)
  botocore>=1.11.3 (from aws-xray-sdk==2.6.0->moto==1.3.16)
  botocore>=1.12.201 (from moto==1.3.16)

And, for clarity, here is what our dependencies looked like in our Pipfile yesterday:

awscli==1.18.142
boto3==1.15.1
moto==1.3.16

And while manually updating our dependency pin to awscli==1.18.143 resolved the issue for the day, it will return when 1.18.144 is released, presumably, later today.

Describe the solution you'd like
For awscli to pin its botocore dependency the same way boto3 does - to a range including all future patch versions of the same minor version. This will at least limit this occurrence from happening nearly every day, to only happening when a new minor release of botocore is created.

So instead of:

  • awscli==1.18.143 requiring botocore==1.18.2
  • awscli==1.18.143 should require botocore>=1.18.2,<1.19.0 (which is the same botocore requirement that the corresponding boto3==1.15.2 release has)

Describe alternatives you've considered
As mentioned, in the case outlined, the alternative is to manually update awscli every time there is a new patch release (which is almost every day) before being able to successfully resolve dependencies via common dependency resolution tools such as pipenv.

@javulticat javulticat added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 22, 2020
@kdaily kdaily added installation and removed needs-triage This issue or PR still needs to be triaged. labels Oct 1, 2020
@tim-finnigan
Copy link
Contributor

I think this issue overlaps with #5173 and should maybe be closed in favor of that issue which has more activity. As mentioned there, #6854 was also opened to gauge interest in aligning CLI/botocore minor versions but it was closed to a lack of engagement. (There is another related issue, #5943, involving third party dependencies). Please let us know if there are any distinctions you'd like to make regarding this feature request and those other issues.

@tim-finnigan tim-finnigan added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p3 This is a minor priority issue labels Nov 1, 2022
@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Nov 6, 2022
@github-actions github-actions bot closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness feature-request A feature should be added or improved. installation p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants