Project

General

Profile

Bug #3183

timestamp facts are stored incorrectly via the new json fact api

Added by Ohad Levy about 9 years ago. Updated about 9 years ago.

Status:
Rejected
Priority:
Normal
Category:
Facts
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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.

History

#1 Updated by Ohad Levy about 9 years ago

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

#2 Updated by Greg Sutcliffe about 9 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.

#3 Updated by Dominic Cleal about 9 years ago

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

#4 Updated by Dominic Cleal about 9 years ago

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

Can't reproduce this, see PR.

#5 Updated by Dominic Cleal about 9 years ago

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

Also available in: Atom PDF