-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactor : Use a sidecar for puppet things which cannot be unloaded #40
Labels
enhancement
New feature or request
Milestone
Comments
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 11, 2018
Previously all of the Puppet helpers ran inside of a single instance of Puppet, however this causes issues because classes and types cannot be unloaded in a running instance. So instead, a sidecar executable is created which will run out of process, in a fresh Puppet configuration, to enable enumerating types, classes and functions etc. This commit creates the basic skeleton of this sidecar process.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 11, 2018
This commit marks the puppet-language-sidecar ruby file as executable. This is mainly helpful for linux based developers.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 11, 2018
The Language Server and the sidecar need an agreed upon protocol to communicate properly. The agreed upon encoding will be UTF8 JSON strings. This commit adds the required classes which can be used to serialise and deserialise objects to and from the sidecar process. This commit also includes tests to validate the serialisation process.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 11, 2018
…tions and types This commit adds the ability for the sidecar process to enumerate classes, functions and types, either in the default configuration (i.e. like a real puppet agent) or only within the confines of a workspace directory (e.g. when editing a module or control-repo). Currently this only supports querying a puppet module workspace. This commit also adds the ability to pass in puppet options (e.g. --vardir) into the puppet configuration for the sidecar. This commit also uses a filesystem based caching mechanism to speed up the default enumerations. The majority of this code was extracted from the existing PuppetHelper in the Language Server and Puppet Monkey Patches.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 11, 2018
…unctions and types This commit adds implementation and behavioural tests for the language sidecar process enumerating classes, functions and types.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 12, 2018
…unctions and types This commit adds implementation and behavioural tests for the language sidecar process enumerating classes, functions and types.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 13, 2018
…tions and types This commit adds the ability for the sidecar process to enumerate classes, functions and types, either in the default configuration (i.e. like a real puppet agent) or only within the confines of a workspace directory (e.g. when editing a module or control-repo). Currently this only supports querying a puppet module workspace. This commit also adds the ability to pass in puppet options (e.g. --vardir) into the puppet configuration for the sidecar. This commit also uses a filesystem based caching mechanism to speed up the default enumerations. The majority of this code was extracted from the existing PuppetHelper in the Language Server and Puppet Monkey Patches.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 13, 2018
…unctions and types This commit adds implementation and behavioural tests for the language sidecar process enumerating classes, functions and types.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 13, 2018
This commit adds the ability for the Sidecar to fetch the resources for a given typename and title via the Action Parameters command line argument. This is similar to a `puppet resource` call. This commit also adds the required sidecar protocol additions and tests for the behaviour.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 13, 2018
Previously a sidecar process was introduced to query puppet for information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead. This commit also uses a queueing mechanism to throttle the sidecar and ensure that if there are duplicate sidecar requests, only the most recent is processed. This ensures that that CPU and memory use is capped, but still maintains a good repsonse time and user experience.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 13, 2018
With the removal of the Puppet Helper calling puppet directly, but using the sidecar, many of the test fixtures are no longer required. This commit removes the un-needed files.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 13, 2018
Previously a sidecar process was introduced to query puppet for information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead. This commit also uses a queueing mechanism to throttle the sidecar and ensure that if there are duplicate sidecar requests, only the most recent is processed. This ensures that that CPU and memory use is capped, but still maintains a good repsonse time and user experience.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 13, 2018
Previously a sidecar process was introduced to query puppet for resource information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 13, 2018
With the removal of the Puppet Helper calling puppet directly, but using the sidecar, many of the test fixtures are no longer required. This commit removes the un-needed files.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 14, 2018
This commit adds the ability for the Sidecar to fetch the resources for a given typename and title via the Action Parameters command line argument. This is similar to a `puppet resource` call. This commit also adds the required sidecar protocol additions and tests for the behaviour.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 16, 2018
This commit adds the ability for the Sidecar to fetch the resources for a given typename and title via the Action Parameters command line argument. This is similar to a `puppet resource` call. This commit also adds the required sidecar protocol additions and tests for the behaviour.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 16, 2018
This commit adds the ability for the sidecar to generate a node graph for a manifest file on disk. The path the manifest is passed via the source Action Parameter. This commit also adds the required sidecar protocol additions and tests for the behaviour.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 16, 2018
Previously a sidecar process was introduced to query puppet for information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead. This commit also uses a queueing mechanism to throttle the sidecar and ensure that if there are duplicate sidecar requests, only the most recent is processed. This ensures that that CPU and memory use is capped, but still maintains a good repsonse time and user experience.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 16, 2018
Previously a sidecar process was introduced to query puppet for resource information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 16, 2018
With the removal of the Puppet Helper calling puppet directly, but using the sidecar, many of the test fixtures are no longer required. This commit removes the un-needed files.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 18, 2018
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 18, 2018
Previously a sidecar process was introduced to query puppet for resource information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 18, 2018
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 18, 2018
With the removal of the Puppet Helper calling puppet directly, but using the sidecar, many of the test fixtures are no longer required. This commit removes the un-needed files.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 19, 2018
Previously all of the Puppet helpers ran inside of a single instance of Puppet, however this causes issues because classes and types cannot be unloaded in a running instance. So instead, a sidecar executable is created which will run out of process, in a fresh Puppet configuration, to enable enumerating types, classes and functions etc. This commit creates the basic skeleton of this sidecar process.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Jul 19, 2018
This commit marks the puppet-language-sidecar ruby file as executable. This is mainly helpful for linux based developers.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
…tions and types This commit adds the ability for the sidecar process to enumerate classes, functions and types, either in the default configuration (i.e. like a real puppet agent) or only within the confines of a workspace directory (e.g. when editing a module or control-repo). Currently this only supports querying a puppet module workspace. This commit also adds the ability to pass in puppet options (e.g. --vardir) into the puppet configuration for the sidecar. This commit also uses a filesystem based caching mechanism to speed up the default enumerations. The majority of this code was extracted from the existing PuppetHelper in the Language Server and Puppet Monkey Patches.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
…unctions and types This commit adds implementation and behavioural tests for the language sidecar process enumerating classes, functions and types.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
This commit adds the ability for the Sidecar to fetch the resources for a given typename and title via the Action Parameters command line argument. This is similar to a `puppet resource` call. This commit also adds the required sidecar protocol additions and tests for the behaviour.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
This commit adds the ability for the sidecar to generate a node graph for a manifest file on disk. The path the manifest is passed via the source Action Parameter. This commit also adds the required sidecar protocol additions and tests for the behaviour.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
Previously a sidecar process was introduced to query puppet for information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead. This commit also uses a queueing mechanism to throttle the sidecar and ensure that if there are duplicate sidecar requests, only the most recent is processed. This ensures that that CPU and memory use is capped, but still maintains a good repsonse time and user experience.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
Previously a sidecar process was introduced to query puppet for resource information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
With the removal of the Puppet Helper calling puppet directly, but using the sidecar, many of the test fixtures are no longer required. This commit removes the un-needed files.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
Previously all of the Puppet helpers ran inside of a single instance of Puppet, however this causes issues because classes and types cannot be unloaded in a running instance. So instead, a sidecar executable is created which will run out of process, in a fresh Puppet configuration, to enable enumerating types, classes and functions etc. This commit creates the basic skeleton of this sidecar process.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
This commit marks the puppet-language-sidecar ruby file as executable. This is mainly helpful for linux based developers.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
The Language Server and the sidecar need an agreed upon protocol to communicate properly. The agreed upon encoding will be UTF8 JSON strings. This commit adds the required classes which can be used to serialise and deserialise objects to and from the sidecar process. This commit also includes tests to validate the serialisation process.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
…tions and types This commit adds the ability for the sidecar process to enumerate classes, functions and types, either in the default configuration (i.e. like a real puppet agent) or only within the confines of a workspace directory (e.g. when editing a module or control-repo). Currently this only supports querying a puppet module workspace. This commit also adds the ability to pass in puppet options (e.g. --vardir) into the puppet configuration for the sidecar. This commit also uses a filesystem based caching mechanism to speed up the default enumerations. The majority of this code was extracted from the existing PuppetHelper in the Language Server and Puppet Monkey Patches.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
…unctions and types This commit adds implementation and behavioural tests for the language sidecar process enumerating classes, functions and types.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
This commit adds the ability for the Sidecar to fetch the resources for a given typename and title via the Action Parameters command line argument. This is similar to a `puppet resource` call. This commit also adds the required sidecar protocol additions and tests for the behaviour.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
This commit adds the ability for the sidecar to generate a node graph for a manifest file on disk. The path the manifest is passed via the source Action Parameter. This commit also adds the required sidecar protocol additions and tests for the behaviour.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
Previously a sidecar process was introduced to query puppet for information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead. This commit also uses a queueing mechanism to throttle the sidecar and ensure that if there are duplicate sidecar requests, only the most recent is processed. This ensures that that CPU and memory use is capped, but still maintains a good repsonse time and user experience.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
Previously a sidecar process was introduced to query puppet for resource information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 3, 2018
With the removal of the Puppet Helper calling puppet directly, but using the sidecar, many of the test fixtures are no longer required. This commit removes the un-needed files.
jpogran
pushed a commit
that referenced
this issue
Oct 11, 2018
(GH-40) Create sidecar process to enumerate puppet types, classes, functions, node graph and puppet resource
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 12, 2018
Previously a sidecar process was introduced to query puppet for information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead. This commit also uses a queueing mechanism to throttle the sidecar and ensure that if there are duplicate sidecar requests, only the most recent is processed. This ensures that that CPU and memory use is capped, but still maintains a good repsonse time and user experience.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 12, 2018
Previously a sidecar process was introduced to query puppet for resource information, however the Language Server was yet to take advantage of it. This commit modifies the Puppet Helper in the Language Server to use the sidecar instead.
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 12, 2018
glennsarti
added a commit
to glennsarti/puppet-editor-services
that referenced
this issue
Oct 12, 2018
With the removal of the Puppet Helper calling puppet directly, but using the sidecar, many of the test fixtures are no longer required. This commit removes the un-needed files.
jpogran
pushed a commit
that referenced
this issue
Oct 16, 2018
(GH-40) Use sidecar process to enumerate puppet types, classes, functions, node graph and puppet resource
Initial sidecar is implemented giving feature parity to the non-sidecar version. Later issues will track adding new features. |
Closing as it's merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The language server is only able to load the default puppet modules that are outside of the thing being edited. This is due to Puppet not really being able to unload classes/types/facts etc. on the fly. So instead we need to call out to an external process to parse that information and then return it to the language server, thus the sidecar.
e.g.
To enumerate all of the Puppet custom types in a working directory;
When the files are edited again, the process is repeated.
The sidecar would also be used for node graph generation, puppet strings
The sidecar would also be used to enumerate the default types/classes/functions and facts
The sidecar wouldn't be needed for linting as that doesn't require loading of puppet code (AFAIK)
The language server would need to throttle sidecar invocations otherwise max CPU and possibly memory could be reached pretty quickly.
The text was updated successfully, but these errors were encountered: