Skip to content

Fix major.minor comparison in release.yml's hatch-detection check - #15935

Merged
ash2shukla merged 1 commit into
1.latestfrom
fix/release-hatch-version-comparison
Aug 14, 2026
Merged

ash2shukla merged 1 commit into
1.latestfrom
fix/release-hatch-version-comparison

Conversation

@ash2shukla

Copy link
Copy Markdown
Contributor

The use_hatch check compared "major.minor" as a single decimal via bc, so 1.9 (as a decimal) evaluated greater than 1.11, incorrectly routing any 1.x release with a single-digit minor (e.g. 1.9.11) through the hatch build path even though those branches still use setuptools. Compare major and minor as separate integers instead.

Resolves #

Problem

Solution

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

The use_hatch check compared "major.minor" as a single decimal via bc,
so 1.9 (as a decimal) evaluated greater than 1.11, incorrectly routing
any 1.x release with a single-digit minor (e.g. 1.9.11) through the
hatch build path even though those branches still use setuptools.
Compare major and minor as separate integers instead.
@ash2shukla
ash2shukla requested a review from a team as a code owner August 13, 2026 19:40
@cla-bot cla-bot Bot added the cla:yes label Aug 13, 2026
@codecov

codecov Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.52%. Comparing base (7e1c2ff) to head (aa093a7).

Additional details and impacted files
@@            Coverage Diff            @@
##           1.latest   #15935   +/-   ##
=========================================
  Coverage     91.52%   91.52%           
=========================================
  Files           222      222           
  Lines         28265    28265           
=========================================
  Hits          25870    25870           
  Misses         2395     2395           
Flag Coverage Δ
integration 87.82% <ø> (-0.01%) ⬇️
unit 66.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 66.95% <ø> (ø)
Integration Tests 87.82% <ø> (-0.01%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ash2shukla ash2shukla self-assigned this Aug 14, 2026
@ash2shukla
ash2shukla merged commit 95f683e into 1.latest Aug 14, 2026
190 checks passed
@ash2shukla
ash2shukla deleted the fix/release-hatch-version-comparison branch August 14, 2026 05:48

This branch was successfully deployed

1 active deployment
PypiProd — aa093a7e Deployed Aug 14, 2026 by ash2shukla via PyPI Release / prod-pypi-release #494
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants