// SetUpgradeStep sets the UpgradeStep field's value.
183120
func (s *UpgradeStepItem) SetUpgradeStep(v string) *UpgradeStepItem {
	s.UpgradeStep = &v
	return s
}
740956
func (opc *operationCallbacks) SetUpgradeSeriesStatus(upgradeSeriesStatus model.UpgradeSeriesStatus, reason string) error {
	return setUpgradeSeriesStatus(opc.u, upgradeSeriesStatus, reason)
}
87444
func (chs *ChartChangeSync) shouldUpgrade(chartsRepo string, currRel *hapi_release.Release, fhr fluxv1beta1.HelmRelease) (bool, error) {
	if currRel == nil {
		return false, fmt.Errorf("no chart release provided for %v", fhr.GetName())
	}

	currVals := currRel.GetConfig()
	currChart := currRel.GetChart()

	// Get the desired release state
	opts := release.InstallOptions{DryRun: true}
	tempRelName := string(fhr.UID)
	desRel, err := chs.release.Install(chartsRepo, tempRelName, fhr, release.InstallAction, opts, &chs.kubeClient)
	if err != nil {
		return false, err
	}
	desVals := desRel.GetConfig()
	desChart := desRel.GetChart()

	// compare values && Chart
	if diff := cmp.Diff(currVals, desVals); diff != "" {
		if chs.config.LogDiffs {
			chs.logger.Log("error", fmt.Sprintf("release %s: values have diverged due to manual chart release", currRel.GetName()), "resource", fhr.ResourceID().String(), "diff", diff)
		} else {
			chs.logger.Log("error", fmt.Sprintf("release %s: values have diverged due to manual chart release", currRel.GetName()), "resource", fhr.ResourceID().String())
		}
		return true, nil
	}

	if diff := cmp.Diff(sortChartFields(currChart), sortChartFields(desChart)); diff != "" {
		if chs.config.LogDiffs {
			chs.logger.Log("error", fmt.Sprintf("release %s: chart has diverged due to manual chart release", currRel.GetName()), "resource", fhr.ResourceID().String(), "diff", diff)
		} else {
			chs.logger.Log("error", fmt.Sprintf("release %s: chart has diverged due to manual chart release", currRel.GetName()), "resource", fhr.ResourceID().String())
		}
		return true, nil
	}

	return false, nil
}
1316584
func (s *ListStepsOutput) SetSteps(v []*StepSummary) *ListStepsOutput {
	s.Steps = v
	return s
}
979223
func (r Provisioning_Maintenance_Window) AddCustomerUpgradeWindow(customerUpgradeWindow *datatypes.Container_Provisioning_Maintenance_Window) (resp bool, err error) {
	params := []interface{}{
		customerUpgradeWindow,
	}
	err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "addCustomerUpgradeWindow", params, &r.Options, &resp)
	return
}
1065689
func (p *PodSchedulingPolicy) SetUpgrade(upgrade *PodUpgrade) *PodSchedulingPolicy {
	p.Upgrade = upgrade
	return p
}
437611
func (ac *annotationConverter) addSteps(c context.Context, dest *[]buildbot.Step, src []*miloProto.Step_Substep, stepNamePrefix string) error {
	for _, substep := range src {
		stepSrc := substep.GetStep()
		if stepSrc == nil {
			return errors.Reason("unexpected substep type %T", substep.Substep).Err()
		}

		stepDst, err := ac.step(c, stepSrc)
		if err != nil {
			return errors.Annotate(err, "could not convert step %q", stepNamePrefix+stepDst.Name).Err()
		}
		stepDst.Name = stepNamePrefix + stepDst.Name
		*dest = append(*dest, *stepDst)
		ac.addSteps(c, dest, stepSrc.Substep, stepDst.Name+".")
	}
	return nil
}
1271272
func (t *Thread) StepInstruction() error {
	if err := t.stepInstruction(&threadUpdater{p: t.p}); err != nil {
		return err
	}
	return t.reloadRegisters()
}
952324
func (s *BoltStateDB) Upgrade() error {
	// Check to see if the underlying DB needs upgrading.
	upgrade, err := NeedsUpgrade(s.db.BoltDB())
	if err != nil {
		return err
	}
	if !upgrade {
		// No upgrade needed!
		return nil
	}

	// Upgraded needed. Backup the boltdb first.
	backupFileName := filepath.Join(s.stateDir, "state.db.backup")
	if err := backupDB(s.db.BoltDB(), backupFileName); err != nil {
		return fmt.Errorf("error backing up state db: %v", err)
	}

	// Perform the upgrade
	if err := s.db.Update(func(tx *boltdd.Tx) error {
		if err := UpgradeAllocs(s.logger, tx); err != nil {
			return err
		}

		// Add standard metadata
		if err := addMeta(tx.BoltTx()); err != nil {
			return err
		}

		// Write the time the upgrade was done
		bkt, err := tx.CreateBucketIfNotExists(metaBucketName)
		if err != nil {
			return err
		}
		return bkt.Put(metaUpgradedKey, time.Now().Format(time.RFC3339))
	}); err != nil {
		return err
	}

	s.logger.Info("successfully upgraded state")
	return nil
}
868082
func (s *UpgradeAppliedSchemaOutput) SetUpgradedSchemaArn(v string) *UpgradeAppliedSchemaOutput {
	s.UpgradedSchemaArn = &v
	return s
}
189805
func (s *State) SetCurrentStep(v *Step) {
	if v == nil {
		v = &s.rootStep
	}
	if v.s != s {
		panic("step is not bound to state")
	}
	s.stepCursor = v
}
153131
func (s *Step) SetStepName(v string) *Step {
	s.StepName = &v
	return s
}
489533
func (r *Application) SetUpgradeStrategy(us UpgradeStrategy) *Application {
	r.UpgradeStrategy = &us
	return r
}
85320
func (s *CreateClusterInput) SetAllowVersionUpgrade(v bool) *CreateClusterInput {
	s.AllowVersionUpgrade = &v
	return s
}
605012
func stateStepsFor20() []Step {
	return []Step{
		&upgradeStep{
			description: "strip @local from local user names",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return context.State().StripLocalUserDomain()
			},
		},
		&upgradeStep{
			description: "rename addmodel permission to add-model",
			targets:     []Target{DatabaseMaster},
			run: func(context Context) error {
				return context.State().RenameAddModelPermission()
			},
		},
	}
}
488590
func (s *RunJobFlowInput) SetSteps(v []*StepConfig) *RunJobFlowInput {
	s.Steps = v
	return s
}
1282881
func (i *VCSInstaller) Install() error {
	if err := i.sync(i.Repo); err != nil {
		return err
	}

	ref, err := i.solveVersion(i.Repo)
	if err != nil {
		return err
	}
	if ref != "" {
		if err := i.setVersion(i.Repo, ref); err != nil {
			return err
		}
	}

	if !isPlugin(i.Repo.LocalPath()) {
		return ErrMissingMetadata
	}

	return i.link(i.Repo.LocalPath())
}