You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interface doesn't buy us anything, and is poorly designed.
Proposal
Delete server.Reconciler and Options.Reconciler.
Make Server depend on *controller.TaskReconciler directly. Another option
is to build it inside NewServer from a *substrate.Client. It should also
act as the tasks.Observer, so that one value is wired up in one place.
Remove the s.reconciler != nil branches in server.go.
Make a failure to create the Substrate client in cmd/ax-server fatal,
instead of logging it and continuing without reconciliation.
Change server_test.go to use a real TaskReconciler against the fake
Substrate gRPC servers that internal/controller tests already use, instead
of fakeReconciler.
Affected code
internal/server/server.go: interface, Options, Server, and the call
sites at the Reconcile / ReconcileDelete calls
@yongruilin@rakyll since we're removing this interface, there's a related clean-up worth doing here.
Today, handlers tell the reconciler what action to take by mutating task.Status.Phase in memory before calling Reconcile. The reconciler then checks that value to decide whether to suspend or resume the actor. As noted in #515, this mixes intent with observed state.
Since Server will call TaskReconciler directly, can we make the action explicit? For example, exposing separate Resume and Suspend methods on TaskReconciler rather than passing everything through a single Reconcile call. That also makes the "new tasks start suspended" behavior an explicit step in CreateTask rather than an implicit side effect of the phase field.
Activity
yongruilin commentedon Oct 28, 2026
@rakyll this seems straight forward. Can I take on this while I'm ramping up the project?
server: remove the Reconciler interface
janetkuo commentedon Oct 28, 2026
@yongruilin @rakyll since we're removing this interface, there's a related clean-up worth doing here.
Today, handlers tell the reconciler what action to take by mutating task.Status.Phase in memory before calling Reconcile. The reconciler then checks that value to decide whether to suspend or resume the actor. As noted in #515, this mixes intent with observed state.
Since Server will call TaskReconciler directly, can we make the action explicit? For example, exposing separate Resume and Suspend methods on TaskReconciler rather than passing everything through a single Reconcile call. That also makes the "new tasks start suspended" behavior an explicit step in CreateTask rather than an implicit side effect of the phase field.
yongruilin commentedon Oct 28, 2026
@janetkuo Yea, I think it would be better. So basically we can replace reconciler.Reconcile() with explicit functions such as
and use them inside "Server" right?
It prefer to have a follow-up PR stacked on #532 , feel free to put up one or I can try to do it? wdyt?
server: remove the Reconciler interface (google#532)