Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial work to support Active Record 7.1 (Rails 7.1.x) #1150

Merged
merged 18 commits into from
Jul 25, 2024

Commits on Jul 23, 2024

  1. Ignore some files and update active record version to the latest 7.1

    - .jrubyrc, to enable some extra debugging
    - .solargraph.yml and .rubocop.yml, for lsp in my editor
    - pik.sh, to pick my version of jruby to run test
    JesseChavez committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    0a96569 View commit details
    Browse the repository at this point in the history
  2. Temporarily disable jndi connection pool callbacks, we need to fix th…

    …is later.
    
    - it was disabled to so we can focus on fixing the AR integration first
    - cannot run tests, process crashes
    JesseChavez committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    11bd7d2 View commit details
    Browse the repository at this point in the history
  3. Temporarily disable ARJDBC statement caching, we need to fix this later.

    - it was disabled to so we can focus on fixing the core part first
    - cannot run tests, process crashes
    JesseChavez committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    7c85e93 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. Configuration menu
    Copy the full SHA
    648b769 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31ffac6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    354dfd1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c156643 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    450359d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aac97a2 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

  1. Fix postgres version tests failures

    we needed to add new_client class method similar to active record CRuby
    adapters so we can easily mock the raw_connection.
    JesseChavez committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    e0e8b41 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    da7c41f View commit details
    Browse the repository at this point in the history
  3. Fix test fetching columns of not existing table

    <ActiveRecord::StatementInvalid> expected but was
    <ActiveRecord::JDBCError(<java.sql.SQLSyntaxErrorException: Table 'arjdbc_test.animals' doesn't exist>)
    arjdbc/jdbc/RubyJdbcConnection.java:775:in `execute'
    JesseChavez committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    a5fe20d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e7bba82 View commit details
    Browse the repository at this point in the history
  5. Fix mysql test failure to deprecated to_s(:db) method

    Loading development environment (Rails 7.0.8.4)
    [1] pry(main)> t = Time.current
    => Thu, 25 Jul 2024 16:56:41.434382638 AEST +10:00
    [2] pry(main)>
    [3] pry(main)> t.to_s(:db)
    DEPRECATION WARNING: TimeWithZone#to_s(:db) is deprecated. Please use TimeWithZone#to_fs(:db) instead. (called from require at bin/rails:4)
    => "2024-07-25 06:56:41"
    JesseChavez committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    3e1bf96 View commit details
    Browse the repository at this point in the history
  6. Fix several schema dump test for postgres

    https://github.com/rails/rails/blob/7-1-stable/activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb#L21
    
    https://github.com/rails/rails/blob/7-1-stable/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb#L63
    
    there is diference between mysql/sqllite and postgres internal_exec_query method arity
    however due default values is not a issue at least for AR 7.1
    
    some error example:
    
    Error: test_schema_dump(PostgresSchemaDumpTest): ArgumentError: unknown keywords: :allow_retry, :materialize_transactions
    /home/jessec/bryk/vendor_gems/stable/activerecord-jdbc-adapter/lib/arjdbc/abstract/database_statements.rb:37:in `internal_exec_query'
    /home/jessec/.gem/jruby/3.1.4/gems/activerecord-7.1.3.4/lib/active_record/connection_adapters/postgresql/schema_statements.rb:549:in `foreign_keys'
    JesseChavez committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    e65a725 View commit details
    Browse the repository at this point in the history
  7. Fix postgres test about fetching columns of non existent table

    error:
    
    <ActiveRecord::StatementInvalid> expected but was
    <ActiveRecord::JDBCError(<org.postgresql.util.PSQLException: ERROR: relation "animals" does not exist
      Position: 454>)
    JesseChavez committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    90e579f View commit details
    Browse the repository at this point in the history
  8. fix savepoint test, it seems transaction needs to be materialized bef…

    …ore creating a savepoint
    
    change relates to
      rails/rails@3f19431
    
    materilaization is trigger by executing any query inside the transaction
    
    Cherry-picked from my fork
    JesseChavez committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    1383039 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c77c239 View commit details
    Browse the repository at this point in the history