Skip to content

chore: migrate clustermode/examples to use generic pull queue#363

Open
nahapetyan-serob wants to merge 5 commits into
mainfrom
serob/migrate-clustermode-examples-to-use-generic-PullQueue
Open

chore: migrate clustermode/examples to use generic pull queue#363
nahapetyan-serob wants to merge 5 commits into
mainfrom
serob/migrate-clustermode-examples-to-use-generic-PullQueue

Conversation

@nahapetyan-serob

Copy link
Copy Markdown
Collaborator

This PR migrates the examples/clustermode server from its DB-backed event queue to the generic pull event queue introduced in #354.
New puller.go: implements eventqueue.Puller
Deleted eventqueue.go: replaced by the generic pull manager.
client/main.go: on SSE stream error during send, fall through to subscribe(taskID) so the client resumes after transient drops.
Dockerfile.app: bump Go 1.24 → 1.25 and adjust build paths for the example's module layout.

The puller tolerates ErrTaskNotFound on the initial snapshot and returns a synthetic TASK_STATE_SUBMITTED placeholder, handling the race where the frontend creates the reader before the backend worker has inserted the initial task row. `

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request replaces the custom database event queue manager with a pull-based queue manager using a new dbPuller implementation in the cluster mode example. It also updates the Dockerfile to Go 1.25, improves error handling in the client streaming logic, and ensures optimistic concurrency failures wrap taskstore.ErrConcurrentModification. The review feedback suggests several improvements: ignoring stream errors if a terminal event has already been received, returning an error instead of silently continuing if scanning database rows fails, and checking rows.Err() after iterating through database rows to prevent premature termination issues.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread examples/clustermode/client/main.go
Comment thread examples/clustermode/server/puller.go
Comment thread examples/clustermode/server/puller.go
@nahapetyan-serob nahapetyan-serob marked this pull request as ready for review July 9, 2026 13:14
Comment thread examples/clustermode/server/puller.go Outdated
Comment thread examples/clustermode/server/puller.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants