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

Update test dummy application defaults to remove warnings #42286

Merged
merged 3 commits into from
Jun 21, 2021

Conversation

zzak
Copy link
Member

@zzak zzak commented May 24, 2021

Affected gems:

  • actionmailbox
  • activestorage
  • actiontext

This fixes the following warning:

DEPRECATION WARNING: Using legacy connection handling is deprecated. Please set
`legacy_connection_handling` to `false` in your application.

The new connection handling does not support `connection_handlers`
getter and setter.

Read more about how to migrate at: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
 (called from require at ~/.gem/ruby/3.1.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34)

@eugeneius
Copy link
Member

@zzak
Copy link
Member Author

zzak commented May 24, 2021

@eugeneius Thanks! I will patch those too and put them in this same commit

@zzak zzak force-pushed the actionmailbox/test/dummy/defaults branch from 064276f to 72add4f Compare May 24, 2021 22:59
@zzak zzak changed the title Update defaults for actionmailbox test dummy applicaiton Update test dummy applicaiton defaults to remove warnings May 24, 2021
@zzak
Copy link
Member Author

zzak commented May 24, 2021

@eugeneius Done! 🙏

@zzak
Copy link
Member Author

zzak commented May 25, 2021

Ok I see some actually relevant errors in CI:

ActiveStorage::PreviewTest#test_previewing_on_the_writer_DB:
--
  | NotImplementedError: `while_preventing_writes` is only available on the connection_handler with legacy_connection_handling
  | /rails/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb:104:in `while_preventing_writes'
  | /rails/activestorage/test/models/preview_test.rb:58:in `block in <class:PreviewTest>'

Will work on fixing these first.

Affected gems:

* actionmailbox
* activestorage
* actiontext

This fixes the following warning:

DEPRECATION WARNING: Using legacy connection handling is deprecated. Please set
`legacy_connection_handling` to `false` in your application.

The new connection handling does not support `connection_handlers`
getter and setter.

Read more about how to migrate at: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
 (called from require at ~/.gem/ruby/3.1.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34)
@zzak zzak force-pushed the actionmailbox/test/dummy/defaults branch from dcef4a3 to c797ce9 Compare June 20, 2021 22:00
@zzak
Copy link
Member Author

zzak commented Jun 20, 2021

@eugeneius I fixed the ActionMailbox tests and pulled in some commits from #42543 that fixed the ActiveStorage tests. This should be good to go 🙏

@pixeltrix pixeltrix changed the title Update test dummy applicaiton defaults to remove warnings Update test dummy application defaults to remove warnings Jun 21, 2021
@pixeltrix pixeltrix merged commit 46fcce3 into rails:main Jun 21, 2021
@pixeltrix
Copy link
Contributor

@zzak thanks! 👍🏻

@zzak zzak deleted the actionmailbox/test/dummy/defaults branch June 21, 2021 10:01
@vipera
Copy link

vipera commented Sep 21, 2021

Would it be possible to backport this change to 6.1, as I've actually run into a bug using ActiveStorage::VariantWithRecord without the service delegate when calling processed on an ActiveStorage variant using the track_variants feature:

undefined method `service' for #<ActiveStorage::VariantWithRecord:...>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants