Skip to content

Commit 63b5a63

Browse files
committed
UPSTREAM: <carry>: chore(backend): Rename UpdateLastRun -> SetLastRunTimestamp
follup up to bf77909. Rename UpdateLastRun -> SetLastRunTimestamp also tweak a related log message Signed-off-by: Greg Sheremeta <[email protected]>
1 parent dadfb38 commit 63b5a63

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

backend/src/apiserver/resource/resource_manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,9 @@ func (r *ResourceManager) CreateRun(ctx context.Context, run *model.Run) (*model
552552
}
553553

554554
// Upon run creation, update owning experiment
555-
err = r.experimentStore.UpdateLastRun(newRun)
555+
err = r.experimentStore.SetLastRunTimestamp(newRun)
556556
if err != nil {
557-
return nil, util.Wrap(err, fmt.Sprintf("Failed to update last_run_created_at in experiment %s for run %s", newRun.ExperimentId, newRun.UUID))
557+
return nil, util.Wrap(err, fmt.Sprintf("Failed to set last run timestamp on experiment %s for run %s", newRun.ExperimentId, newRun.UUID))
558558
}
559559

560560
return newRun, nil
@@ -1264,7 +1264,7 @@ func (r *ResourceManager) ReportWorkflowResource(ctx context.Context, execSpec u
12641264
runId = run.UUID
12651265
}
12661266
// Upon run creation, update owning experiment
1267-
if updateError = r.experimentStore.UpdateLastRun(run); updateError != nil {
1267+
if updateError = r.experimentStore.SetLastRunTimestamp(run); updateError != nil {
12681268
return nil, util.Wrapf(updateError, "Failed to report a workflow for existing run %s during updating the owning experiment.", runId)
12691269
}
12701270
}

backend/src/apiserver/storage/experiment_store.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type ExperimentStoreInterface interface {
3333
ArchiveExperiment(expId string) error
3434
UnarchiveExperiment(expId string) error
3535
DeleteExperiment(uuid string) error
36-
UpdateLastRun(run *model.Run) error
36+
SetLastRunTimestamp(run *model.Run) error
3737
}
3838

3939
type ExperimentStore struct {
@@ -419,9 +419,9 @@ func (s *ExperimentStore) UnarchiveExperiment(expId string) error {
419419
return nil
420420
}
421421

422-
func (s *ExperimentStore) UpdateLastRun(run *model.Run) error {
422+
func (s *ExperimentStore) SetLastRunTimestamp(run *model.Run) error {
423423
expId := run.ExperimentId
424-
// UpdateLastRun results in the experiment getting last_run_created_at updated
424+
// SetLastRunTimestamp results in the experiment getting last_run_created_at updated
425425
query, args, err := sq.
426426
Update("experiments").
427427
SetMap(sq.Eq{

0 commit comments

Comments
 (0)