Repository navigation
Fix bugs found by the independent pre-release check; E2E on every supported Ruby - #49
Merged
Merged
Conversation
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
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
Fixes for the issues found by an independent pre-release check of
main(7194e3b) against real PostgreSQL 16, MySQL 8.4 and SQLite on Ruby 3.1–4.0. Each fix comes with E2E coverage that fails onmain.Fixes
Timeoutinsidetransactioncommitted the partial work on Ruby 3.1/3.2 (all drivers). timeout < 0.4 exits the block withthrow, whichtransactiontreated as success.rubyVersion< 3.3, the generatedtransactionnow records normal completion. If the block exits without completing or raising while the loaded timeout is < 0.4 (timeout_exits_with_throw?), it rolls back.gem 'timeout', '>= 0.4'.rubyVersion>= 3.3 is unchanged.sqlc.argas?Non SQLite, but the generated code bound params positionally.sqlc.slicefollowed by a named arg raisedRangeException.sqlc.argwith?silently returned wrong rows. This also affected:batch*.?Nto?. It binds params in occurrence order, repeating values when a param appears more than once.true/falsefailed.encode_jsonnow JSON-encodes booleans as well as Arrays.Raise/Rand/Formatshadowed Kernel methods the generated class calls. They are now generation errors (Code::KERNEL_METHODS). A unit test scans the generated examples and golden files for unreserved bare Kernel calls.def m(lim:, name_filter: nil)), so generated code stays RuboCop-clean (Style/KeywordParametersOrder). Binding order is unchanged.Test coverage
scripts/tests/generate_examples.rbregenerates the examples for thatrubyVersion(Struct rows) into a scratch dir (EXAMPLES_DIR), and the jobs install fromGemfile.e2e.DataandStruct.break/return/throwsemantics;Thread#kill; nested savepoint rollback; parent-object calls inside a transaction:batchone):copyfromSync, mysql2 across threads):copyfrom, batch and concurrent-transaction plansscripts/tests/capture_fixtures.rb) and goldens updated.Follow-up in this PR: mysql2 Fiber concurrency and full E2E coverage
Sync.quote, usingMysql2::Client#escape; hex literals for binary strings; unsupported types raiseTypeError). This is the same approach as ActiveRecord's mysql2 adapter.bind_paramsand sends oneClient#query. There are no server-side prepared statements anymore.Sync), quoting and injection, and the absence of prepared statements.docs/Coverage.mdmaps each README claim to the E2E test(s) per engine. A unit test fails if a referenced test does not exist.moduleName: MyApp::Dbfor all engines, plus pgpreparedStatements: falserunning the whole pg suite.tests/end2end_options.rb(rename, exactTableNames, overrides, global options, several query files,generateTypes: false, generated-Gemfile-only load).Checklist
examples/is regenerated (rake sqlc_generate_process) and committedrake test, andrake end2end_*when the generated code changes)rake rubocop) and Steep-clean (rake steep)bug,enhancement,documentation, orbreaking) so the release notes are grouped correctly