rails/activerecord/test
Daniel Colson 6616770ec9
Translate Trilogy syscall errors as conn failed
At GitHub we get a fair number of Trilogy `ETIMEDOUT` errors (for known
reasons that we might be able to improve somewhat, but I doubt we'll
make them go away entirely). These are very much retryable network
errors, so it'd be handy if these `ETIMEDOUT` errors were translated to
`ConnectionFailed` instead of `StatementInvalid`, making them
`retryable_connection_error`s.

ed2bc92b82/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb (L1077)

We're already translating `ECONNRESET` (via matching on the error
message) and `EPIPE` to `ConnectionFailed`. Rather than adding another
case, this commit treats all of the Trilogy `SystemCallError` subclasses
as `ConnectionFailed`.

This requires bumping trilogy 2.7 so we can get
https://github.com/trilogy-libraries/trilogy/pull/143
2024-01-23 16:20:02 -05:00
..
active_record/connection_adapters Add deprecation and specific exceptions to warn when an adapter is using the legacy registration format in 7.2 2023-11-30 07:00:38 -05:00
activejob [Tests only] Enable `Minitest/AssertPredicate` rule 2023-10-13 19:26:47 +00:00
assets Replace test `Man` with `Human` 2020-08-14 11:37:09 -04:00
cases Translate Trilogy syscall errors as conn failed 2024-01-23 16:20:02 -05:00
fixtures Fix `destroy_all` for `has_many :through` associations that points to a CPK model 2023-06-14 17:48:13 +00:00
migrations Sort migration ID as int in db:migrate:status for consistency. 2021-07-16 13:10:31 -05:00
models Always request `primary_key` in `RETURNING` if no other columns requested 2024-01-17 18:19:40 +00:00
schema [Tests only] Expand trigger populated PK test case to run against more DBs 2024-01-18 17:28:12 +00:00
support Remove an unused fixture 2024-01-11 09:27:30 +01:00
config.example.yml Move trilogy config closer to mysql2 2023-06-20 15:30:07 +00:00
config.rb Delete AS::Dependencies.safe_constantize 2021-08-20 17:51:05 +02:00