Project

General

Profile

Bug #29389

Migration fails on 20200129172534_add_epoch_version_release_arch_to_katello_installed_packages.rb

Added by Shimon Shtein 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Migration fails with the following call stack:

Caused by:
NoMethodError: undefined method `[]=' for nil:NilClass
/home/vagrant/katello/db/migrate/20200129172534_add_epoch_version_release_arch_to_katello_installed_packages.rb:17:in `block in up'
/home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:70:in `block (2 levels) in find_each'
/home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:70:in `each'
/home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:70:in `block in find_each'
/home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:136:in `block in find_in_batches'

This is caused because a package:

 #<Katello::InstalledPackage:0x000000001064ce58 id: 343, name: "gpg-pubkey", nvra: "gpg-pubkey-d4082792-5b32db75.">,

which does not return a valid nvrea.

Associated revisions

Revision 189008ec (diff)
Added by Justin Sherrill about 2 months ago

Fixes #29389 - allow nevra parsing to handle empty arch

as gpg-pubkey installed certs can have a nil arch

History

#1 Updated by Samir Jha 2 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.15.0

#2 Updated by The Foreman Bot about 2 months ago

  • Assignee set to Justin Sherrill
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8635 added

#3 Updated by The Foreman Bot about 2 months ago

  • Fixed in Releases Katello 3.16.0 added

#4 Updated by Justin Sherrill about 2 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF