Bug #16082

FactValue association to Host should be against Host::Base

Added by Daniel Lobato Garcia over 1 year ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Tomer Brisker
Category:Web Interface
Target version:-
Difficulty: Bugzilla link:1491522
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4441
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

As described on http://projects.theforeman.org/issues/16081 - the fact_values helper is expecting that "fact_value.host" to return a meaningful value all the time.
However for certain hosts (DiscoveredHost now, but it could be others in the future) /fact_values shows a 500 because "fact_value.host" doesn't exist.

I think it'd be reasonable to expect fact_value.host to exist for Hosts in core, but we should show N/A if that cannot be found. This way the page will be more resilient to manual db manipulation, data corruption, or plain bugs like http://projects.theforeman.org/issues/16081 .


Related issues

Related to Discovery - Bug #16081: Facts page in core expects .host relation Closed 08/12/2016

Associated revisions

Revision 9ba40b5e
Added by Tomer Brisker 10 months ago

Fixes #16082 - Associate FactValues with Host::Base

To prevent regression in existing search functionality, this also
requires that the hostgroup relation will be moved to the base class as
well. Since Host::Managed inherits from Host::Base, this should not
break anything.

History

#1 Updated by Daniel Lobato Garcia over 1 year ago

  • Related to Bug #16081: Facts page in core expects .host relation added

#2 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/3724 added

#3 Updated by Daniel Lobato Garcia over 1 year ago

  • Target version set to Team Daniel - iteration 2

#4 Updated by Daniel Lobato Garcia over 1 year ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Dominic Cleal over 1 year ago

  • Status changed from Closed to Rejected

#6 Updated by Tomer Brisker 10 months ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/3724)

#7 Updated by Dominic Cleal 10 months ago

  • Subject changed from Facts helper should show N/A if host couldn't be found to FactValue association to Host should be against Host::Base
  • Status changed from Rejected to Ready For Testing
  • Assigned To changed from Daniel Lobato Garcia to Tomer Brisker
  • Target version deleted (Team Daniel - iteration 2)
  • Pull request https://github.com/theforeman/foreman/pull/4441 added

A pull request has been merged referencing this previously closed/rejected bug report. Please check when merging PRs that the report is valid.

#8 Updated by Anonymous 10 months ago

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

#9 Updated by Tomáš Strachota 4 months ago

  • Bugzilla link set to 1491522

#10 Updated by Marek Hulán 3 months ago

  • Release set to 1.16.0

Also available in: Atom PDF