[PUP-7815] Modules can find and list all their tasks Created: 2017/08/02 Updated: 2017/09/14 Resolved: 2017/08/23
|Fix Version/s:||PUP 5.2.0|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Epic Link:||Puppet Server API for Tasks|
|Sprint:||Org Scale Red Team 2017-08-22, Org Scale Red Team 2017-09-05|
|Release Notes:||Not Needed|
|QA Risk Assessment:||Needs Assessment|
This ticket covers giving modules the ability to list all the tasks that they contain. This involves:
Can be used to call from Clojure (Puppet server) so that the Puppet team can change the underlying implementation if we wish.
The new API:
If there are no tasks in the named environment, returns the empty array.
Note that no information about the task itself is returned (e.g. metadata or file information), so no files are read or statted; the only filesystem IO performed is directory scans of each modules' tasks directory.
Arguments: "environment_name", "module", "task_name"
If the named module does not exist, raises Puppet::Module::MissingModule.
If the named environment does not exist, raises Puppet::Environments::EnvironmentNotFound.
If the named task does not exist, raises Puppet::Module::Task::TaskNotFound.
The path to the metadata file of a task should be retreivable from outside the task class; if no metadata file was provided when the task was created, it should be nil.
|Comment by Henrik Lindberg [ 2017/08/03 ]|
I think tasks should be represented by puppet data types. We then have all the loading, reflection, serialization, etc. already implemented. It also makes it possible to directly and without ambiguity refer to a task via its name.
|Comment by Moses Mendoza [ 2017/08/15 ]|
merged to puppet/master at https://github.com/puppetlabs/puppet/commit/0c94a921b8cb9bb65c5c42381ee013afa6976d10
|Comment by Kenn Hussey [ 2017/08/21 ]|
Moses Mendoza if a PR has been merged, should this issue be moved to 'Ready for CI', or is additional information/work required here?
|Comment by Moses Mendoza [ 2017/08/21 ]|
Kenn Hussey I'm not sure what the tasks team workflow is - this issue appears to have been in ready for ci and was moved to needs information later?
|Comment by Dan Lidral-Porter [ 2017/08/22 ]|
This is in 'Needs Information' to reflect it being blocked on puppet agent CI problems – the last passing puppet-agent build is from August 11th, before this was merged.
|Comment by Kenn Hussey [ 2017/08/28 ]|
Justin Holguin please add release notes for this issue, if needed.
|Comment by Garrett Guillotte [ 2017/09/07 ]|
> Justin Holguin please add release notes for this issue, if needed.
Please and thank you! I'm compiling release notes now.