Skip to content

SNOW-3192362: Fix pyenv version match for plain 3.x also matching free-threaded installs - #3005

Merged
sfc-gh-fpawlowski merged 1 commit into
mainfrom
fix-3.14t-pyenv-pattern-anchor
Aug 18, 2026
Merged

sfc-gh-fpawlowski merged 1 commit into
mainfrom
fix-3.14t-pyenv-pattern-anchor

Conversation

@sfc-gh-fpawlowski

Copy link
Copy Markdown
Contributor

Summary

  • 03630e74 anchored the free-threaded (*t) pyenv-version grep pattern in ci/build_darwin.sh but left the plain-version pattern unanchored.
  • For PYTHON_VERSION=3.14, the resulting pattern ^3\.14 matches both 3.14.0 and 3.14.0t. Combined with the tail -1 selection (needed to prefer the highest free-threaded patch), the plain 3.14 loop iteration now silently resolves to the free-threaded interpreter.
  • Both the 3.14 and 3.14t iterations then build with the same interpreter and write the same-named cp314-cp314t wheel into the shared dist/ dir — the second write overwrites the first, so the regular cp314-cp314 wheel is never produced. This matches the observed S3 output for main build 03630e7414056fe455ef4d7416d57186b75df44c, where every (arch, macOS version) combo has a cp314-cp314t wheel but no cp314-cp314 wheel.
  • Fix: anchor the plain-version pattern the same way the *t branch already is, so 3.14 only matches 3.14/3.14.x and never 3.14.xt.

Test plan

  • bash -n ci/build_darwin.sh — syntax check passes
  • Regex simulation against a fake pyenv versions --bare list containing 3.14.0 and 3.14.0t: plain pattern matches only 3.14.0, *t pattern matches only 3.14.0t
  • On a mac node with pyenv, run ./ci/build_darwin.sh "3.14 3.14t" and confirm two distinct wheels (cp314-cp314 and cp314-cp314t) are produced
  • Re-run the full matrix and confirm the S3 upload contains both wheel variants for every (arch, macOS version) combo

Marked as draft pending the on-node verification above.

…talls

03630e7 anchored the "*t" pyenv-version grep pattern but left the plain
pattern unanchored, so PYTHON_VERSION=3.14 (pattern ^3\.14) matched both
3.14.0 and 3.14.0t. Combined with tail -1, the plain iteration picked the
free-threaded install, causing both the 3.14 and 3.14t loop iterations to
build with the same interpreter and silently overwrite the cp314-cp314
wheel with cp314-cp314t in the shared dist/ dir.

Anchor the plain pattern the same way the *t branch already is, so 3.14
only matches 3.14/3.14.x and never 3.14.xt.
@sfc-gh-fpawlowski sfc-gh-fpawlowski changed the title Fix pyenv version match for plain 3.x also matching free-threaded installs SNOW-3192362: Fix pyenv version match for plain 3.x also matching free-threaded installs Aug 18, 2026
@sfc-gh-fpawlowski
sfc-gh-fpawlowski marked this pull request as ready for review August 18, 2026 08:22
@sfc-gh-fpawlowski
sfc-gh-fpawlowski requested a review from a team as a code owner August 18, 2026 08:22

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

@sfc-gh-fpawlowski
sfc-gh-fpawlowski enabled auto-merge (squash) August 18, 2026 08:26

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

@sfc-gh-fpawlowski
sfc-gh-fpawlowski merged commit cbf2734 into main Aug 18, 2026
51 of 55 checks passed
@sfc-gh-fpawlowski
sfc-gh-fpawlowski deleted the fix-3.14t-pyenv-pattern-anchor branch August 18, 2026 08:30
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants