You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! We just hit an error in production due to this error
ActiveModel::UnknownAttributeError: unknown attribute 'error_event' for GoodJob::Execution.
It looks like GoodJob tries to gracefully degrade when migrations are missing, but that logic isn't compatible with GoodJob::Bulk.enqueue.
A while ago we added a test in our test suite to catch missing migrations. We'd rather have our test suite fail than go to production with migrations missing, especially if there are edge cases where the graceful degradation isn't working properly. Unfortunately, because the check for this migration is happening under error_event_migrated? and not migrated?, our test didn't catch this before it went to production.
@dan-manges thanks for reporting this! Migrations are intended to be "optional/non-breaking" within minor releases, so I'm considering this a bug. Sorry! I'll fix that immediately.
I do like your idea of exposing a method publicly to check. What do you think of something like GoodJob.pending_migrations?
Thanks for the quick fix for this @bensheldon! We updated right away; sorry I didn't reply sooner. We also added a test to assert GoodJob.migrated? in our test suite – thanks for adding that!
Hello! We just hit an error in production due to this error
It looks like GoodJob tries to gracefully degrade when migrations are missing, but that logic isn't compatible with
GoodJob::Bulk.enqueue
.A while ago we added a test in our test suite to catch missing migrations. We'd rather have our test suite fail than go to production with migrations missing, especially if there are edge cases where the graceful degradation isn't working properly. Unfortunately, because the check for this migration is happening under
error_event_migrated?
and notmigrated?
, our test didn't catch this before it went to production.Is there a more proper way that we can add something to our test suite to make sure all of the migrations have been run?
The text was updated successfully, but these errors were encountered: