Skip to content

Conversation

BuonOmo
Copy link
Collaborator

@BuonOmo BuonOmo commented Mar 6, 2025

Cherry-pick #364 for 7-2-stable branch. I took the opportunity to include the backport already made to 7-0-stable branch and all of the backports that are test related so we can enjoy a faster CI here as well.

BuonOmo added 10 commits March 7, 2025 14:49
This fixes the test
`#test_all_foreign_keys_valid_having_foreign_keys_in_multiple_schemas`.
Avoid 87% of the `#disable_referential_integrity` calls made
in fixture setup by just trying first without disabling and
just disabling in case of failure. Also batch foreign keys
removals and addition (for clarity only).
@BuonOmo BuonOmo changed the title fix: transaction state on rollback (#364) chore: various backports to 7.2 Mar 7, 2025
@BuonOmo BuonOmo force-pushed the backport-364-to-7-2 branch from 5bbf70f to 7e4c2b4 Compare March 7, 2025 15:35
Copy link
Contributor

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

@rafiss
Copy link
Contributor

rafiss commented Mar 17, 2025

It appears there is one test with an issue though:

  1) Error:
ActiveRecord::ConnectionAdapters::ConnectionPoolThreadTest#test_checkout_fairness_by_group:
Timeout::Error: Test took over 5 minutes to finish
    vendor/bundle/ruby/3.4.0/bundler/gems/rails-6cfa24f9dfdd/activerecord/test/cases/connection_pool_test.rb:515:in 'Kernel#sleep'
    vendor/bundle/ruby/3.4.0/bundler/gems/rails-6cfa24f9dfdd/activerecord/test/cases/connection_pool_test.rb:515:in 'block in ActiveRecord::ConnectionAdapters::ConnectionPoolTests#test_checkout_fairness_by_group'
    <internal:kernel>:168:in 'Kernel#loop'
    vendor/bundle/ruby/3.4.0/bundler/gems/rails-6cfa24f9dfdd/activerecord/test/cases/connection_pool_test.rb:514:in 'ActiveRecord::ConnectionAdapters::ConnectionPoolTests#test_checkout_fairness_by_group'

@BuonOmo
Copy link
Collaborator Author

BuonOmo commented Mar 20, 2025

There was also an issue on the company table related test (pretty sure it is just because of tests changing the db state).

I'm investigating on the timeout but I cannot reproduce it locally yet

EDIT: I had one local reproduction of the fairness test, but only with the whole test suite. I also suspect that we leek one checkout connection at some point in the test suite. I'll investigate further, but I believe this is not directly related to 7.2 (I'm running tests on the master branch to confirm)

@BuonOmo
Copy link
Collaborator Author

BuonOmo commented Mar 26, 2025

I have very few reproductions, I suggest merging to avoid this being stale, and I'll run tests on fairness for the master (could we consider call it main? 🙏). WDYT?

I would rebase and merge to keep backport history if you don't mind

@rafiss rafiss merged commit de4946c into 7-2-stable Apr 25, 2025
4 checks passed
@BuonOmo BuonOmo deleted the backport-364-to-7-2 branch April 26, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants