Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Completed flow status #2274

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flow/e2e/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func SetupCDCFlowStatusQuery(t *testing.T, env WorkflowRun, config *protos.FlowC
var status protos.FlowStatus
if err := response.Get(&status); err != nil {
t.Fatal(err)
} else if status == protos.FlowStatus_STATUS_RUNNING {
} else if status == protos.FlowStatus_STATUS_RUNNING || status == protos.FlowStatus_STATUS_COMPLETED {
return
} else if counter > 30 {
env.Cancel()
Expand Down
2 changes: 2 additions & 0 deletions flow/workflows/cdc_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ func CDCFlowWorkflow(

// if initial_copy_only is opted for, we end the flow here.
if cfg.InitialSnapshotOnly {
logger.Info("initial snapshot only, ending flow")
state.CurrentFlowStatus = protos.FlowStatus_STATUS_COMPLETED
Amogh-Bharadwaj marked this conversation as resolved.
Show resolved Hide resolved
return state, nil
}
}
Expand Down
1 change: 1 addition & 0 deletions protos/flow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ enum FlowStatus {
STATUS_SNAPSHOT = 5;
STATUS_TERMINATING = 6;
STATUS_TERMINATED = 7;
STATUS_COMPLETED = 8;
}

message CDCFlowConfigUpdate {
Expand Down
Loading