MCPcopy Create free account
hub / github.com/rilldata/rill / triggerDeploymentReconcileJob

Method triggerDeploymentReconcileJob

admin/deployments.go:729–741  ·  view source on GitHub ↗

triggerDeploymentReconcileJob triggers a reconcile deployment job for the given deployment ID. For more details, see the comments in the ReconcileDeployment job.

(ctx context.Context, deploymentID string)

Source from the content-addressed store, hash-verified

727// triggerDeploymentReconcileJob triggers a reconcile deployment job for the given deployment ID.
728// For more details, see the comments in the ReconcileDeployment job.
729func (s *Service) triggerDeploymentReconcileJob(ctx context.Context, deploymentID string) error {
730 // Trigger reconcile deployment job
731 _, err := s.Jobs.ReconcileDeployment(ctx, deploymentID)
732 if err != nil {
733 // If the job fails to be added, we update the deployment status to error.
734 ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
735 defer cancel()
736 _, err2 := s.DB.UpdateDeploymentStatus(ctx, deploymentID, database.DeploymentStatusErrored, fmt.Sprintf("Failed to Trigger reconcile deployment job: %v", err))
737 s.Logger.Error("failed to schedule reconcile deployment job", zap.String("deployment_id", deploymentID), zap.Error(err), observability.ZapCtx(ctx))
738 return errors.Join(err, err2)
739 }
740 return nil
741}
742
743func (s *Service) provisionRuntime(ctx context.Context, opts *provisionRuntimeOptions) (*database.ProvisionerResource, error) {
744 // Use default if no provisioner is specified.

Callers 5

CreateDeploymentMethod · 0.95
StartDeploymentMethod · 0.95
StopDeploymentMethod · 0.95
UpdateDeploymentMethod · 0.95
TeardownDeploymentMethod · 0.95

Calls 5

ZapCtxFunction · 0.92
ReconcileDeploymentMethod · 0.65
StringMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected