Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Puppet4API Project Task 4-6] Load Puppet Custom Types, Defined Types and Classes via Puppet API v4 #137

Closed
glennsarti opened this issue Jun 2, 2019 · 0 comments · Fixed by #138
Assignees
Labels
enhancement New feature or request Language Server
Milestone

Comments

@glennsarti
Copy link
Contributor

Task 4-6 of the Puppet 4 API Project


Task 4

Load Puppet Custom Types via the Puppet 4 API loaders

Task 5

Load Puppet Defined Types via the Puppet 4 API loaders

Task 6

Load Puppet Classes via the Puppet 4 API loaders

Note that we can add documentation as Puppet Strings is now available so this is a slight change to behaviour

@glennsarti glennsarti self-assigned this Jun 2, 2019
@glennsarti glennsarti added enhancement New feature or request Language Server labels Jun 2, 2019
@glennsarti glennsarti added this to the 0.20.0 milestone Jun 2, 2019
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jun 2, 2019
Now that there is a puppetstrings feature flag, we can change the loading
behaviour of the Custom Types to use the newer loader and Puppet Strings
metadata evaluation.  This commit;

* Adds Custom Types ('type') ability to the retrieve_via_puppet_strings method
* Custom Types loading isn't fully implemented like Puppet Functions are, in
  particular there's no use of the Smart Paths, and the loader still uses the
  old autoload methods.  To work around this a new loader is created, which is
  based on the the NullLoader.  It's purpose is to only support the needed
  discover_path method, however as it's a NullLoader, it won't actually load
  anything if it's called by Puppet.

  This loader calls the old autoloader using the same logic we used previously
  but surfaced via the loader.
* Just like the previous loading mechanism, the whit and component types are
  ignored.
* The Puppet Strings helper is updated to support reading the type data from
  Puppet Strings.  Note that class documentation is now available whereas
  in the current iteration of the sidecar it is not.
* The integration tests were updated to test for the new information and that
  the data can be cached correctly.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jun 2, 2019
…trings

Now that there is a puppetstrings feature flag, we can change the loading
behaviour of Puppet Classes and Defined Types to use the newer loader and
Puppet Strings metadata evaluation.  This commit;

* Uses a "fake" object type called sidecar_manifest to interrogate the loaders
  for the information.  This is because there's no type name in the loaders
  which suits our needs.  By using such a strict name we can be sure that the
  default loaders will just ignore it.
* The PathDiscoveryNullLoader is updated to discover all of the paths to the
  manifests in the environment.
* The Puppet Strings helper is updated to support reading the type data from
  Puppet Strings.  Note that class documentation is now available whereas
  in the current iteration of the sidecar it is not.
* The integration tests were updated to test for the new information and that
  the data can be cached correctly.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jun 6, 2019
Now that there is a puppetstrings feature flag, we can change the loading
behaviour of the Custom Types to use the newer loader and Puppet Strings
metadata evaluation.  This commit;

* Adds Custom Types ('type') ability to the retrieve_via_puppet_strings method
* Custom Types loading isn't fully implemented like Puppet Functions are, in
  particular there's no use of the Smart Paths, and the loader still uses the
  old autoload methods.  To work around this a new loader is created, which is
  based on the the NullLoader.  It's purpose is to only support the needed
  discover_path method, however as it's a NullLoader, it won't actually load
  anything if it's called by Puppet.

  This loader calls the old autoloader using the same logic we used previously
  but surfaced via the loader.
* Just like the previous loading mechanism, the whit and component types are
  ignored.
* The Puppet Strings helper is updated to support reading the type data from
  Puppet Strings.  Note that class documentation is now available whereas
  in the current iteration of the sidecar it is not.
* The integration tests were updated to test for the new information and that
  the data can be cached correctly.
glennsarti added a commit to glennsarti/puppet-editor-services that referenced this issue Jun 6, 2019
…trings

Now that there is a puppetstrings feature flag, we can change the loading
behaviour of Puppet Classes and Defined Types to use the newer loader and
Puppet Strings metadata evaluation.  This commit;

* Uses a "fake" object type called sidecar_manifest to interrogate the loaders
  for the information.  This is because there's no type name in the loaders
  which suits our needs.  By using such a strict name we can be sure that the
  default loaders will just ignore it.
* The PathDiscoveryNullLoader is updated to discover all of the paths to the
  manifests in the environment.
* The Puppet Strings helper is updated to support reading the type data from
  Puppet Strings.  Note that class documentation is now available whereas
  in the current iteration of the sidecar it is not.
* The integration tests were updated to test for the new information and that
  the data can be cached correctly.
Support Puppet 4 API and Puppet Agent 6 Features automation moved this from To do to Done Jun 6, 2019
michaeltlombardi added a commit that referenced this issue Jun 6, 2019
…et API v4 (#138)

(GH-137) Load Puppet Custom Types, Defined Types and Classes via Puppet API v4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Language Server
Projects
None yet
1 participant