@@ -67,7 +67,7 @@ message GetWorkflowRequest {
6767message PublishWorkflowReleaseRequest {
6868 string workflow_slug = 1 [(buf.validate.field ) .string.min_len = 1 ];
6969 tilebox.v1.ID artifact_id = 2 [(buf.validate.field ).required = true ];
70- repeated TaskIdentifier tasks = 3 [(buf.validate.field ) .repeated .min_items = 1 ];
70+ ReleaseContent content = 3 [(buf.validate.field ).required = true ];
7171}
7272
7373// ListWorkflowsRequest lists all workflows.
@@ -98,11 +98,35 @@ message Workflow {
9898// WorkflowRelease represents an immutable release of a workflow, which includes a set of tasks and an artifact.
9999message WorkflowRelease {
100100 tilebox.v1.ID id = 1 ;
101- tilebox.v1.ID artifact_id = 2 ;
102- repeated TaskIdentifier tasks = 3 ;
101+ Artifact artifact = 2 ;
102+ ReleaseContent content = 3 ;
103103 google.protobuf.Timestamp created_at = 4 ;
104104}
105105
106+ // Artifact represents the artifact associated with a workflow release,
107+ // which is the file that contains the code and dependencies needed to execute the tasks in the release.
108+ message Artifact {
109+ tilebox.v1.ID id = 1 ;
110+ string digest = 2 [(buf.validate.field ) .string.pattern = "^[a-f0-9]{64}$" ];
111+ }
112+
113+ // ReleaseContent represents the content of a workflow release, which is the set of files that are included,
114+ // the list of task identifiers, and the command to start a worker runtime for executing the tasks in the release.
115+ // The fingerprint is a hash of the release content.
116+ message ReleaseContent {
117+ string fingerprint = 1 [(buf.validate.field ) .string.pattern = "^[a-f0-9]{64}$" ];
118+ repeated TaskIdentifier tasks = 2 [(buf.validate.field ) .repeated.min_items = 1 ];
119+ Path root = 3 ;
120+ repeated string command = 4 ;
121+ }
122+
123+ // Path represents a file or directory path in the release content. If it is a directory, it can have child paths.
124+ message Path {
125+ string path = 1 ;
126+ bool directory = 2 ;
127+ repeated Path children = 3 ;
128+ }
129+
106130// DeployWorkflowReleaseRequest deploys a workflow release to a set of clusters, making the tasks available for
107131// execution on those clusters.
108132message DeployWorkflowReleaseRequest {
0 commit comments