pennylane-hq / activerecord-adapter-redshift

Other
6 stars 27 forks source link

Redshift 7.1 Adapter fully in sync with Postgres 7.1 adapter #27

Closed jerryclinesmith closed 6 months ago

jerryclinesmith commented 7 months ago

As the title suggests, I took everything from the Postgres 7.1 adapter and DatabaseStatements, and removed anything that didn't apply (Extensions, Enum Types, etc...). I've been using this for approximately 2 weeks with no errors. It's a huge change, but I think it actually brings the adapter up to Rails 7.1 instead of just patching it to make it work.

r-plus commented 6 months ago

Hi.

In our environment (activerecord 7.1.3.2, CRuby 3.3.0), this PR merged version is raised error in our CI. I'm not yet investigating about this error but previous version 29e9b6e commit point is no problem.

Failure/Error:
         def execute(sql, name = nil, allow_retry: false)
           internal_execute(sql, name, allow_retry: allow_retry)

       ArgumentError:
         unknown keyword: :materialize_transactions
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:130:in `execute'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/query_cache.rb:25:in `execute'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/bundler/gems/activerecord-adapter-redshift-2b5e9b0fa183/lib/active_record/connection_adapters/redshift_7_1/database_statements.rb:47:in `execute'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/bundler/gems/activerecord-adapter-redshift-2b5e9b0fa183/lib/active_record/connection_adapters/redshift_7_1/database_statements.rb:116:in `exec_rollback_db_transaction'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:419:in `rollback_db_transaction'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/query_cache.rb:25:in `rollback_db_transaction'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:394:in `rollback'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:523:in `block in rollback_transaction'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:23:in `handle_interrupt'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:23:in `block in synchronize'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:19:in `handle_interrupt'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:19:in `synchronize'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:520:in `rollback_transaction'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:352:in `rollback_transaction'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/test_fixtures.rb:193:in `block in teardown_fixtures'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/test_fixtures.rb:192:in `each'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/test_fixtures.rb:192:in `teardown_fixtures'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/test_fixtures.rb:16:in `after_teardown'
       # /home/circleci/make-server/vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/testing/time_helpers.rb:71:in `after_teardown'
...omit
jerryclinesmith commented 6 months ago

Can you post the code for the failing test?

jerryclinesmith commented 6 months ago

Submitted pull request #28 to fix this issue.