Project

General

Profile

Bug #16960

undefined method `+' for nil:NilClass when viewing third-party rpm

Added by Brad Buckingham almost 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Repositories
Target version:
Difficulty:
easy
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:
Opening Content > Packages in the WebUI and clicking on a third-party rpm uploaded to custom repo results in the webui showing the following error:

undefined method `+' for nil:NilClass

The Details, Files, Dependencies, and Repositories tabs are not displayed for the rpm

How reproducible:

Reproducable on katello master.

Steps to Reproduce:
1. Upload chef-11.2.0-1.el6.x86_64.rpm to a custom repo with hammer
2. Open Content > Packages and search for the rpm
3. Click the link to display the package details

Actual results:
Error is shown and details are not

Expected results:
Details are show without error

There is a large backtrace in the logs when this occurs, starting with:

2016-10-13 14:27:46 [app] [E] NoMethodError: undefined method `+' for nil:NilClass | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/services/katello/pulp/rpm.rb:34:in `files' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/helpers.rb:20:in `data_object_attribute' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:140:in `attribute' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:114:in `block in compile_settings' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:113:in `each' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:113:in `compile_settings' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:53:in `block in to_hash' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:248:in `cache_results' | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.11.6/lib/rabl/builder.rb:49:in `to_hash'

Associated revisions

Revision d1f188b6 (diff)
Added by Brad Buckingham almost 3 years ago

fixes #16960 - support rpm/package without file list

This commit will gracefully handle the scenario where an
rpm does not have a filelist. With it, a user can still
view rpm details from the ui (e.g. Content -> Packages -> [pkg])

Note: rpms will generally have file lists; however, an issue
has been observed in pulp where uploaded rpms are missing
that piece of data.

History

#1 Updated by Brad Buckingham almost 3 years ago

  • Subject changed from undefined method `+' for nil:NilClass when viewing third-party rpm to undefined method `+' for nil:NilClass when viewing third-party rpm
  • Assignee set to Brad Buckingham
  • Target version set to 129
  • Legacy Backlogs Release (now unused) set to 162
  • Difficulty set to easy

#2 Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6400 added

#3 Updated by Brad Buckingham almost 3 years ago

  • Target version changed from 129 to 133

#4 Updated by Brad Buckingham almost 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF