HomePhorge

(PUP-3130) Remove hidden _timestamp fact
6af0d782595fUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-3130) Remove hidden _timestamp fact

Puppet generates a timestamp when a Puppet::Node::Facts object is
created. During PSON serialization (from agent to master), the timestamp
is serialized separately from the hash of fact values.

Previously, when the master deserialized the facts from JSON, it would
convert the timestamp to a hidden fact named _timestamp, inline with
the normal facts. As a result, there was a _timestamp variable
available in top-scope.

The _timestamp fact was added in 5aa4440b circa 2007. It was
originally called _puppet_timestamp, and then renamed to _timestamp
in a6fe7005.

This commit modifies the Fact object so that it no longer adds a
_timestamp fact during deserialization. Note the timestamp is still
available, via the Facts#timestamp method, it's just not a fact.

This commit also removes the magic behavior of stripping facts with
leading underscores. This improves performance because we no longer
duplicate the values hash, or apply a regex to every fact key.

It also preserves behavior of the compiler, added in fb5f859cf4, which
updates the facts timestamp prior to saving them.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU76397bf3bc9b: Merge remote-tracking branch 'upstream/pr/3230'
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPU6af0d782595f: (PUP-3130) Remove hidden _timestamp fact (authored by Josh Cooper <josh@puppetlabs.com>).Oct 24 2014, 6:21 AM