If a facts file is provided to puppet lookup, then its contents are merged to the node's facts after classification, which means the lookup may be occur in the wrong environment.
It would be more consistent if facts in the file were merged with the node's facts prior to prior to sending the node request.
If a facts file is provided to puppet lookup, then its contents are merged to the node's facts after classification, which means the lookup may be occur in the wrong environment.
It would be more consistent if lookup retrieved facts in using the file were facts terminus, merged with the node's facts prior to prior to sending file, and submitted the facts in the node request.
Fixed a bug where facts provided in a file weren't being merged with the facts used for classification. This is because we collected and merged the said facts after the classification happened. To fix this, we ensured that we resolve the facts that will be used for classification before the node request.