Skip to content

add a graph to workspace agents that tracks dependencies between scripts #1093

@SasSwart

Description

@SasSwart

Relates to: coder/coder#10352

In order to track dependencies between coder scripts and other resources during workspace initialisation and runtime, we need a graph implementation inside the workspace agent.

Coder scripts and other consumers of the API may register themselves as vertices of the graph.
When a script changes its own status in this graph, dependent vertices will eventually be notified so that they may begin their own execution if conditions are right to do so. However, this notification is beyond scope for the current issue.

To close this issue, a consumer of the new graph interface must be able to:

  • register itself as a vertex in the graph
  • register its dependencies and dependents
  • update its own status

Beyond scope for this issue:

  • notifying dependencies when a status changes
  • exposing the graph to the rest of the agent, the cli or to terraform

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