diff --git a/workflows/v1/jobs.go b/workflows/v1/jobs.go index 7abfd94..607b46d 100644 --- a/workflows/v1/jobs.go +++ b/workflows/v1/jobs.go @@ -27,7 +27,7 @@ func NewJobService(client workflowsv1connect.JobServiceClient) *JobService { } } -func (js *JobService) Submit(ctx context.Context, jobName, clusterSlug string, tasks ...Task) (*workflowsv1.Job, error) { +func (js *JobService) Submit(ctx context.Context, jobName, clusterSlug string, maxRetries int, tasks ...Task) (*workflowsv1.Job, error) { if len(tasks) == 0 { return nil, errors.New("no tasks to submit") } @@ -63,8 +63,9 @@ func (js *JobService) Submit(ctx context.Context, jobName, clusterSlug string, t Name: identifier.Name(), Version: identifier.Version(), }, - Input: subtaskInput, - Display: identifier.Display(), + Input: subtaskInput, + Display: identifier.Display(), + MaxRetries: int64(maxRetries), }) } diff --git a/workflows/v1/runner_test.go b/workflows/v1/runner_test.go index 9f8f946..cf0abd0 100644 --- a/workflows/v1/runner_test.go +++ b/workflows/v1/runner_test.go @@ -26,7 +26,7 @@ type badIdentifierTask struct { } func (t *badIdentifierTask) Identifier() TaskIdentifier { - return TaskIdentifier{Name: "", Version: ""} + return NewTaskIdentifier("", "") } func TestTaskRunner_RegisterTask(t *testing.T) {