@@ -229,7 +229,6 @@ async def _inner(self_: AgentRPCServer, request: RPCMessage) -> Any:
229229 kwargs = request .body ["kwargs" ]
230230
231231 bound = sig .bind (self_ , * args , ** kwargs )
232- bound .apply_defaults ()
233232 agent_id = bound .arguments .get ("agent_id" , self_ ._default_agent_id )
234233
235234 return await meth (
@@ -277,7 +276,6 @@ async def _inner(self_: AgentRPCServer, request: RPCMessage) -> Any:
277276 kwargs = request .body ["kwargs" ]
278277
279278 bound = sig .bind (self_ , * args , ** kwargs )
280- bound .apply_defaults ()
281279 agent_id = bound .arguments .get ("agent_id" , self_ ._default_agent_id )
282280
283281 res = await meth (
@@ -1447,12 +1445,12 @@ async def server_main(
14471445 log .info ("Kernel runner environments: {}" , [* krunner_volumes .keys ()])
14481446
14491447 # Update agent id and instance type if not set
1450- agent_update = {}
1448+ agent_updates = {}
14511449 if not local_config .agent_default .id :
1452- agent_update ["id" ] = await identity .get_instance_id ()
1450+ agent_updates ["id" ] = await identity .get_instance_id ()
14531451 if not local_config .agent_common .instance_type :
1454- agent_update ["instance_type" ] = await identity .get_instance_type ()
1455- local_config = local_config .with_updates (agent_update = agent_update )
1452+ agent_updates ["instance_type" ] = await identity .get_instance_type ()
1453+ local_config = local_config .with_updates (agent_update = agent_updates )
14561454
14571455 etcd_client_registry = EtcdClientRegistry (local_config .etcd .to_dataclass ())
14581456 global_etcd = etcd_client_registry .global_etcd
@@ -1489,7 +1487,7 @@ async def server_main(
14891487 local_config = local_config .with_updates (agent_update = {"region" : region })
14901488 log .info (
14911489 "Node ID: {0} (machine-type: {1}, host: {2})" ,
1492- local_config .agent_default .id ,
1490+ local_config .agent_default .id , # defaults to instance id
14931491 local_config .agent_common .instance_type ,
14941492 rpc_addr .host ,
14951493 )
0 commit comments