Project

General

Profile

Feature #14448

kafo_parsers should support selecting available providers with soft deps

Added by Dominic Cleal over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:

Description

kafo_parsers should provide a method to recommend a parser based on those providers that are available in the local environment. The current parser only loads on Puppet 3 when available in the same Ruby environment, while #7848 adds a new puppet-strings parser which will only load with that module installed.

For Kafo itself to select a provider, the hard dependency on the puppet gem in the current parser should be removed and the providers should be able to indicate if they are available/ready.


Related issues

Related to Kafo - Feature #7848: YARD / Puppet Strings supportClosed2014-10-08
Blocks Foreman - Tracker #8447: Puppet 4 supportClosed2014-11-19

Associated revisions

Revision fbfbeada (diff)
Added by Dominic Cleal over 5 years ago

fixes #14448 - change Puppet to a soft dep, add helper to find parser

Each parser's `.available?` method now tries to load any dependencies
and indicates if the parser is usable. An exception may be thrown with
more details.

`KafoParsers::Parsers.find_available` finds the first parser that's
available, which should be the preferred way of using kafo_parsers.

Revision d6cbe6b2
Added by Marek Hulán over 5 years ago

Merge pull request #14 from domcleal/14448-available-parsers

fixes #14448 - change Puppet to a soft dep, add helper to find parser

Revision f7a6beae (diff)
Added by Dominic Cleal over 5 years ago

refs #14448 - handle logger being missing

Revision 5998e615
Added by Marek Hulán over 5 years ago

Merge pull request #18 from domcleal/14448-parser-available-exception

refs #14448 - handle logger being missing

Revision d9cf5462 (diff)
Added by Dominic Cleal over 5 years ago

refs #14448 - use kafo_parsers .find_available to load parser

By using the parser cache, the parser is now optional and will raise an
error at runtime if the cache misses and no parser is available. Tests
still require the Puppet 3.x parser to test validations etc.

Revision 056401f4
Added by Marek Hulán over 5 years ago

Merge pull request #138 from domcleal/14448-available-parsers

refs #14448 - use kafo_parsers .find_available to load parser

History

#1 Updated by Dominic Cleal over 5 years ago

#2 Updated by Dominic Cleal over 5 years ago

  • Description updated (diff)

#3 Updated by Dominic Cleal over 5 years ago

#4 Updated by Dominic Cleal over 5 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

#5 Updated by The Foreman Bot over 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/kafo_parsers/pull/14 added

#6 Updated by The Foreman Bot over 5 years ago

  • Pull request https://github.com/theforeman/kafo/pull/138 added

#7 Updated by Dominic Cleal over 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#8 Updated by The Foreman Bot over 5 years ago

  • Pull request https://github.com/theforeman/kafo_parsers/pull/18 added

Also available in: Atom PDF