Skip to content

"Command wrapping" isn't straight-forward #2

@timlnx

Description

@timlnx

It's great that we have a functional func-worker ;-)

But we may have neglected to consider exactly how to implement "command" or "module" wrapping. That is to say, a step calling for plugin = funcworker with parameters.command = puppet.Run has no supported translation path into the intended result.

Given a step definition:

        {
            "name": "stop foo service",
            "plugin": "funcworker",
            "parameters": {
                "command": "puppet",
                "subcommand": "run"
            }
        }

Intended Result:

The funcworker handling puppet func commands realizes that there is no actual puppet module in func. The funcworker consults $CONFIG to figure out that requests for puppet.Run actually mean calling the func module.method:

client.command.run("puppet agent --test".split(' '))

I think there's a few options for going forward with this:

  1. Write the actual func plugins for the commands we want at this time
  2. Come up with some hacky system for parsing worker definitions and translating the $NEEDFUL into the appropriate actual func call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions