// UpdateRunState sets the run state at the respective time.
356356
func (d *TaskControlService) UpdateRunState(ctx context.Context, taskID, runID influxdb.ID, when time.Time, state backend.RunStatus) error {
	d.mu.Lock()
	defer d.mu.Unlock()

	run, ok := d.runs[taskID][runID]
	if !ok {
		panic("run state called without a run")
	}
	switch state {
	case backend.RunStarted:
		run.StartedAt = when.Format(time.RFC3339Nano)
	case backend.RunSuccess, backend.RunFail, backend.RunCanceled:
		run.FinishedAt = when.Format(time.RFC3339Nano)
	case backend.RunScheduled:
		// nothing
	default:
		panic("invalid status")
	}
	run.Status = state.String()
	return nil
}
333067
func (ds *dockerService) UpdateRuntimeConfig(_ context.Context, r *runtimeapi.UpdateRuntimeConfigRequest) (*runtimeapi.UpdateRuntimeConfigResponse, error) {
	runtimeConfig := r.GetRuntimeConfig()
	if runtimeConfig == nil {
		return &runtimeapi.UpdateRuntimeConfigResponse{}, nil
	}

	klog.Infof("docker cri received runtime config %+v", runtimeConfig)
	if ds.network != nil && runtimeConfig.NetworkConfig.PodCidr != "" {
		event := make(map[string]interface{})
		event[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR] = runtimeConfig.NetworkConfig.PodCidr
		ds.network.Event(network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE, event)
	}

	return &runtimeapi.UpdateRuntimeConfigResponse{}, nil
}
1271979
func (r *Runc) Update(context context.Context, id string, resources *specs.LinuxResources) error {
	buf := getBuf()
	defer putBuf(buf)

	if err := json.NewEncoder(buf).Encode(resources); err != nil {
		return err
	}
	args := []string{"update", "--resources", "-", id}
	cmd := r.command(context, args...)
	cmd.Stdin = buf
	return r.runOrError(cmd)
}
923434
func (r *Resolver) UpdateState(s resolver.State) {
	r.cc.UpdateState(s)
}
1305464
func (s *ComputeCapacityStatus) SetRunning(v int64) *ComputeCapacityStatus {
	s.Running = &v
	return s
}
54518
func (s *AccountModification) SetModificationState(v string) *AccountModification {
	s.ModificationState = &v
	return s
}
769179
func (c *FakeStatefulSets) Update(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*appsv1.StatefulSet), err
}
796783
func (s *Problem) SetRun(v *ProblemDetail) *Problem {
	s.Run = v
	return s
}
1193448
func (s *StateSyncer) Run() {
	if s.ClusterSize == nil {
		panic("ClusterSize not set")
	}
	s.runFSM(fullSyncState, s.nextFSMState)
}
714149
func (s *Server) UpdateRuntimeConfig(ctx context.Context, req *pb.UpdateRuntimeConfigRequest) (resp *pb.UpdateRuntimeConfigResponse, err error) {
	const operation = "update_runtime_config"
	defer func() {
		recordOperation(operation, time.Now())
		recordError(operation, err)
	}()

	return &pb.UpdateRuntimeConfigResponse{}, nil
}
798822
func (e *Execution) ModifyState(c context.Context, newState dm.Execution_State) error {
	if e.State == newState {
		return nil
	}
	if err := e.State.Evolve(newState); err != nil {
		return err
	}
	now := clock.Now(c).UTC()
	if now.After(e.Modified) {
		e.Modified = now
	} else {
		// Microsecond is the smallest granularity that datastore can store
		// timestamps, so use that to disambiguate: the goal here is that any
		// modification always increments the modified time, and never decrements
		// it.
		e.Modified = e.Modified.Add(time.Microsecond)
	}
	return nil
}
1339280
func (s *sharedPullerState) Updated() time.Time {
	s.mut.RLock()
	t := s.updated
	s.mut.RUnlock()
	return t
}
518949
func (run *PipelineRun) update() {
	href := run.URLs["self"]["href"]
	if matches := baseURLRegex.FindStringSubmatch(href); len(matches) > 1 {
		run.Base = matches[1]
	}
	for i := range run.Stages {
		run.Stages[i].Run = run
		href := run.Stages[i].URLs["self"]["href"]
		if matches := baseURLRegex.FindStringSubmatch(href); len(matches) > 1 {
			run.Stages[i].Base = matches[1]
		}
	}
}
279439
func (s *BatchServiceStateManager) updateServiceCurrentState(state service.ServiceCurrentState, serviceIDs ...string) {
	// Cancel any existing waits
	for _, sid := range serviceIDs {
		if thread, ok := s.currentStateWaits[sid]; ok {
			thread.Cancel()
			delete(s.currentStateWaits, sid)
		}
	}
	s.Facade.SetServicesCurrentState(s.ctx, state, serviceIDs...)

}
11140
func (s *StartApplicationInput) SetRunConfiguration(v *RunConfiguration) *StartApplicationInput {
	s.RunConfiguration = v
	return s
}
54859
func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
	result = &v1beta1.StatefulSet{}
	err = c.client.Put().
		Namespace(c.ns).
		Resource("statefulsets").
		Name(statefulSet.Name).
		Body(statefulSet).
		Do().
		Into(result)
	return
}
105945
func (f *RemoteRuntime) UpdateRuntimeConfig(ctx context.Context, req *kubeapi.UpdateRuntimeConfigRequest) (*kubeapi.UpdateRuntimeConfigResponse, error) {
	err := f.RuntimeService.UpdateRuntimeConfig(req.RuntimeConfig)
	if err != nil {
		return nil, err
	}

	return &kubeapi.UpdateRuntimeConfigResponse{}, nil
}