Skip to content

Commit 7ef545b

Browse files
Copilotpelikhan
andauthored
Inspect completed forecast runs
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent fd3630c commit 7ef545b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/cli/forecast.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ func forecastWorkflow(ctx context.Context, workflowName, startDate string, confi
546546
// Fetch completed runs from the history window.
547547
opts := ListWorkflowRunsOptions{
548548
WorkflowName: apiName,
549-
Status: "success",
549+
Status: "completed",
550550
StartDate: startDate,
551551
Limit: config.SampleSize,
552552
TargetCount: config.SampleSize,
@@ -1115,7 +1115,7 @@ func evaluateForecast(ctx context.Context, workflowName string, forecast Forecas
11151115
// Fetch completed runs in the validation window.
11161116
opts := ListWorkflowRunsOptions{
11171117
WorkflowName: apiName,
1118-
Status: "success",
1118+
Status: "completed",
11191119
StartDate: validationStartDate,
11201120
Limit: config.SampleSize,
11211121
TargetCount: config.SampleSize,

pkg/cli/forecast_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func TestForecastWorkflow_IgnoresSkippedRuns(t *testing.T) {
350350
assert.InEpsilon(t, 0.5, result.SuccessRate, 1e-9)
351351
}
352352

353-
func TestForecastWorkflow_RequestsSuccessfulRuns(t *testing.T) {
353+
func TestForecastWorkflow_RequestsCompletedRuns(t *testing.T) {
354354
originalList := forecastListWorkflowRunsPaginated
355355
originalLoadAIC := forecastLoadCachedRunAIC
356356
t.Cleanup(func() {
@@ -380,7 +380,7 @@ func TestForecastWorkflow_RequestsSuccessfulRuns(t *testing.T) {
380380
SampleSize: 100,
381381
}, 30)
382382
require.NoError(t, err)
383-
assert.Equal(t, "success", capturedOpts.Status)
383+
assert.Equal(t, "completed", capturedOpts.Status)
384384
}
385385

386386
func TestForecastWorkflow_ExcludesZeroAICRunsFromComputation(t *testing.T) {

0 commit comments

Comments
 (0)