-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Description
We have some models with after_commit callbacks around ActiveStorage and some other external interactions that appear to be running after the data migration has completed. In the case of the ActiveStorage attachments they get cut off and raise exceptions. We don't get this behavior if we run the same code from a rake task or in the console.
We're on rails 6.1.4.1 and the latest pub release of the data-migrate gem.
👉 bin/rails data:migrate
== 20220602165945 AddGifCreditProducts: migrating =============================
successfully added gif credits for Denver
successfully added gif credits for Seattle
successfully added gif credits for Minneapolis
successfully added gif credits for Austin
successfully added gif credits for Digital Fulfillment Studio
successfully added gif credits for Los Angeles
== 20220602165945 AddGifCreditProducts: migrated (0.3966s) ====================
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
closed stream
/path-to-rails-app/bin/rails:9:in `<top (required)>'
/path-to-rails-app/bin/spring:15:in `<top (required)>'
Caused by:
IOError: closed stream
/path-to-rails-app/bin/rails:9:in `<top (required)>'
/path-to-rails-app/bin/spring:15:in `<top (required)>'
Tasks: TOP => data:migrate
(See full trace by running task with --trace)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels