Project

General

Profile

Actions

Bug #3183

closed

timestamp facts are stored incorrectly via the new json fact api

Added by Ohad Levy over 10 years ago. Updated over 10 years ago.

Status:
Rejected
Priority:
Normal
Category:
Facts
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

we used the the _timestamp fact to detect when were the facts were updated last.
the original fact name was a symbol (:_timestamp) and the new one is probably a pure string.
when storing it in the db, it no longer filter correctly accroding to the scope https://github.com/theforeman/foreman/blob/develop/app/models/fact_value.rb#L14.

we probably need to ensure its always a string, and potentially have a migration to fix older facts.

Actions #1

Updated by Ohad Levy over 10 years ago

  • Related to Tracker #3112: [TRACKER] Issues to be released in 1.3 RC or final added
Actions #2

Updated by Greg Sutcliffe over 10 years ago

We appear to convert the symbol to the string anyway: https://github.com/theforeman/foreman/blob/develop/app/models/host/base.rb#L127

There's a few places where we're inconsistently refering to the symbol though, so I'll fix those, add tests and migrate the db.

Actions #3

Updated by Dominic Cleal over 10 years ago

  • Category set to Facts
  • Status changed from New to Ready For Testing
Actions #4

Updated by Dominic Cleal over 10 years ago

  • Status changed from Ready For Testing to Rejected
  • Target version deleted (1.3.0)

Can't reproduce this, see PR.

Actions #5

Updated by Dominic Cleal over 10 years ago

  • Related to deleted (Tracker #3112: [TRACKER] Issues to be released in 1.3 RC or final)
Actions

Also available in: Atom PDF