From d326ffcdb44c50d8837dfd526b9e8f014b9e204d Mon Sep 17 00:00:00 2001 From: donoghuc Date: Fri, 10 May 2024 11:19:53 -0700 Subject: [PATCH] (GH-3310) Sync core types and providers for apply Previously when puppet 5 agents were around we stopped syncing core types and providers because they were conflicting with builtin types. We assumed that we could just use these on agents. For the most part this works, but for the local transport when using bundled-ruby this is not the case. This commit updates apply to sync builtin types and providers. This will result in slightly larget pluginsync tar archives and opens up potential issues for puppet agent incompatabilities between the core types shipped with bolt vs what may be on the agent bolt is targetting. However this risk should be quite small compared with the complexity of trying to handle bundled-ruby case differently for apply. !bug * **Pluginsync builtin bolt content** [#GH-3310](GH-3310) Previously we were not pluginsyncing builtin content to avoid conflicting with puppet 5 builtin types. This was breaking assumptions for bundled-ruby config and should no longer be an issue with modern agents. --- lib/bolt/pal.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/bolt/pal.rb b/lib/bolt/pal.rb index 10ac996aa1..6fd71e03a2 100644 --- a/lib/bolt/pal.rb +++ b/lib/bolt/pal.rb @@ -224,10 +224,12 @@ def with_bolt_executor(executor, inventory, pdb_client = nil, applicator = nil, inventory, executor, full_modulepath, - # Skip syncing built-in plugins, since we vendor some Puppet 6 - # versions of "core" types, which are already present on the agent, - # but may cause issues on Puppet 5 agents. - user_modulepath, + # Sync builtin types etc. Previously we were not doing this due to issues with puppet 5 + # agents. Now that core types and providers are separated into modules for puppet 6 and + # newer we can safely sync them again. This will result in slightly larger pluginsync + # tar archives but it will handle the case where bundled-ruby over local transport is + # used. + full_modulepath, @project, pdb_client, @hiera_config,