[PUP-7115] Un-vendor semantic_puppet gem for Puppet 6 Created: 2017/01/19  Updated: 2018/09/19  Resolved: 2018/05/22

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 4.9.0
Fix Version/s: PUP 6.0.0

Type: Task Priority: Minor
Reporter: Ethan Brown Assignee: Jorie Tappa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is blocked by PA-1881 Update semantic_puppet component in p... Closed
is blocked by PUP-8558 Remove ability to enable non-strict m... Closed
relates to PA-1077 Figure out how to consolidate gem dep... Accepted
relates to PUP-7114 Re-vendor semantic_puppet gem Closed
Acceptance Criteria:

Add hard gem dependency on the external semantic_puppet gem. We should require "~> 1.0" accept at least 1.0 or greater and less than 2.0.
The gem dependency needs to be updated in 3 places: .gemspec, Gemfile and ext/project_data.yaml.
Delete lib/puppet/vendor/load_semantic_puppet.rb and lib/puppet/vendor/semantic_puppet/
If you build a puppet gem (bundle exec rake package:implode package:bootstrap and bundle exec rake package:gem), then you should be able install each version (there will be 4 platforms) on a clean VM and it should install the semantic_puppet gem 1.0.x as an external dependency.

Epic Link: Unvendor SemanticPuppet
Sub-team: Coremunity
Team: Coremunity
Sprint: Platform Core KANBAN
Release Notes: Bug Fix
Release Notes Summary: Puppet now loads semantic_puppet from a shared gem directory, so that Puppet, Puppet agent, and Puppet Server all require and use the same version of the gem. (~>1.0.x)
QA Risk Assessment: Needs Assessment


In PUP-7114 the semantic_puppet gem was re-vendored into the Puppet repo to prevent packaging conflicts.

In Puppet 5, there will be more latitude to introduce a breaking packaging change that must be coordinated with a server release - and at that point the work from PUP-7114 can be reverted.

Comment by Ethan Brown [ 2017/04/11 ]

Looks like we've been shipping semantic_puppet as part of the agent package, despite removing it from the Puppet repo as a gem dependency. So there's a bit of confusion swirling around this dependency.

Comment by Geoff Nichols [ 2017/05/22 ]

We decided to leave semantic_puppet in place / vendored for Puppet 5, so moving this out for reconsideration for Puppet 6.

Comment by Markus Frosch [ 2017/06/30 ]

This causes interesting problems when developing Puppet modules, and using fixtures from the Forge, instead of direct GIT.

In any environment where the semantic_puppet gem is installed, and loaded before Puppet will do so:

$ puppet module install --ignore-dependencies --force  "puppetlabs-stdlib" --trace --debug
Debug: Runtime environment: puppet_version=5.0.0, ruby_version=2.4.1, run_mode=user, default_encoding=UTF-8
Notice: Preparing to install into /home/markus/.puppetlabs/etc/code/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Error: wrong number of arguments (given 2, expected 1)
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/semantic_puppet-1.0.0/lib/semantic_puppet/version_range.rb:64:in `parse'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/module_tool/applications/installer.rb:209:in `build_single_module_graph'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/module_tool/applications/installer.rb:86:in `run'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/module_tool/applications/application.rb:11:in `run'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/face/module/install.rb:131:in `block (3 levels) in <top (required)>'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/interface/action.rb+eval[wrapper]:242:in `install'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/application/face_base.rb:247:in `main'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/application.rb:366:in `run_command'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/application.rb:358:in `block in run'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/util.rb:666:in `exit_on_fail'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/application.rb:358:in `run'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/util/command_line.rb:132:in `run'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/lib/puppet/util/command_line.rb:72:in `execute'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/gems/puppet-5.0.0/bin/puppet:5:in `<top (required)>'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/bin/puppet:23:in `load'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/bin/puppet:23:in `<main>'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/bin/ruby_executable_hooks:15:in `eval'
/home/markus/.rvm/gems/ruby-2.4.1@puppet/bin/ruby_executable_hooks:15:in `<main>'
Error: Try 'puppet help module install' for usage

Comment by Markus Frosch [ 2017/06/30 ]

Or at least update semantic_puppet on GitHub and release the Gem...

Comment by Thomas Hallgren [ 2017/06/30 ]

Markus Frosch, the problem you describe is being dealt with in PUP-7738.

Comment by Josh Cooper [ 2018/05/11 ]

Merged to puppet#master in https://github.com/puppetlabs/puppet/commit/8c7e261c9cbf47122b7a1d95fb156655b0db43f1

Generated at Sat Jul 11 07:47:51 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.