Skip to content

fix(ci,python): skip floating v1 tag in release changelog; fail sdist wheel builds without libgosqlx - #852

Merged
ajitpratap0 merged 2 commits into
mainfrom
fix/release-tag-match-and-sdist-guard
Oct 22, 2026
Merged

ajitpratap0 merged 2 commits into
mainfrom
fix/release-tag-match-and-sdist-guard

Conversation

@ajitpratap0

Copy link
Copy Markdown
Owner

Summary

Follow-up to #851, addressing the two low-severity review notes left open:

  1. release.yml previous-tag lookup could pick the v1 Marketplace tag. git describe --match 'v[0-9]*' matches the floating major tag v1 (moved with git tag -fa v1 per MARKETPLACE_PUBLISHING.md). If it ever sits closer than the last real release, GoReleaser would build the changelog and compare link against it. The match is now v[0-9]*.[0-9]*.[0-9]*, which covers all 27 existing release tags and excludes v1.
  2. Installing from the sdist on an unsupported platform silently produced a broken package. On musl/32-bit, pip builds a wheel from the sdist without libgosqlx, caches it and installs it; the only signal was a stderr warning pip hides by default, and pygosqlx failed at first use. PlatformWheel.run now fails the build with an actionable error. PYGOSQLX_ALLOW_MISSING_LIB=1 opts back into the old behaviour for users who supply GOSQLX_LIB_PATH at runtime. README documents it.

