Skip to content

tests: Fix version picking in toxgen #4323

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

Merged
merged 2 commits into from
Apr 23, 2025
Merged

tests: Fix version picking in toxgen #4323

merged 2 commits into from
Apr 23, 2025

Conversation

sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Apr 23, 2025

Toxgen should only consider the highest patch release of each major.minor version. For the most part this was working fine as long as the releases were ordered as expected in PyPI, but in cases where a lower patch version succeeded a higher patch version in the release list from PyPI, we would incorrectly consider the lower patch version as well, instead of ignoring it in favor of the higher patch.

Example:

  • we pull releases [1.2.3, 1.2.4, 1.2.5, 1.2.2] from PyPI (in that order)
  • we consolidate 1.2.3, 1.2.4, 1.2.5 into one version, 1.2.5, as expected
  • 1.2.2 will not disappear into 1.2.5 because of a faulty check in toxgen and will instead be considered as a new version
  • our resulting list of releases eligible for testing will be [1.2.5, 1.2.2] instead of just [1.2.5], which then results in picking versions that are not nicely spaced apart

Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.30%. Comparing base (b96e2b6) to head (e01978a).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4323      +/-   ##
==========================================
- Coverage   80.31%   80.30%   -0.01%     
==========================================
  Files         142      142              
  Lines       15930    15930              
  Branches     2725     2725              
==========================================
- Hits        12794    12793       -1     
  Misses       2262     2262              
- Partials      874      875       +1     

see 1 file with indirect coverage changes

@sentrivana sentrivana marked this pull request as ready for review April 23, 2025 08:03
@sentrivana sentrivana requested a review from a team as a code owner April 23, 2025 08:03
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@sentrivana sentrivana merged commit 434e8af into master Apr 23, 2025
141 checks passed
@sentrivana sentrivana deleted the ivana/fix-toxgen branch April 23, 2025 08:54
sentrivana added a commit that referenced this pull request Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants