Project

General

Profile

Bug #29433

db:seed Fails with error "rake aborted! NoMethodError: undefined method `first' for nil:NilClass" when there are custom bookmarks created

Added by Tomer Brisker 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1543316

Upgrade Step: db_seed...
rake aborted!
NoMethodError: undefined method `first' for nil:NilClass
Seems to be there is an issue in bookmark related audit records. 
In some cases, fixing the initial check led to error "Unable to create bookmark: Name has already been taken"
Observed below logs:
/usr/share/foreman/db/seeds.d/15-bookmarks.rb:12:in `block (2 levels) in <top (required)>'
/usr/share/foreman/db/seeds.d/15-bookmarks.rb:10:in `each'
/usr/share/foreman/db/seeds.d/15-bookmarks.rb:10:in `block in <top (required)>'
Seeding /usr/share/foreman/db/seeds.d/15-bookmarks.rb

Associated revisions

Revision fe4676d0 (diff)
Added by Ondřej Ezr 3 months ago

Fixes #29433 - seeding with scope

History

#1 Updated by Tomer Brisker 4 months ago

  • Priority changed from Urgent to High
  • Category changed from Search to DB migrations
  • Subject changed from db:seed Fails with error "rake aborted! NoMethodError: undefined method `first' for nil:NilClass" when there are custom bookmarks created to db:seed Fails with error "rake aborted! NoMethodError: undefined method `first' for nil:NilClass" when there are custom bookmarks created

#2 Updated by The Foreman Bot 4 months ago

  • Assignee set to Ondřej Ezr
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7597 added

#3 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 2.1.0 added

#4 Updated by Ondřej Ezr 3 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF