feat(tasks): allow switching a task's executor before materialization (#3559)

Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com>
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
This commit is contained in:
Henry
2026-09-13 22:25:16 +08:00
committed by GitHub
parent 0c2901a788
commit 20308a2d16
103 changed files with 7902 additions and 394 deletions
@@ -171,6 +171,14 @@ func (r *Repository) GetTaskEnvironmentByTaskID(ctx context.Context, taskID stri
return env, nil
}
// GetTaskEnvironmentExistenceByTaskIDs reports, for each of taskIDs, whether
// any task_environments row exists — the same unconditional presence check
// runnerHasEnvironment makes for one task, batched behind a single IN-clause
// query for a projection covering many.
func (r *Repository) GetTaskEnvironmentExistenceByTaskIDs(ctx context.Context, taskIDs []string) (map[string]bool, error) {
return r.batchedTaskIDExistence(ctx, "task_environments", taskIDs)
}
// UpdateTaskEnvironment updates an existing task environment.
// Per-repo rows are not touched; use the TaskEnvironmentRepo CRUD methods.
func (r *Repository) UpdateTaskEnvironment(ctx context.Context, env *models.TaskEnvironment) error {