@@ -19,11 +19,10 @@ use golem_common::model::agent::AgentId;
1919use golem_common:: model:: invocation_context:: {
2020 self , AttributeValue , InvocationContextStack , SpanId ,
2121} ;
22- use golem_common:: model:: oplog:: UpdateDescription ;
22+ use golem_common:: model:: oplog:: { TimestampedUpdateDescription , UpdateDescription } ;
2323use golem_common:: model:: {
2424 AccountId , ComponentFilePath , ComponentVersion , GetFileSystemNodeResult , IdempotencyKey ,
25- OwnedWorkerId , PluginInstallationId , ProjectId , WorkerId , WorkerMetadata , WorkerStatus ,
26- WorkerStatusRecord ,
25+ OwnedWorkerId , PluginInstallationId , ProjectId , WorkerId , WorkerStatusRecord ,
2726} ;
2827use golem_service_base:: error:: worker_executor:: { InterruptKind , WorkerExecutorError } ;
2928use golem_wasm_rpc:: golem_rpc_0_2_x:: types:: {
@@ -58,7 +57,7 @@ use golem_worker_executor::services::worker::WorkerService;
5857use golem_worker_executor:: services:: worker_event:: WorkerEventService ;
5958use golem_worker_executor:: services:: worker_fork:: WorkerForkService ;
6059use golem_worker_executor:: services:: worker_proxy:: WorkerProxy ;
61- use golem_worker_executor:: services:: { worker_enumeration, HasAll , HasConfig , HasOplogService } ;
60+ use golem_worker_executor:: services:: { worker_enumeration, HasAll } ;
6261use golem_worker_executor:: worker:: { RetryDecision , Worker } ;
6362use golem_worker_executor:: workerctx:: {
6463 DynamicLinking , ExternalOperations , FileSystemReading , FuelManagement , HasWasiConfigVars ,
@@ -121,14 +120,6 @@ impl ExternalOperations<Self> for DebugContext {
121120 . await
122121 }
123122
124- async fn compute_latest_worker_status < This : HasOplogService + HasConfig + Send + Sync > (
125- this : & This ,
126- worker_id : & OwnedWorkerId ,
127- metadata : & Option < WorkerMetadata > ,
128- ) -> Result < WorkerStatusRecord , WorkerExecutorError > {
129- DurableWorkerCtx :: < Self > :: compute_latest_worker_status ( this, worker_id, metadata) . await
130- }
131-
132123 async fn resume_replay (
133124 store : & mut ( impl AsContextMut < Data = Self > + Send ) ,
134125 instance : & Instance ,
@@ -166,23 +157,6 @@ impl ExternalOperations<Self> for DebugContext {
166157 ) -> Result < ( ) , Error > {
167158 DurableWorkerCtx :: < Self > :: on_shard_assignment_changed ( this) . await
168159 }
169-
170- async fn on_worker_update_failed_to_start < T : HasAll < Self > + Send + Sync > (
171- this : & T ,
172- account_id : & AccountId ,
173- owned_worker_id : & OwnedWorkerId ,
174- target_version : ComponentVersion ,
175- details : Option < String > ,
176- ) -> Result < ( ) , WorkerExecutorError > {
177- DurableWorkerCtx :: < Self > :: on_worker_update_failed_to_start (
178- this,
179- account_id,
180- owned_worker_id,
181- target_version,
182- details,
183- )
184- . await
185- }
186160}
187161
188162#[ async_trait]
@@ -227,29 +201,13 @@ impl StatusManagement for DebugContext {
227201 }
228202 }
229203
230- async fn set_suspended ( & self ) -> Result < ( ) , WorkerExecutorError > {
231- self . durable_ctx . set_suspended ( ) . await
204+ fn set_suspended ( & self ) {
205+ self . durable_ctx . set_suspended ( )
232206 }
233207
234208 fn set_running ( & self ) {
235209 self . durable_ctx . set_running ( )
236210 }
237-
238- async fn get_worker_status ( & self ) -> WorkerStatus {
239- self . durable_ctx . get_worker_status ( ) . await
240- }
241-
242- async fn store_worker_status ( & self , status : WorkerStatus ) {
243- self . durable_ctx . store_worker_status ( status) . await
244- }
245-
246- async fn update_pending_invocations ( & self ) {
247- self . durable_ctx . update_pending_invocations ( ) . await
248- }
249-
250- async fn update_pending_updates ( & self ) {
251- self . durable_ctx . update_pending_updates ( ) . await
252- }
253211}
254212
255213#[ async_trait]
@@ -588,6 +546,7 @@ impl WorkerCtx for DebugContext {
588546 project_service : Arc < dyn ProjectService > ,
589547 agent_types_service : Arc < dyn AgentTypesService > ,
590548 shard_service : Arc < dyn ShardService > ,
549+ pending_update : Option < TimestampedUpdateDescription > ,
591550 ) -> Result < Self , WorkerExecutorError > {
592551 let golem_ctx = DurableWorkerCtx :: create (
593552 owned_worker_id,
@@ -615,6 +574,7 @@ impl WorkerCtx for DebugContext {
615574 project_service,
616575 agent_types_service,
617576 shard_service,
577+ pending_update,
618578 )
619579 . await ?;
620580 Ok ( Self {
0 commit comments