Project

General

Custom queries

Profile

Actions

Bug #37503

closed

Plugins are finalized before seeds are executed

Added by Adam Ruzicka 11 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugin integration
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

It can happen that
1) A new permission is added in foreman (as it was in https://github.com/theforeman/foreman/pull/9803)
2) A role in a plugin is extended to have the permission from 1) (as it was in https://github.com/theforeman/foreman_ansible/pull/633)
3) When the installer runs, it skips explicit seeds (foreman-rake db:seed) because explicit seeds only run when the db was migrated
4) Seeds are supposed to be seeded when the rails process boots up, but because of the load order the plugin seems to be initialized before its dependencies (the permission in core) are seeded

Added by Adam Ruzicka 9 months ago

Revision b5638c75 (diff)

Fixes #37503 - Delay plugin finalization until seeds are seeded

Moving it to a different file alphabetically after seeds.rb makes the
callback finalizing plugin end up being put after the callback that does
the seeding.

Actions

Also available in: Atom PDF