Open yahonda opened 1 year ago
So the introduction of @unconfigured_connection
breaks all the references to @raw_connection
prior to connecting. After the connection, @raw_connection
gets set. The timing of all the references to @raw_connection
in the oracle_enhanced_adapter.rb are unclear to me. It seems like a connection lookup along the lines of
def _connection
@unconfigured_connection || @raw_connection
end
Might work. It would certainly fix the specific database_version
call in this immediate test failure. But this rails change cascades down through all the other references to @raw_connection, and I'm unclear if casually grabbing whichever ivar is set is appropriate.
Or if, in some number of cases, the library needs to be forcing the verify!
call to ensure @raw_connection is defined and active.
I've added a PR with this dual lookup approach: "Add _connection method" #2367 mostly as a basis for making other progress on rails 7.1 differences.
I'm still orienting here and would humbly welcome any guidance or thoughts you might have on tackling this particular upstream change @yahonda . Thanks!
Oracle enhanced adapter needs to support https://github.com/rails/rails/pull/44591 which has eight commits. https://github.com/rails/rails/commit/deec3004d8d85443dc4f3f5fd22ab86b10adb58b triggers unit test failures.
Steps to reproduce
Expected behavior
It should pass.
Actual behavior
System configuration
Rails version: main branch after https://github.com/rails/rails/commit/deec3004d8d85443dc4f3f5fd22ab86b10adb58b
Oracle enhanced adapter version: master
Ruby version: Ruby 2.7 or higher
Oracle Database version: Oracle Database 21c Express Edition