Skip to content

chore(deps,test): patch certifi and markdown-it; bound testcontainer startup - #837

Merged
ajitpratap0 merged 4 commits into
mainfrom
chore/deps-and-mariadb-timeout
Oct 21, 2026
Merged

ajitpratap0 merged 4 commits into
mainfrom
chore/deps-and-mariadb-timeout

Conversation

@ajitpratap0

Copy link
Copy Markdown
Owner

Summary

Test Plan

  • go vet ./pkg/schema/..., gofmt, go test -race -timeout 120s ./pkg/schema/... pass locally (Docker absent locally, so the containers skip; CI exercises the container path).
  • Pre-commit hook (fmt, vet, short tests) passed.

Breaking Changes

None.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RkzVu3JY9Y6BRWfjesWts9

…startup by test deadline

- certifi 2026.7.22 -> 2026.10.19 (critical: bundled emSign roots with
  compromised intermediate keys) in the hash-pinned Sentry script deps.
- markdown-it 14.3.2 -> 14.3.3 in the VS Code extension lockfile
  (two quadratic-time DoS advisories).
- MySQL/MariaDB/Postgres loader tests start containers under a context
  that ends 30s before the test binary deadline, so a slow CI image pull or
  init skips the integration test instead of panicking the whole package.

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

vercel Bot commented Oct 21, 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 21, 2026 3:01pm UTC

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

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


Review of PR #837

Verdict: looks good, with a few minor notes.

  • Read the diff and surrounding code

Dependency bumps

  • certifi (hash-pinned, regenerated with only that package upgraded) and the markdown-it lockfile-only bump are minimal and appropriate. I didn't re-verify the hashes.

Testcontainer deadline (pkg/schema/mysql, pkg/schema/postgres)

  • The approach is sound. startCtx is bounded by t.Deadline()-30s, and GenericContainer errors flow into the existing t.Skipf("testcontainers unavailable") path. The time import is already present in both files.
  • Cleanup and later calls (Terminate, Host, MappedPort, PingContext) still use the unbounded ctx, so cancelling startCtx via defer cancel() when the helper returns doesn't affect the running container.

Minor points (non-blocking):

  1. Shared package deadline. t.Deadline() is the whole binary's deadline, not the per-test one. If several tests start containers (MariaDB, MySQL variants), one slow start can consume nearly the whole budget. The remaining tests then skip with an expired context, and the 30s margin may be too small for later tests to finish their queries. This is still better than a package panic, but a per-start cap (for example min(deadline-30s, now+90s)) would keep a single slow image from starving the rest.
  2. Skips can hide real failures. Any start error, including a genuine misconfiguration, becomes a skip. The existing code already did this, but it's worth a log line saying the cause was a deadline when startCtx.Err() != nil, so CI skips are diagnosable.
  3. Duplication. The deadline block is copied in two packages. That's fine at this size, but a shared test helper would remove it if more loaders get added.
  4. Edge case. If the remaining time is less than 30s, deadline.Add(-30s) is already in the past, so the start fails immediately and the test skips. That is acceptable behavior.

Tests: I couldn't run Docker here, so the container path is exercised only by CI. Nothing in this change is a security concern.
· branch chore/deps-and-mariadb-timeout

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

Addresses review on #837: all tests in a package share one binary deadline,
so one slow start could consume the budget of the next. Each start now gets
at most 75s (still ending 30s before the deadline), and a skip caused by the
budget says so.

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 21, 2026 •

Copy link
Copy Markdown

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


Review of PR #837 (re-review after 5a8f6f4)

Verdict: looks good. I have no blocking issues.

  • Read the dependency and test changes
  • Checked that the follow-up commit addresses the earlier review

Follow-up commit (5a8f6f4)

  • It addresses points 1 and 2 from the earlier review. Each start gets at most 75s and still ends 30s before the binary deadline. A skip caused by the budget now says so.
  • containerStartContext computes min(now+75s, deadline-30s) correctly. If t.Deadline() is unset (-timeout 0), the 75s cap still applies. That is a sensible bound.
  • defer cancel() runs when the helper returns. Cleanup, Host, MappedPort and PingContext use the unbounded ctx, so cancelling startCtx doesn't affect the running container.

Dependency bumps

  • certifi is hash-pinned and markdown-it is a lockfile-only change. Both are minimal. I didn't re-verify the hashes.

Minor notes (non-blocking)

  1. Slow-but-healthy pulls. 75s could be tight on a cold CI runner pulling MariaDB or MySQL. This only turns a package panic into a skip, but a consistently slow runner would silently lose integration coverage. Consider logging the elapsed time so you can tune the cap.
  2. Leftover containers. If the context expires after the container is created but before the wait strategy passes, a container could be left behind. testcontainers normally cleans up on a failed start, and Ryuk (testcontainers' reaper container) reaps the rest. Check that Ryuk isn't disabled in CI.
  3. Duplication. containerStartContext is identical in pkg/schema/mysql and pkg/schema/postgres. That is fine at this size. A shared internal test helper would be worth it if more loaders are added.
  4. Mixed skip messages. The startCtx.Err() != nil check also fires when the failure is unrelated but happens to coincide with expiry. That is an acceptable edge case.

Tests: I didn't run them. Docker isn't available here, so the container path is exercised only by CI. Nothing in this change raises a security concern.
· branch chore/deps-and-mariadb-timeout

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

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


Review of PR #837 (re-review after 5a8f6f4)

Verdict: looks good. I found no blocking issues. I read the diff but didn't run the tests. Docker isn't available here, so only CI exercises the container path.

Dependency bumps

  • certifi is hash-pinned and markdown-it is a lockfile-only change. Both are minimal and appropriate. I didn't re-verify the hashes.

Testcontainer deadline (pkg/schema/mysql, pkg/schema/postgres)

  • containerStartContext computes min(now+75s, deadline-30s). If -timeout 0 leaves t.Deadline() unset, the 75s cap still applies.
  • Only GenericContainer uses startCtx. Terminate and later calls use the unbounded ctx, so the defer cancel() doesn't affect a running container.
  • The new skip message separates budget expiry from other start failures.

Minor notes (non-blocking)

  1. Leftover containers. If startCtx expires after the container is created but before the wait strategy passes, a container could be left behind. testcontainers normally cleans up after a failed start, and Ryuk (its reaper container) should reap the rest. Check that Ryuk isn't disabled in CI.
  2. The 75s cap may be tight. A cold runner pulling the image could hit it. A consistently slow runner would then silently lose integration coverage. Logging the elapsed time would help tune the cap.
  3. Duplication. containerStartContext is identical in both packages. That's fine now. If more loaders are added, move it to a shared test helper.
  4. Skip message. The startCtx.Err() != nil check also fires when an unrelated failure happens to coincide with expiry. This is an acceptable edge case, and the underlying error is still printed.

No security concerns.
· branch chore/deps-and-mariadb-timeout

@ajitpratap0
ajitpratap0 merged commit 1c161fa into main Oct 21, 2026
29 checks passed
@ajitpratap0 ajitpratap0 mentioned this pull request Oct 21, 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant