ci: weekly compatibility canary for all language connectors#616
Open
amaksimo wants to merge 3 commits into
Open
ci: weekly compatibility canary for all language connectors#616amaksimo wants to merge 3 commits into
amaksimo wants to merge 3 commits into
Conversation
Mirrors the same early-warning system added to aurora-dsql-orms: weekly recompile + unit tests against the LATEST upstream version of each connector's Postgres driver / SDK. A failure auto-files a dedup'd tracking issue. Coverage (8 connectors, all with real cluster-free unit suites): - Python (psycopg/psycopg2/asyncpg latest, tests/unit) - Java JDBC (pgjdbc latest, ./gradlew test) - Go pgx (pgx + aws-sdk-go-v2 latest, go test ./dsql/...) - node-postgres (pg latest, npm run test:unit) - postgres-js (postgres latest, npm run test:unit) - .NET Npgsql (Npgsql latest, dotnet test) - Rust sqlx (sqlx latest, cargo test --lib) - Ruby pg (pg gem latest, rake unit) PHP pdo_pgsql intentionally omitted — it is a built-in PHP extension, not an upgradable package, so there is no upstream to canary at the connector layer. build.gradle.kts: pgjdbc version is now overridable via -PpgjdbcVersion (used by the canary to probe latest); default 42.7.11 unchanged. The workflow includes a workflow_dispatch `dry-run` boolean for safe manual smoke runs that skip filing tracking issues — used to validate wiring on the first manual run after merge.
Self-review on PR #616 (16-agent fan-out, ≥60 confidence threshold). Sourced commit. 19 high-confidence findings; 17 fixed in code, 2 deferred to PR-body edit. Bug fixes: - Rust sqlx: `cargo add sqlx@latest` is invalid (`latest` is not a cargo version requirement). Use bare `cargo add sqlx` which already takes the latest, including across majors. Hardening: - SHA-pin every action to the same SHAs the rest of the repo uses, matching the repo's existing supply-chain convention. - Add `persist-credentials: false` to every `actions/checkout` step. - Add `concurrency: { group: compat-canary }` so an overlapping schedule + workflow_dispatch can't race the dedup search. - Probe label existence before `gh label create` instead of swallowing every error class with `2>/dev/null || true`. - Pass title via `--arg` to jq to remove quote-injection surface. - Write to `$GITHUB_STEP_SUMMARY` so reporter self-failure is distinguishable from a normal canary-fired run. Comment / accuracy fixes: - Issue body said "the canary will reopen it if the break recurs" but dedup uses `--state open` only; reword to match behavior. - build.gradle.kts said "probes the next major" but `+` resolves to absolute latest (any major); reword. - dry-run input description didn't say the run still goes red on probe failure; clarify. - Document that tier-1 doesn't catch runtime DSQL semantic regressions. - Document the deliberate `@latest`-from-public-registry supply-chain surface and the `issues: write`-only mitigation. - Document why `--no-sync`, why unversioned `gem "pg"` overrides the gemspec ceiling, and why `go get -u` won't cross majors. Style: - `findProperty(...) as String?` → `findProperty(...)?.toString()` — defensive Kotlin DSL idiom; survives non-String property values. - Drop redundant `working-directory` on `ruby/setup-ruby` step.
Iteration-2 self-review caught a real regression introduced by iter-1:
`gh issue list --arg` is not a recognized flag (`gh` does not forward
unknown args to its embedded `--jq` engine). Under `set -euo pipefail`,
the dedup probe crashed before any issue-filing logic ran — meaning the
entire user-visible output of the canary (dedup'd tracking issues) would
never have fired on a real break. Verified empirically with gh 2.83.1:
`unknown flag: --arg`.
Fix: pipe `gh issue list --json` to standalone `jq -r --arg t "${TITLE}" ...`,
which preserves the quote-injection guard while actually running.
Also caught:
- Rust step name still said "including next major"; iter-1 reworded the
inline comment but missed the user-visible step name. Renamed to
"absolute latest (including new majors)".
- Rust job used inline `working-directory:` on every step instead of
`defaults.run.working-directory: rust/sqlx` like every other
multi-step job. Restored the defaults block.
Contributor
Author
Self-review (3 iterations, 16+ sub-agents per pass)Procedure: 19 sub-agent fan-out per iteration; ≥60 confidence threshold; convergence validated by iteration 3 with zero new findings. Final state: 3 commits on this branch — original Tracking table
Iteration log
Convergence: Iteration 3 reported zero new high-confidence findings; no prior fix regressed. Procedure complete inside the 3-iteration cap. The four remaining items (#18, #25, #19 PR-body edits; #20 test gap) are explicitly deferred and listed for human judgment. |
anwesham-lab
approved these changes
Jun 24, 2026
Member
|
LGTM! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirror of awslabs/aurora-dsql-orms#499 — same early-warning system, applied to every language connector. Weekly recompile + unit tests against the latest upstream Postgres driver / SDK (instead of the pinned version). A failure auto-files a single dedup'd
compat-canarytracking issue.The motivating bug: a customer hit
NoClassDefFoundError: PgJdbcHelperwhen Spring Boot 4 pulled Hibernate 7 into our dialect. That class of break — linkage / API relocation — would have been caught by simply recompiling against latest. This canary does that, weekly, with no live cluster needed.Coverage
8 connectors, all with cluster-free unit suites (verified by reading each
*-ci.yml):pytest tests/unitafteruv pip install --upgradeof all three./gradlew test -PpgjdbcVersion=+go test ./dsql/...aftergo get -u jackc/pgx aws-sdk-go-v2/...npm run test:unitafternpm install pg@latest --save-peernpm run test:unitafternpm install postgres@latest --save-peerdotnet testafterdotnet add package Npgsql --prereleasecargo test --libaftercargo add sqlx@latestbundle exec rake unitvia overlay Gemfile that relaxes~> 1.5to track latestPHP
pdo_pgsqlintentionally omitted — it's a built-in PHP extension, not an upgradable package, so there's no upstream to canary at the connector layer.Mechanics
.github/workflows/compat-canary.yml— weekly (Mon 06:00 UTC) + manual. Independent jobs per connector; never gates PRs/releases. Includes adry-runworkflow_dispatchinput that skips issue filing — use it for the first manual run onmainto validate wiring without spamming issues..github/actions/report-canary-failure/— composite action; opens or comments on a single dedup'dcompat-canaryissue per connector.build.gradle.kts— pgjdbc version is now overridable via-PpgjdbcVersion=…(default42.7.11unchanged). Verified locally: override flows through, default falls back,compileJavais clean. No other manifest edits needed — Python / Node / Go / Rust / .NET / Ruby all support install-time version overrides.Honest caveats (unchanged from the ORMs PR)
main(workflow_dispatch404s on PR branches).cargo add sqlx@latest,dotnet add package --prerelease, Ruby Gemfile overlay, etc. are best-reading-of-docs, not observed runs.gh workflow run compat-canary.yml -f dry-run=true. Reveals broken probes without filing noise.Why no dependabot edit (unlike the ORMs PR)
The ORMs repo had stale
>=7/>=4ignores muting the exact signal this canary now provides; that needed fixing. The connectors repo'sdependabot.ymlhas no upstream-version ignores — only build-tool pins (junit, jgit) — so there's nothing to roll forward.