Content
Updated by Christophe Bliard 2 days ago
###
### Steps to reproduce
This happens on our infrastructure where we have multiple tenants on one instance and a new version is deployed. During deployment, the seeding is run. _??_
This is a duplicate of ##62582.
Here is how to mimic the issue:
* Install a fresh instance of OpenProject. This runs db migration and seeding and creates the 2 demo projects: "Demo project" and "Scrum project".
* Delete all the projects
* Run `rake db:seed` as an upgrade would do.
### What is the buggy behavior?
* The `db:seed` task tries to create the demo projects again and fails because it can't find references to dependent records.
* Appsignal:
* [https://appsignal.com/openproject-gmbh/sites/67c5518749a999507a2c1cef/exceptions/incidents/90](https://appsignal.com/openproject-gmbh/sites/67c5518749a999507a2c1cef/exceptions/incidents/90)
* [https://appsignal.com/openproject-gmbh/sites/681379ae55b0b20ed3735994/exceptions/incidents/10](https://appsignal.com/openproject-gmbh/sites/681379ae55b0b20ed3735994/exceptions/incidents/10)
* Message:
* `Nothing registered with reference :default_role_project_admin`
* `Nothing registered with reference :default_type_task`
* Backtrace:
* app/seeders/source/seed\_data.rb:67 in Source::SeedData#find\_reference
### What is the expected behavior?
* There should be no errors.
* Once the seeding has been done once, it should be skipped.
* See #62582 for more ideas / options. ??
###
This happens on our infrastructure where we have multiple tenants on one instance and a new version is deployed. During deployment, the seeding is run.
This is a duplicate of ##62582.
Here is how to mimic the issue:
* Install a fresh instance of OpenProject. This runs db migration and seeding and creates the 2 demo projects: "Demo project" and "Scrum project".
* Delete all the projects
* Run `rake db:seed` as an upgrade would do.
### What is the buggy behavior?
* The `db:seed` task tries to create the demo projects again and fails because it can't find references to dependent records.
* Appsignal:
* [https://appsignal.com/openproject-gmbh/sites/67c5518749a999507a2c1cef/exceptions/incidents/90](https://appsignal.com/openproject-gmbh/sites/67c5518749a999507a2c1cef/exceptions/incidents/90)
* [https://appsignal.com/openproject-gmbh/sites/681379ae55b0b20ed3735994/exceptions/incidents/10](https://appsignal.com/openproject-gmbh/sites/681379ae55b0b20ed3735994/exceptions/incidents/10)
* Message:
* `Nothing registered with reference :default_role_project_admin`
* `Nothing registered with reference :default_type_task`
* Backtrace:
* app/seeders/source/seed\_data.rb:67 in Source::SeedData#find\_reference
### What is the expected behavior?
* There should be no errors.
* Once the seeding has been done once, it should be skipped.
* See #62582 for more ideas / options.