[PUP-9137] Scope#function_xxx loaded 3x function will be overwritten by 4x load Created: 2018/09/13  Updated: 2018/10/24  Resolved: 2018/09/26

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 5.5.7, PUP 6.0.1

Type: Bug Priority: Normal
Reporter: Henrik Lindberg Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Template: PUP Bug Template
Team: Platform Core
Method Found: Needs Assessment
Release Notes: Bug Fix
Release Notes Summary: 3x functions loaded as side effect of calling `function_<name>` (in Ruby) were again loaded when called from the Puppet Language or when using `call_function` (in Ruby) from another function. This caused warnings for overwrite of already loaded functions to appear in some circumstances (and it impacted performance when reloading).
QA Risk Assessment: Needs Assessment


if a 3.x function is first loaded from within another function (via a function_xxx() call), it is then reloaded if it is called from the puppet language or via Scope#call_function

Reported in PE-25136

This is a consequence of function loading being changed in 5.5.7 and 6.0.0 to allow any module to call a function in any other.

Comment by Josh Cooper [ 2018/09/26 ]

Passed CI in e2f7ccfb7

Generated at Sun May 31 14:04:24 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.