Test Plan

  • git tag -l 'v[0-9]*.[0-9]*.[0-9]*' → 27 tags, all vX.Y.Z; v1 excluded (old pattern included it).
  • sdist → pip wheel with no library: fails with the new error message.
  • Same with PYGOSQLX_ALLOW_MISSING_LIB=1: builds.
  • pip install -e "python[dev]" without the library (Python CI path): unaffected (editable builds don't run bdist_wheel).
  • Built libgosqlx.dylib, pip install python/, pytest: 184 passed, 3 skipped.
  • cibuildwheel jobs always build the library first (CIBW_BEFORE_BUILD_*), so release wheels are unaffected; CI on this PR confirms.

Breaking Changes

None for supported platforms. On platforms without a prebuilt wheel, pip install pygosqlx now errors at build time instead of installing a package that cannot load.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

… wheel builds without libgosqlx

- release.yml: `git describe --match 'v[0-9]*'` also matched the floating
  Marketplace major tag `v1`, so moving it (`git tag -fa v1`) could make
  GoReleaser diff against the wrong release. Require MAJOR.MINOR.PATCH.
- python/setup.py: building a wheel from the sdist on a platform with no
  prebuilt wheel (musl, 32-bit) produced and cached a wheel without the
  native library; the only signal was a stderr warning pip hides. Fail the
  build with an actionable error instead. PYGOSQLX_ALLOW_MISSING_LIB=1 keeps
  the old behaviour for users who supply GOSQLX_LIB_PATH at runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
gosqlx-website Ignored Ignored Preview Oct 22, 2026 10:02am UTC

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Claude finished @ajitpratap0's task in 23s —— View job


Review of PR #852

Both changes are small and correct. I only read the diff and ran nothing.

release.yml: tag match

  • v[0-9]*.[0-9]*.[0-9]* is a git glob, where * also matches .. It therefore excludes v1 and v1.2, and still matches prerelease tags such as v1.14.0-rc1.
  • It also keeps ignoring pygosqlx-* tags. The added comment explains why.

python/setup.py: fail the build when the library is missing

  • Failing in bdist_wheel.run is the right place. It fits what you tested: editable installs and cibuildwheel, which builds the library first, are unaffected.
  • Nit, lint: the diff removes one of the two blank lines before setup(...), so there is now only one. flake8 E305 and black will flag this if Python lint runs on python/. Restore the second blank line.
  • Nit, exception type: raise SystemExit(f"error: ...") works, and pip shows the message. Raising distutils.errors.DistutilsSetupError (or setuptools.errors.BaseError) is the more conventional way to fail a setuptools command. It also avoids unwinding through a backend that might catch SystemExit differently. Not blocking.
  • The check only looks at _LIB_DIR for .so, .dylib or .dll. It does not check that the extension matches the current platform, so a stale .dylib left in lib/ on Linux would pass. This was already the case before the PR, and the build.sh flow makes it unlikely.
  • PYGOSQLX_ALLOW_MISSING_LIB must be exactly "1". That's fine, and the README says so. It's worth noting that pip passes the environment through to the isolated build, so the opt-in works with pip install.

python/README.md

  • The sentence ending "set PYGOSQLX_ALLOW_MISSING_LIB=1 for the install and:" runs into a code block that only shows export GOSQLX_LIB_PATH=.... Consider showing both variables in the block, for example:
    PYGOSQLX_ALLOW_MISSING_LIB=1 pip install pygosqlx
    export GOSQLX_LIB_PATH=/path/to/libgosqlx.so

Tests

  • Your manual checks cover the new behavior. There is no automated test for the "missing library → error, and the env var → warning" paths. A small pytest that runs bdist_wheel on a temp copy with lib/ empty would guard against regressions. It's optional, since the CI wheel jobs only exercise the success path.

Security and performance: nothing to flag.

Overall this is good to merge after the blank-line fix.
· branch fix/release-tag-match-and-sdist-guard

…n README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Claude finished @ajitpratap0's task in 20s —— View job


Review of PR #852

I read the full diff against origin/main and ran nothing.

Previous nits are addressed

  • The README block now shows both PYGOSQLX_ALLOW_MISSING_LIB=1 pip install pygosqlx and export GOSQLX_LIB_PATH=....
  • The blank-line change from the last commit is in. The setup.py diff no longer touches the lines before setup(...).

release.yml

  • v[0-9]*.[0-9]*.[0-9]* excludes v1 and pygosqlx-* tags. It still matches prerelease tags such as v1.14.0-rc1.
  • The comment explains why the pattern has two dots.

python/setup.py

  • Failing in bdist_wheel.run is the right place. Editable installs and cibuildwheel, which builds the library first, are unaffected.
  • The message names the cause, the fix and the opt-in. In the ALLOW_MISSING_LIB=1 case it keeps the old warning.
  • Non-blocking: raise SystemExit(...) works, but setuptools.errors.BaseError or distutils.errors.DistutilsSetupError is the more conventional way to fail a setuptools command. A backend that catches SystemExit could handle it differently.
  • Non-blocking: the check only looks for any of .so, .dylib or .dll in lib/. It doesn't check that the extension matches the platform, so a stale library of the wrong type would pass. That was already true before this PR.
  • Non-blocking: the opt-in needs exactly "1". The README says so, so that's fine.

Tests

  • There is no automated test for the "missing library raises" path or the opt-in path. Your manual checks cover them. A small pytest that runs bdist_wheel on a temp copy with lib/ empty would guard against regressions, but I don't think it's needed to merge.

Security and performance: nothing to flag.

Overall this looks good to merge.
· branch fix/release-tag-match-and-sdist-guard

@ajitpratap0
ajitpratap0 merged commit 77ab49a into main Oct 22, 2026
42 checks passed
@ajitpratap0
ajitpratap0 deleted the fix/release-tag-match-and-sdist-guard branch October 22, 2026 10:13
ajitpratap0 pushed a commit that referenced this pull request Oct 22, 2026
- Release date 2026-10-22 in CHANGELOG, MIGRATION, the extension changelog
  and the generated blog post (re-stamp at tag time if it slips).
- vscode-extension CHANGELOG: Fixed entry for the #846 version reporting.
- CHANGELOG: keep the Behavior changes list tight; name TranspileError and
  the LintResult/SecurityScanResult types in the pygosqlx 0.3.0 entry.
- MIGRATION: PyPI wheels row is conditional on the pygosqlx-v0.3.0 tag.
- Add #852 (sdist builds fail without libgosqlx; release tag lookup skips v1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9
@ajitpratap0 ajitpratap0 mentioned this pull request Oct 22, 2026
12 of 14 tasks
ajitpratap0 added a commit that referenced this pull request Oct 22, 2026
* chore(parser): remove stray parser.go-e backup with conflict markers [vercel skip]

The sed backup file was committed by accident in #791. It is not compiled
but ships in the module zip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* chore(release): bump version to 1.16.0 [vercel skip]

gosqlx.Version and the CLI version were still 1.14.0 (v1.15.0 shipped with
them), so gosqlx --version, the MCP server info and /health reported 1.14.0.
Also bumps the VS Code extension, Claude Code plugin and marketplace, glama,
performance baseline label, llms.txt and the site's release badge. pygosqlx
__version__ now matches pyproject (0.2.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* docs(changelog): finalize 1.16.0 release notes [vercel skip]

Turns [Unreleased] into [1.16.0] - 2026-10-21, adds the missing entries for
#734, #735, #780, #786, #789, #790, #791, #826, #835, #836, #837, #840, #841,
#843 and #844, updates the MCP and composite-field entries amended by #841
and #843, adds PR refs, and adds the compare links. The VS Code extension
gets a 1.16.0 entry, and split-changelog.js generates the /changelog page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* docs: v1.15 to v1.16 migration guide and release doc fixes [vercel skip]

MIGRATION gains a v1.15.0 -> v1.16.0 section with a behaviour-change
checklist. ERROR_CODES documents E4001 dialect gating and the 11 dialect
names. CLI_GUIDE lists --dialect on format, parse, analyze and lint and all
11 dialects. SQL_COMPATIBILITY marks Oracle CONNECT BY/PRIOR and SQL Server
PIVOT as parsed. api/mcp.md matches the current Config and middleware API,
api/models.md drops the nonexistent Location.Offset and documents byte
columns, and HIGHLIGHTING notes ANSI control-character neutralization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* chore(website): regenerate sample AST and changelog pages

The website build rewrote both files on main: sample-ast.json gains the
WithOrdinality and ColumnAliases fields from #843, and v1-9-1.md drops the
emoji the changelog splitter strips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* docs(release): correct allocation claim, plugin history, E4001 and LoadConfig errors

Address review notes on #845: the lead paragraph understated the perf
audit's allocation cuts, the MIGRATION table listed a v1.15.0 plugin that
never shipped, E4001 also covers LIMIT under SQL Server, and LoadConfig
rejects more trusted-proxy misconfigurations than the API doc listed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* docs(release): make glama.json match the MCP server

List all 11 validate_sql dialects, describe lint_sql as the 10 rules it
runs (L001-L010; the CLI and SDK have 30), sync tool descriptions with
pkg/mcp/server.go, and drop the unsourced 1.38M ops/sec claim in favour
of a link to the benchmarks page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* docs(release): add #846-#851 to the v1.16.0 CHANGELOG and migration guide

Record the pygosqlx 0.3.0 API and wheels, the gosqlx_version double free,
LSP serverInfo/CLI version reporting, the Python CI and release workflows and
the #848 docs. MIGRATION companion table lists pygosqlx 0.3.0, libgosqlx
exports and the LSP serverInfo version, with matching behaviour-change notes.
Regenerate the v1.16.0 blog page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* docs(release): address v1.16.0 release review; add #852

- Release date 2026-10-22 in CHANGELOG, MIGRATION, the extension changelog
  and the generated blog post (re-stamp at tag time if it slips).
- vscode-extension CHANGELOG: Fixed entry for the #846 version reporting.
- CHANGELOG: keep the Behavior changes list tight; name TranspileError and
  the LintResult/SecurityScanResult types in the pygosqlx 0.3.0 entry.
- MIGRATION: PyPI wheels row is conditional on the pygosqlx-v0.3.0 tag.
- Add #852 (sdist builds fail without libgosqlx; release tag lookup skips v1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* build(release): replace deprecated goreleaser keys (formats, version_template)

goreleaser check (v2.12.7) flagged archives.format, format_overrides.format
and snapshot.name_template as deprecated; release.yml runs goreleaser
'latest'. Snapshot release dry-run builds all six archives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* docs(release): add #853 to the v1.16.0 CHANGELOG

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

* feat(python): version pygosqlx in lockstep with GoSQLX (1.16.0)

pygosqlx wheels bundle libgosqlx built from the same commit, so its version
now matches the GoSQLX release. The first PyPI release is 1.16.0 (it was
0.2.0, never published); no older versions are backfilled.

- pygosqlx-release.yml also publishes on GoSQLX 'vX.Y.Z' tags (the floating
  'v1' tag does not match); 'pygosqlx-v*' stays for Python-only .postN
  releases. Both must match pyproject.toml and be on main.
- pyproject.toml / __version__ 1.16.0; the version test now asserts
  __version__ equals the bundled library's version().
- CHANGELOG, MIGRATION and python/README describe the lockstep scheme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

---------

Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant