Skip to content

allow coder script ordering to be managed at runtime via CLI #1095

@SasSwart

Description

@SasSwart

Relates to: coder/coder#10352
Blocked by: #1094

Once we can track and react to dependencies between resources such as coder scripts, we need to allow scripts to register their dependencies on one another. At least two options are available:

  • coder scripts can register themselves and their dependencies using a CLI command at runtime.
  • templates can define dependencies in terraform, which are communicated to the agent on startup.

The first option has a lower burden on our long-term public API, in that it is easier to deprecate a new CLI command than it is to deprecate new attributes in our terraform provider.

As such, this issue represents the implementation of a CLI command that can register dependencies with a locally available coder agent and wait for the appropriate signal to proceed with execution.

To accomplish this:

  • the dependency graph interface must be injected into the coder agent so that it is available to other workspace agent components
  • workspace agents must listen for dependency registration on a locally available, well-known port range
  • a new cli command must find and signal the well-known port in order to perform the actions described in add a graph to workspace agents that tracks dependencies between scripts #1093

Some form of simple script authentication might be necessary, but all scripts are able to register themselves and their dependencies, so no authz is limited to ensuring that scripts only act on themselves.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions