Foreman runs engine seeds.d before seeds.rb
#6308 introduced seeds.d support for engines, however these are run before the Engine's own seeds.rb is run.
#3 Updated by Stephen Benjamin almost 5 years ago
Katello doesn't use seeds.d yet. Eric and I discussed moving Satellite branding to seeds.d as something like 99-branding.rb. This lets downstream rebase Katello freely without wiping out all the branding changes constantly. It's becoming a major headache for me, as I've now had to reapply my changes 3x.
99-branding.rb doesn't work if things in seeds.rb are applied later. I can fix my problem by moving provisioning templates to seeds.d as well if we decide to do this.
But IMHO the simplest argument for this is that engines and Foreman should have the same behavior in how they handle the ordering of seeds.rb and seeds.d.
#4 Updated by Dominic Cleal almost 5 years ago
- Status changed from New to Need more information
I can't reproduce any ordering issue with a file called "99-branding.rb":
Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/03-auth_sources.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/04-admin.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/05-taxonomies.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/06-architectures.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/07-config_templates.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/08-partition_tables.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/10-installation_media.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/11-permissions.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/11-roles.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/11-smart_proxy_features.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/13-compute_profiles.rb Seeding /home/dcleal/code/foreman/foreman/db/seeds.d/15-bookmarks.rb Seeding /home/dcleal/code/foreman/foreman_bootdisk/db/seeds.d/99-branding.rb
Also the original PR shows a test from Greg that appears to work correctly. seeds.rb sorts all seed files by their basename.