controlplanejob

package
v0.19.1069 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const TaskQueue = "control-plane-builds"

Variables

This section is empty.

Functions

func AwaitExecuteControlPlaneJob

func AwaitExecuteControlPlaneJob(ctx workflow.Context, req *ExecuteRequest, opts ...*workflow.ChildWorkflowOptions) error

func NewWorker

func NewWorker(c tclient.Client, cfg WorkerConfig, activities ...any) worker.Worker

NewWorker creates a worker that polls the control-plane build task queue on the given namespace client and registers the provided activities.

The ExecuteControlPlaneJob workflow runs as a child of its caller, so it inherits the caller's namespace and its RunJob activity is pinned to the control-plane build task queue in that same namespace (see workflow.go). Every namespace that starts control-plane build child workflows (components for component builds, apps for sandbox builds) must therefore run one of these workers, otherwise RunJob is scheduled on a task queue with no poller and the build hangs silently until its execution timeout.

Types

type Activities

type Activities struct {
	// contains filtered or unexported fields
}

func NewActivities

func NewActivities(params ActivityParams) *Activities

func (*Activities) AllActivities added in v0.19.1059

func (a *Activities) AllActivities() []any

func (*Activities) CreateJobExecutionOutputs

func (a *Activities) CreateJobExecutionOutputs(ctx context.Context, jobID, executionID string, req *models.ServiceCreateRunnerJobExecutionOutputsRequest) (*models.AppRunnerJobExecutionOutputs, error)

func (*Activities) CreateJobExecutionResult

func (a *Activities) CreateJobExecutionResult(ctx context.Context, jobID, executionID string, req *models.ServiceCreateRunnerJobExecutionResultRequest) (*models.AppRunnerJobExecutionResult, error)

func (*Activities) GetJob added in v0.19.1058

func (a *Activities) GetJob(ctx context.Context, jobID string) (*models.AppRunnerJob, error)

func (*Activities) GetJobCompositePlan added in v0.19.1053

func (a *Activities) GetJobCompositePlan(ctx context.Context, jobID string) (*models.PlantypesCompositePlan, error)

func (*Activities) GetJobPlanJSON

func (a *Activities) GetJobPlanJSON(ctx context.Context, jobID string) (string, error)

func (*Activities) UpdateJobExecution

func (a *Activities) UpdateJobExecution(ctx context.Context, jobID, executionID string, req *models.ServiceUpdateRunnerJobExecutionRequest) (*models.AppRunnerJobExecution, error)

func (*Activities) WriteControlPlaneLogs

func (a *Activities) WriteControlPlaneLogs(ctx context.Context, logStreamID string, records []runnercontrolplane.OTELLogRecord) error

func (*Activities) WriteControlPlaneTraces

func (a *Activities) WriteControlPlaneTraces(ctx context.Context, runnerID string, records []runnercontrolplane.OTELTraceRecord) error

type ActivityParams

type ActivityParams struct {
	fx.In

	DB   *gorm.DB `name:"psql"`
	CHDB *gorm.DB `name:"ch"`
	Cfg  *internal.Config
	L    *zap.Logger
	MW   metrics.Writer

	BlobSvc          blobstore.Service
	StatusActivities *statusactivities.Activities
}

type EnsureExecutionResponse

type EnsureExecutionResponse struct {
	ExecutionID         string        `json:"execution_id"`
	JobExecutionTimeout time.Duration `json:"job_execution_timeout"`
}

type ExecuteRequest

type ExecuteRequest struct {
	JobID string `json:"job_id" validate:"required"`
}

type FinalizeOutcome

type FinalizeOutcome struct {
	Status app.RunnerJobExecutionStatus `json:"status"`
	Error  string                       `json:"error,omitempty"`
}

type FinalizeResponse added in v0.19.1058

type FinalizeResponse struct {
	Status app.RunnerJobExecutionStatus `json:"status"`
}

type WorkerConfig

type WorkerConfig struct {
	MaxConcurrentActivityExecutionSize int
	MaxConcurrentActivityTaskPollers   int
	Interceptors                       []interceptor.WorkerInterceptor
	WorkflowPanicPolicy                worker.WorkflowPanicPolicy
}

WorkerConfig configures a control-plane build worker.

type Workflows

type Workflows struct{}

func NewWorkflows

func NewWorkflows() *Workflows

func (*Workflows) ExecuteControlPlaneJob

func (w *Workflows) ExecuteControlPlaneJob(ctx workflow.Context, req *ExecuteRequest) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL