Fix pip.installed state managed pre-release upgrades#68526
Fix pip.installed state managed pre-release upgrades#68526kurtrwall wants to merge 4 commits intosaltstack:3006.xfrom
Conversation
16ddd3a to
2a05161
Compare
|
I've been able to trace the bug back to the inception of the code that uses pip index versions, so I based the PR on the v3004.x branch, but I'm unsure if that was the appropriate one. I'm also having a bit of trouble with the tests, but I didn't want it to block the contribution. |
|
We do bug fixes on the olders supported branch where the bug exists. There will be no more releases of 3004 and 3005. The oldest supported branch is 3006.x. Please rebase this PR on 3006.x. |
2a05161 to
7a239d1
Compare
|
Rebased to 3006.x and refactored the test a bit to utililze the new fixtures and provide more coverage. |
6213954 to
2af6443
Compare
|
Hey all, thanks for the quick review of this PR. Out of curiousity, how does the release flow work? Does the bugfix get released to all major versions, i.e. 3006.+1, 3007.+1? |
|
I'm an on-prem gitlab user by trade, so I'm unsure of how these checks can be run/verified on my end. I think they've been corrected based on my testing, but apologies if my ignorance has prolonged this. Does this look okay now? I've followed the contributing documentation, but if there's something else I should be doing to verify these changes so we can get this into a release, I'm all ears. Thanks. |
`pip index versions` will never yield pre-release versions of the package without the `--pre` option. In effect, this means providing `pre_releases=True` and `upgrade=True` to the `pip.installed` state will never work, but I'm unsure of the actual extent of this bug.
78cafe6 to
a9f8e69
Compare
|
Just install pre-commit ( |
|
Okay, sounds like I had the right setup for the most recent push. Glad to see it's approved! Thank you. |
|
still need to see passing tests |
What does this PR do?
What issues does this PR fix or reference?
Fixes #68525
Previous Behavior
Python packages installed in an environment would not upgrade to their pre-release version when any exist in the index.
New Behavior
Pre-release versions of packages managed by
pip.installedstate are upgraded when usingupgrade=Trueandpre_releases=True.Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No