concord icon indicating copy to clipboard operation
concord copied to clipboard

concord-cli: provide default process configuration

Open benbroadaway opened this issue 3 years ago • 0 comments

The initial problem this was intended to solve: simple flows that are not compatible with the CLI because they use the http task which is provided by default in the Agent-packaged runtime, but not in the CLI runtime. The current remedy for that is to throw http-tasks in the workflow's configuration.dependencies. That's annoying and conflicts with our documentation

It is provided automatically by Concord, and does not require any external dependencies.

Similar issue with slack and concord tasks. Admittedly, those tend to be less useful or their functionality simply doesn't work with the CLI (e.g. can't fork a CLI process). But I think it's better to fail on the direct incompatibility than a more confusing Error: Task not found: 'concord'.

This change provides a few way to remedy that problem. They all essentially take advantage of Concord's additional files functionality by copying a default from somewhere to concord/_defaultCfg.concord.yml:

1. Copy an embedded default process configuration resource By default, the CLI runtime will copy a provided concord process definition resource containing dependencies for concord, slack, and http tasks.

2. Copy a local default file from ~/.concord/defaultCfg.yml A user may create their own global default file which will override the embedded default file.

3. Copy a default file specified by --default-cfg command line parameter Highest precedence.

$ concord run --default-cfg /path/to/another/config.yml .

benbroadaway avatar Sep 05 '22 14:09 benbroadaway