Skip to content

[adapters] Ignore clock for pipeline completion when now_http_driven.#6452

Merged
blp merged 1 commit into
mainfrom
http-driven-clock-is-at-eoi
Jun 12, 2026
Merged

[adapters] Ignore clock for pipeline completion when now_http_driven.#6452
blp merged 1 commit into
mainfrom
http-driven-clock-is-at-eoi

Conversation

@blp

@blp blp commented Jun 11, 2026

Copy link
Copy Markdown
Member

When a pipeline uses NOW, then normally it cannot ever signal that the pipeline is completed, because the results of the pipeline can always change as time goes on. However, when the user has configured the clock to change only as driven by explicit requests, this is no longer the case, so we then can ignore the clock for the purpose of pipeline_complete.

Related: #5076
Related: #4340

Describe Manual Test Plan

I tested this with a workload script.

When a pipeline uses NOW, then normally it cannot ever signal that the
pipeline is completed, because the results of the pipeline can always
change as time goes on.  However, when the user has configured the clock
to change only as driven by explicit requests, this is no longer the case,
so we then can ignore the clock for the purpose of pipeline_complete.

Related: #5076
Related: #4340

Signed-off-by: Ben Pfaff <blp@feldera.com>
@blp blp requested a review from mihaibudiu June 11, 2026 17:45
@blp blp self-assigned this Jun 11, 2026
@blp blp added connectors Issues related to the adapters/connectors crate QA Testing and quality assurance rust Pull requests that update Rust code labels Jun 11, 2026
//
// We also don't require the clock connector to be at end of input
// if it's configured to advance only when the user sends a request.
let ignore = name.contains(".api-ingress-")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this be a trait method on the endpoint?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it could and arguably should. I think I'll leave that refactoring for the next time we have to touch this code.

@blp blp added this pull request to the merge queue Jun 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 11, 2026
@blp blp added this pull request to the merge queue Jun 11, 2026

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic is sound — when the user drives the clock via HTTP, the now endpoint should not block pipeline completion. The refactoring from a single all() chain to an explicit loop with comments is more readable too.

Missing automated test coverage though. pipeline_complete() now has a new conditional branch that could regress silently. A unit test that constructs a ControllerStatus with a non-EOI "now" endpoint and now_http_driven = true and asserts pipeline_complete() == true would nail this down.

//
// We also don't require the clock connector to be at end of input
// if it's configured to advance only when the user sends a request.
let ignore = name.contains(".api-ingress-")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string "now" is a magic value identifying the clock endpoint. If this name is defined elsewhere as a constant, it would be safer to reference that constant here. If it isn't, consider extracting it as one — a rename of the clock endpoint would silently break this check.

Merged via the queue into main with commit a9902ef Jun 12, 2026
1 check passed
@blp blp deleted the http-driven-clock-is-at-eoi branch June 12, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connectors Issues related to the adapters/connectors crate QA Testing and quality assurance rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants