Project

General

Profile

Actions

Bug #30511

closed

Error only on production builds: The Dynflow world was not initialized yet. If your plugin uses it, make sure to call Rails.application.dynflow.require! in some initializer

Added by Jeremy Lenz over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Category:
Subscriptions
Target version:
Fixed in Releases:
Found in Releases:

Description

When running a rake task that includes the Katello::SubscriptionMailer, it fails with error:

RuntimeError (The Dynflow world was not initialized yet. If your plugin uses it, make sure to call Rails.application.dynflow.require! in some initializer)

Only seems to happen on nightly; not on devel boxes.

Steps to reproduce

  1. Import a manifest with at least one subscription that expires <180 days
  2. Attach that subscription to a host
  3. Run the Subscriptions - Entitlement Report (Monitor -> Report Templates) with Days from Now set appropriately
  4. Verify that the report shows that host and subscription
  5. In My Account -> Email Preferences, set up the Subscriptions Expiring Soon email and configure for Daily emails
  6. Run /usr/sbin/foreman-rake reports:daily

Expected: no output; if email is set up you are emailed the report
Actual: the error above

Alternate steps to reproduce (doesn't require a host/subscription)

In foreman-rake console, run

include Katello::SubscriptionMailerHelper
start_report_task(120)

Expected: return the job ID as a string
Actual: the error above

Workaround

See workaround in https://projects.theforeman.org/issues/29337#note-2

Actions

Also available in: Atom PDF