From de7213b719063bc8f5ab4a5e2f008f32d7631557 Mon Sep 17 00:00:00 2001 From: Julian Gutierrez Oschmann Date: Fri, 17 Jul 2026 14:57:49 -0400 Subject: [PATCH 1/4] Fix benchmarking framework to use actor name instead of ID. --- benchmarking/locust/common/ateapi_pb2.py | 181 +++++++++--------- benchmarking/locust/common/ateapi_pb2_grpc.py | 107 +++++++---- benchmarking/locust/common/atespace.py | 8 +- benchmarking/locust/tests/ate_api.py | 22 ++- benchmarking/locust/tests/counter_demo.py | 28 +-- benchmarking/locust/tests/kernelmem.py | 28 +-- benchmarking/locust/tests/sleep.py | 28 +-- benchmarking/locust/tests/usermem.py | 28 +-- .../benchmarking/boomer/glutton/lifecycle.go | 10 +- 9 files changed, 249 insertions(+), 191 deletions(-) diff --git a/benchmarking/locust/common/ateapi_pb2.py b/benchmarking/locust/common/ateapi_pb2.py index fedc3b0fa..8363ccf5c 100644 --- a/benchmarking/locust/common/ateapi_pb2.py +++ b/benchmarking/locust/common/ateapi_pb2.py @@ -36,9 +36,10 @@ _sym_db = _symbol_database.Default() +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x61teapi.proto\x12\x06\x61teapi\"3\n\x14\x45xternalSnapshotInfo\x12\x1b\n\x13snapshot_uri_prefix\x18\x01 \x01(\t\"S\n\x11LocalSnapshotInfo\x12\x17\n\x0fsnapshot_prefix\x18\x01 \x01(\t\x12%\n\x1dnode_vms_with_local_snapshots\x18\x02 \x03(\t\"\x98\x01\n\x0cSnapshotInfo\x12\"\n\x04type\x18\x01 \x01(\x0e\x32\x14.ateapi.SnapshotType\x12\x30\n\x08\x65xternal\x18\x02 \x01(\x0b\x32\x1c.ateapi.ExternalSnapshotInfoH\x00\x12*\n\x05local\x18\x03 \x01(\x0b\x32\x19.ateapi.LocalSnapshotInfoH\x00\x42\x06\n\x04\x64\x61ta\"w\n\x08Selector\x12\x37\n\x0cmatch_labels\x18\x01 \x03(\x0b\x32!.ateapi.Selector.MatchLabelsEntry\x1a\x32\n\x10MatchLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc0\x04\n\x05\x41\x63tor\x12\x10\n\x08\x61\x63tor_id\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12 \n\x18\x61\x63tor_template_namespace\x18\x03 \x01(\t\x12\x1b\n\x13\x61\x63tor_template_name\x18\x04 \x01(\t\x12$\n\x06status\x18\x05 \x01(\x0e\x32\x14.ateapi.Actor.Status\x12\x1b\n\x13\x61teom_pod_namespace\x18\x06 \x01(\t\x12\x16\n\x0e\x61teom_pod_name\x18\x07 \x01(\t\x12\x14\n\x0c\x61teom_pod_ip\x18\x08 \x01(\t\x12\x1c\n\x14in_progress_snapshot\x18\n \x01(\t\x12\x15\n\rateom_pod_uid\x18\x0b \x01(\t\x12\x32\n\x14latest_snapshot_info\x18\x0c \x01(\x0b\x32\x14.ateapi.SnapshotInfo\x12)\n\x0fworker_selector\x18\r \x01(\x0b\x32\x10.ateapi.Selector\x12\x18\n\x10worker_pool_name\x18\x0e \x01(\t\x12\x10\n\x08\x61tespace\x18\x0f \x01(\t\"\x9d\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATUS_RESUMING\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x15\n\x11STATUS_SUSPENDING\x10\x03\x12\x14\n\x10STATUS_SUSPENDED\x10\x04\x12\x12\n\x0eSTATUS_PAUSING\x10\x05\x12\x11\n\rSTATUS_PAUSED\x10\x06J\x04\x08\t\x10\n\"\x18\n\x08\x41tespace\x12\x0c\n\x04name\x18\x01 \x01(\t\"*\n\x08\x41\x63torRef\x12\x10\n\x08\x61tespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"%\n\x15\x43reateAtespaceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"<\n\x16\x43reateAtespaceResponse\x12\"\n\x08\x61tespace\x18\x01 \x01(\x0b\x32\x10.ateapi.Atespace\"\"\n\x12GetAtespaceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"9\n\x13GetAtespaceResponse\x12\"\n\x08\x61tespace\x18\x01 \x01(\x0b\x32\x10.ateapi.Atespace\"\x16\n\x14ListAtespacesRequest\"<\n\x15ListAtespacesResponse\x12#\n\tatespaces\x18\x01 \x03(\x0b\x32\x10.ateapi.Atespace\"%\n\x15\x44\x65leteAtespaceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x18\n\x16\x44\x65leteAtespaceResponse\"6\n\x0fGetActorRequest\x12#\n\tactor_ref\x18\x01 \x01(\x0b\x32\x10.ateapi.ActorRef\"0\n\x10GetActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"\xa3\x01\n\x12\x43reateActorRequest\x12#\n\tactor_ref\x18\x01 \x01(\x0b\x32\x10.ateapi.ActorRef\x12 \n\x18\x61\x63tor_template_namespace\x18\x02 \x01(\t\x12\x1b\n\x13\x61\x63tor_template_name\x18\x03 \x01(\t\x12)\n\x0fworker_selector\x18\x04 \x01(\x0b\x32\x10.ateapi.Selector\"3\n\x13\x43reateActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"d\n\x12UpdateActorRequest\x12#\n\tactor_ref\x18\x01 \x01(\x0b\x32\x10.ateapi.ActorRef\x12)\n\x0fworker_selector\x18\x02 \x01(\x0b\x32\x10.ateapi.Selector\"3\n\x13UpdateActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\":\n\x13SuspendActorRequest\x12#\n\tactor_ref\x18\x01 \x01(\x0b\x32\x10.ateapi.ActorRef\"4\n\x14SuspendActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"8\n\x11PauseActorRequest\x12#\n\tactor_ref\x18\x01 \x01(\x0b\x32\x10.ateapi.ActorRef\"2\n\x12PauseActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"G\n\x12ResumeActorRequest\x12#\n\tactor_ref\x18\x01 \x01(\x0b\x32\x10.ateapi.ActorRef\x12\x0c\n\x04\x62oot\x18\x02 \x01(\x08\"3\n\x13ResumeActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"9\n\x12\x44\x65leteActorRequest\x12#\n\tactor_ref\x18\x01 \x01(\x0b\x32\x10.ateapi.ActorRef\"\x15\n\x13\x44\x65leteActorResponse\"\x14\n\x12ListWorkersRequest\"6\n\x13ListWorkersResponse\x12\x1f\n\x07workers\x18\x01 \x03(\x0b\x32\x0e.ateapi.Worker\"L\n\x11ListActorsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x10\n\x08\x61tespace\x18\x03 \x01(\t\"L\n\x12ListActorsResponse\x12\x1d\n\x06\x61\x63tors\x18\x01 \x03(\x0b\x32\r.ateapi.Actor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xee\x01\n\x06Worker\x12\x18\n\x10worker_namespace\x18\x01 \x01(\t\x12\x13\n\x0bworker_pool\x18\x02 \x01(\t\x12\x12\n\nworker_pod\x18\x03 \x01(\t\x12\x17\n\x0f\x61\x63tor_namespace\x18\x04 \x01(\t\x12\x16\n\x0e\x61\x63tor_template\x18\x05 \x01(\t\x12\x10\n\x08\x61\x63tor_id\x18\x06 \x01(\t\x12\n\n\x02ip\x18\x07 \x01(\t\x12\x0f\n\x07version\x18\x08 \x01(\x03\x12\x16\n\x0eworker_pod_uid\x18\t \x01(\t\x12\x11\n\tnode_name\x18\n \x01(\t\x12\x16\n\x0e\x61\x63tor_atespace\x18\x0b \x01(\t\"\x13\n\x11\x44\x65\x62ugClearRequest\"\x14\n\x12\x44\x65\x62ugClearResponse\"W\n\x0eMintJWTRequest\x12\x10\n\x08\x61udience\x18\x01 \x03(\t\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\t\x12\x0f\n\x07user_id\x18\x03 \x01(\t\x12\x12\n\nsession_id\x18\x04 \x01(\t\"&\n\x0fMintJWTResponse\x12\x13\n\x0bsession_jwt\x18\x01 \x01(\t\"k\n\x0fMintCertRequest\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12#\n\x1b\x63\x65rtificate_signing_request\x18\x04 \x01(\x0c\"0\n\x10MintCertResponse\x12\x1c\n\x14session_certificates\x18\x01 \x03(\x0c*b\n\x0cSnapshotType\x12\x1d\n\x19SNAPSHOT_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13SNAPSHOT_TYPE_LOCAL\x10\x01\x12\x1a\n\x16SNAPSHOT_TYPE_EXTERNAL\x10\x02\x32\x9e\x08\n\x07\x43ontrol\x12?\n\x08GetActor\x12\x17.ateapi.GetActorRequest\x1a\x18.ateapi.GetActorResponse\"\x00\x12H\n\x0b\x43reateActor\x12\x1a.ateapi.CreateActorRequest\x1a\x1b.ateapi.CreateActorResponse\"\x00\x12H\n\x0bUpdateActor\x12\x1a.ateapi.UpdateActorRequest\x1a\x1b.ateapi.UpdateActorResponse\"\x00\x12K\n\x0cSuspendActor\x12\x1b.ateapi.SuspendActorRequest\x1a\x1c.ateapi.SuspendActorResponse\"\x00\x12\x45\n\nPauseActor\x12\x19.ateapi.PauseActorRequest\x1a\x1a.ateapi.PauseActorResponse\"\x00\x12H\n\x0bResumeActor\x12\x1a.ateapi.ResumeActorRequest\x1a\x1b.ateapi.ResumeActorResponse\"\x00\x12H\n\x0b\x44\x65leteActor\x12\x1a.ateapi.DeleteActorRequest\x1a\x1b.ateapi.DeleteActorResponse\"\x00\x12H\n\x0bListWorkers\x12\x1a.ateapi.ListWorkersRequest\x1a\x1b.ateapi.ListWorkersResponse\"\x00\x12\x45\n\nListActors\x12\x19.ateapi.ListActorsRequest\x1a\x1a.ateapi.ListActorsResponse\"\x00\x12Q\n\x0e\x43reateAtespace\x12\x1d.ateapi.CreateAtespaceRequest\x1a\x1e.ateapi.CreateAtespaceResponse\"\x00\x12H\n\x0bGetAtespace\x12\x1a.ateapi.GetAtespaceRequest\x1a\x1b.ateapi.GetAtespaceResponse\"\x00\x12N\n\rListAtespaces\x12\x1c.ateapi.ListAtespacesRequest\x1a\x1d.ateapi.ListAtespacesResponse\"\x00\x12Q\n\x0e\x44\x65leteAtespace\x12\x1d.ateapi.DeleteAtespaceRequest\x1a\x1e.ateapi.DeleteAtespaceResponse\"\x00\x12\x45\n\nDebugClear\x12\x19.ateapi.DebugClearRequest\x1a\x1a.ateapi.DebugClearResponse\"\x00\x32\x8c\x01\n\x0fSessionIdentity\x12:\n\x07MintJWT\x12\x16.ateapi.MintJWTRequest\x1a\x17.ateapi.MintJWTResponse\x12=\n\x08MintCert\x12\x17.ateapi.MintCertRequest\x1a\x18.ateapi.MintCertResponseB9Z7github.com/agent-substrate/substrate/pkg/proto/ateapipbb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x61teapi.proto\x12\x06\x61teapi\x1a\x1fgoogle/protobuf/timestamp.proto\"3\n\x14\x45xternalSnapshotInfo\x12\x1b\n\x13snapshot_uri_prefix\x18\x01 \x01(\t\"S\n\x11LocalSnapshotInfo\x12\x17\n\x0fsnapshot_prefix\x18\x01 \x01(\t\x12%\n\x1dnode_vms_with_local_snapshots\x18\x02 \x03(\t\"\x80\x01\n\x0cSnapshotInfo\x12\x30\n\x08\x65xternal\x18\x02 \x01(\x0b\x32\x1c.ateapi.ExternalSnapshotInfoH\x00\x12*\n\x05local\x18\x03 \x01(\x0b\x32\x19.ateapi.LocalSnapshotInfoH\x00\x42\x06\n\x04\x64\x61taJ\x04\x08\x01\x10\x02R\x04type\"w\n\x08Selector\x12\x37\n\x0cmatch_labels\x18\x01 \x03(\x0b\x32!.ateapi.Selector.MatchLabelsEntry\x1a\x32\n\x10MatchLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb2\x01\n\x10ResourceMetadata\x12\x10\n\x08\x61tespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0b\n\x03uid\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\x03\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc5\x04\n\x05\x41\x63tor\x12*\n\x08metadata\x18\x01 \x01(\x0b\x32\x18.ateapi.ResourceMetadata\x12 \n\x18\x61\x63tor_template_namespace\x18\x02 \x01(\t\x12\x1b\n\x13\x61\x63tor_template_name\x18\x03 \x01(\t\x12$\n\x06status\x18\x04 \x01(\x0e\x32\x14.ateapi.Actor.Status\x12\x1b\n\x13\x61teom_pod_namespace\x18\x05 \x01(\t\x12\x16\n\x0e\x61teom_pod_name\x18\x06 \x01(\t\x12\x14\n\x0c\x61teom_pod_ip\x18\x07 \x01(\t\x12\x1c\n\x14in_progress_snapshot\x18\x08 \x01(\t\x12\x15\n\rateom_pod_uid\x18\t \x01(\t\x12\x32\n\x14latest_snapshot_info\x18\n \x01(\x0b\x32\x14.ateapi.SnapshotInfo\x12)\n\x0fworker_selector\x18\x0b \x01(\x0b\x32\x10.ateapi.Selector\x12\x18\n\x10worker_pool_name\x18\x0c \x01(\t\"\xb1\x01\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x13\n\x0fSTATUS_RESUMING\x10\x01\x12\x12\n\x0eSTATUS_RUNNING\x10\x02\x12\x15\n\x11STATUS_SUSPENDING\x10\x03\x12\x14\n\x10STATUS_SUSPENDED\x10\x04\x12\x12\n\x0eSTATUS_PAUSING\x10\x05\x12\x11\n\rSTATUS_PAUSED\x10\x06\x12\x12\n\x0eSTATUS_CRASHED\x10\x07\"6\n\x08\x41tespace\x12*\n\x08metadata\x18\x01 \x01(\x0b\x32\x18.ateapi.ResourceMetadata\"+\n\tObjectRef\x12\x10\n\x08\x61tespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\";\n\x15\x43reateAtespaceRequest\x12\"\n\x08\x61tespace\x18\x01 \x01(\x0b\x32\x10.ateapi.Atespace\"9\n\x12GetAtespaceRequest\x12#\n\x08\x61tespace\x18\x01 \x01(\x0b\x32\x11.ateapi.ObjectRef\"\x16\n\x14ListAtespacesRequest\"<\n\x15ListAtespacesResponse\x12#\n\tatespaces\x18\x01 \x03(\x0b\x32\x10.ateapi.Atespace\"<\n\x15\x44\x65leteAtespaceRequest\x12#\n\x08\x61tespace\x18\x01 \x01(\x0b\x32\x11.ateapi.ObjectRef\"3\n\x0fGetActorRequest\x12 \n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\x11.ateapi.ObjectRef\"2\n\x12\x43reateActorRequest\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"a\n\x12UpdateActorRequest\x12 \n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\x11.ateapi.ObjectRef\x12)\n\x0fworker_selector\x18\x02 \x01(\x0b\x32\x10.ateapi.Selector\"3\n\x13UpdateActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"7\n\x13SuspendActorRequest\x12 \n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\x11.ateapi.ObjectRef\"4\n\x14SuspendActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"5\n\x11PauseActorRequest\x12 \n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\x11.ateapi.ObjectRef\"2\n\x12PauseActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"D\n\x12ResumeActorRequest\x12 \n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\x11.ateapi.ObjectRef\x12\x0c\n\x04\x62oot\x18\x02 \x01(\x08\"3\n\x13ResumeActorResponse\x12\x1c\n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\r.ateapi.Actor\"6\n\x12\x44\x65leteActorRequest\x12 \n\x05\x61\x63tor\x18\x01 \x01(\x0b\x32\x11.ateapi.ObjectRef\"\x14\n\x12ListWorkersRequest\"6\n\x13ListWorkersResponse\x12\x1f\n\x07workers\x18\x01 \x03(\x0b\x32\x0e.ateapi.Worker\"L\n\x11ListActorsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x10\n\x08\x61tespace\x18\x03 \x01(\t\"L\n\x12ListActorsResponse\x12\x1d\n\x06\x61\x63tors\x18\x01 \x03(\x0b\x32\r.ateapi.Actor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x02\n\x06Worker\x12\x18\n\x10worker_namespace\x18\x01 \x01(\t\x12\x13\n\x0bworker_pool\x18\x02 \x01(\t\x12\x12\n\nworker_pod\x18\x03 \x01(\t\x12&\n\nassignment\x18\x04 \x01(\x0b\x32\x12.ateapi.Assignment\x12\n\n\x02ip\x18\x05 \x01(\t\x12\x0f\n\x07version\x18\x06 \x01(\x03\x12\x16\n\x0eworker_pod_uid\x18\x07 \x01(\t\x12\x11\n\tnode_name\x18\x08 \x01(\t\x12\x15\n\rsandbox_class\x18\t \x01(\t\x12*\n\x06labels\x18\n \x03(\x0b\x32\x1a.ateapi.Worker.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"g\n\nAssignment\x12\x37\n\x0e\x61\x63tor_template\x18\x01 \x01(\x0b\x32\x1f.ateapi.KubeNamespacedObjectRef\x12 \n\x05\x61\x63tor\x18\x02 \x01(\x0b\x32\x11.ateapi.ObjectRef\":\n\x17KubeNamespacedObjectRef\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x13\n\x11\x44\x65\x62ugClearRequest\"\x14\n\x12\x44\x65\x62ugClearResponse\"W\n\x0eMintJWTRequest\x12\x10\n\x08\x61udience\x18\x01 \x03(\t\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\t\x12\x0f\n\x07user_id\x18\x03 \x01(\t\x12\x12\n\nsession_id\x18\x04 \x01(\t\"&\n\x0fMintJWTResponse\x12\x13\n\x0bsession_jwt\x18\x01 \x01(\t\"k\n\x0fMintCertRequest\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\t\x12\x12\n\nsession_id\x18\x03 \x01(\t\x12#\n\x1b\x63\x65rtificate_signing_request\x18\x04 \x01(\x0c\"0\n\x10MintCertResponse\x12\x1c\n\x14session_certificates\x18\x01 \x03(\x0c\x32\x89\x07\n\x07\x43ontrol\x12\x34\n\x08GetActor\x12\x17.ateapi.GetActorRequest\x1a\r.ateapi.Actor\"\x00\x12:\n\x0b\x43reateActor\x12\x1a.ateapi.CreateActorRequest\x1a\r.ateapi.Actor\"\x00\x12H\n\x0bUpdateActor\x12\x1a.ateapi.UpdateActorRequest\x1a\x1b.ateapi.UpdateActorResponse\"\x00\x12K\n\x0cSuspendActor\x12\x1b.ateapi.SuspendActorRequest\x1a\x1c.ateapi.SuspendActorResponse\"\x00\x12\x45\n\nPauseActor\x12\x19.ateapi.PauseActorRequest\x1a\x1a.ateapi.PauseActorResponse\"\x00\x12H\n\x0bResumeActor\x12\x1a.ateapi.ResumeActorRequest\x1a\x1b.ateapi.ResumeActorResponse\"\x00\x12:\n\x0b\x44\x65leteActor\x12\x1a.ateapi.DeleteActorRequest\x1a\r.ateapi.Actor\"\x00\x12H\n\x0bListWorkers\x12\x1a.ateapi.ListWorkersRequest\x1a\x1b.ateapi.ListWorkersResponse\"\x00\x12\x45\n\nListActors\x12\x19.ateapi.ListActorsRequest\x1a\x1a.ateapi.ListActorsResponse\"\x00\x12\x43\n\x0e\x43reateAtespace\x12\x1d.ateapi.CreateAtespaceRequest\x1a\x10.ateapi.Atespace\"\x00\x12=\n\x0bGetAtespace\x12\x1a.ateapi.GetAtespaceRequest\x1a\x10.ateapi.Atespace\"\x00\x12N\n\rListAtespaces\x12\x1c.ateapi.ListAtespacesRequest\x1a\x1d.ateapi.ListAtespacesResponse\"\x00\x12\x43\n\x0e\x44\x65leteAtespace\x12\x1d.ateapi.DeleteAtespaceRequest\x1a\x10.ateapi.Atespace\"\x00\x32N\n\x05\x44\x65\x62ug\x12\x45\n\nDebugClear\x12\x19.ateapi.DebugClearRequest\x1a\x1a.ateapi.DebugClearResponse\"\x00\x32\x8c\x01\n\x0fSessionIdentity\x12:\n\x07MintJWT\x12\x16.ateapi.MintJWTRequest\x1a\x17.ateapi.MintJWTResponse\x12=\n\x08MintCert\x12\x17.ateapi.MintCertRequest\x1a\x18.ateapi.MintCertResponseB9Z7github.com/agent-substrate/substrate/pkg/proto/ateapipbb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -48,94 +49,92 @@ _globals['DESCRIPTOR']._serialized_options = b'Z7github.com/agent-substrate/substrate/pkg/proto/ateapipb' _globals['_SELECTOR_MATCHLABELSENTRY']._loaded_options = None _globals['_SELECTOR_MATCHLABELSENTRY']._serialized_options = b'8\001' - _globals['_SNAPSHOTTYPE']._serialized_start=3152 - _globals['_SNAPSHOTTYPE']._serialized_end=3250 - _globals['_EXTERNALSNAPSHOTINFO']._serialized_start=24 - _globals['_EXTERNALSNAPSHOTINFO']._serialized_end=75 - _globals['_LOCALSNAPSHOTINFO']._serialized_start=77 - _globals['_LOCALSNAPSHOTINFO']._serialized_end=160 - _globals['_SNAPSHOTINFO']._serialized_start=163 - _globals['_SNAPSHOTINFO']._serialized_end=315 - _globals['_SELECTOR']._serialized_start=317 - _globals['_SELECTOR']._serialized_end=436 - _globals['_SELECTOR_MATCHLABELSENTRY']._serialized_start=386 - _globals['_SELECTOR_MATCHLABELSENTRY']._serialized_end=436 - _globals['_ACTOR']._serialized_start=439 - _globals['_ACTOR']._serialized_end=1015 - _globals['_ACTOR_STATUS']._serialized_start=852 - _globals['_ACTOR_STATUS']._serialized_end=1009 - _globals['_ATESPACE']._serialized_start=1017 - _globals['_ATESPACE']._serialized_end=1041 - _globals['_ACTORREF']._serialized_start=1043 - _globals['_ACTORREF']._serialized_end=1085 - _globals['_CREATEATESPACEREQUEST']._serialized_start=1087 - _globals['_CREATEATESPACEREQUEST']._serialized_end=1124 - _globals['_CREATEATESPACERESPONSE']._serialized_start=1126 - _globals['_CREATEATESPACERESPONSE']._serialized_end=1186 - _globals['_GETATESPACEREQUEST']._serialized_start=1188 - _globals['_GETATESPACEREQUEST']._serialized_end=1222 - _globals['_GETATESPACERESPONSE']._serialized_start=1224 - _globals['_GETATESPACERESPONSE']._serialized_end=1281 - _globals['_LISTATESPACESREQUEST']._serialized_start=1283 - _globals['_LISTATESPACESREQUEST']._serialized_end=1305 - _globals['_LISTATESPACESRESPONSE']._serialized_start=1307 - _globals['_LISTATESPACESRESPONSE']._serialized_end=1367 - _globals['_DELETEATESPACEREQUEST']._serialized_start=1369 - _globals['_DELETEATESPACEREQUEST']._serialized_end=1406 - _globals['_DELETEATESPACERESPONSE']._serialized_start=1408 - _globals['_DELETEATESPACERESPONSE']._serialized_end=1432 - _globals['_GETACTORREQUEST']._serialized_start=1434 - _globals['_GETACTORREQUEST']._serialized_end=1488 - _globals['_GETACTORRESPONSE']._serialized_start=1490 - _globals['_GETACTORRESPONSE']._serialized_end=1538 - _globals['_CREATEACTORREQUEST']._serialized_start=1541 - _globals['_CREATEACTORREQUEST']._serialized_end=1704 - _globals['_CREATEACTORRESPONSE']._serialized_start=1706 - _globals['_CREATEACTORRESPONSE']._serialized_end=1757 - _globals['_UPDATEACTORREQUEST']._serialized_start=1759 - _globals['_UPDATEACTORREQUEST']._serialized_end=1859 - _globals['_UPDATEACTORRESPONSE']._serialized_start=1861 - _globals['_UPDATEACTORRESPONSE']._serialized_end=1912 - _globals['_SUSPENDACTORREQUEST']._serialized_start=1914 - _globals['_SUSPENDACTORREQUEST']._serialized_end=1972 - _globals['_SUSPENDACTORRESPONSE']._serialized_start=1974 - _globals['_SUSPENDACTORRESPONSE']._serialized_end=2026 - _globals['_PAUSEACTORREQUEST']._serialized_start=2028 - _globals['_PAUSEACTORREQUEST']._serialized_end=2084 - _globals['_PAUSEACTORRESPONSE']._serialized_start=2086 - _globals['_PAUSEACTORRESPONSE']._serialized_end=2136 - _globals['_RESUMEACTORREQUEST']._serialized_start=2138 - _globals['_RESUMEACTORREQUEST']._serialized_end=2209 - _globals['_RESUMEACTORRESPONSE']._serialized_start=2211 - _globals['_RESUMEACTORRESPONSE']._serialized_end=2262 - _globals['_DELETEACTORREQUEST']._serialized_start=2264 - _globals['_DELETEACTORREQUEST']._serialized_end=2321 - _globals['_DELETEACTORRESPONSE']._serialized_start=2323 - _globals['_DELETEACTORRESPONSE']._serialized_end=2344 - _globals['_LISTWORKERSREQUEST']._serialized_start=2346 - _globals['_LISTWORKERSREQUEST']._serialized_end=2366 - _globals['_LISTWORKERSRESPONSE']._serialized_start=2368 - _globals['_LISTWORKERSRESPONSE']._serialized_end=2422 - _globals['_LISTACTORSREQUEST']._serialized_start=2424 - _globals['_LISTACTORSREQUEST']._serialized_end=2500 - _globals['_LISTACTORSRESPONSE']._serialized_start=2502 - _globals['_LISTACTORSRESPONSE']._serialized_end=2578 - _globals['_WORKER']._serialized_start=2581 - _globals['_WORKER']._serialized_end=2819 - _globals['_DEBUGCLEARREQUEST']._serialized_start=2821 - _globals['_DEBUGCLEARREQUEST']._serialized_end=2840 - _globals['_DEBUGCLEARRESPONSE']._serialized_start=2842 - _globals['_DEBUGCLEARRESPONSE']._serialized_end=2862 - _globals['_MINTJWTREQUEST']._serialized_start=2864 - _globals['_MINTJWTREQUEST']._serialized_end=2951 - _globals['_MINTJWTRESPONSE']._serialized_start=2953 - _globals['_MINTJWTRESPONSE']._serialized_end=2991 - _globals['_MINTCERTREQUEST']._serialized_start=2993 - _globals['_MINTCERTREQUEST']._serialized_end=3100 - _globals['_MINTCERTRESPONSE']._serialized_start=3102 - _globals['_MINTCERTRESPONSE']._serialized_end=3150 - _globals['_CONTROL']._serialized_start=3253 - _globals['_CONTROL']._serialized_end=4307 - _globals['_SESSIONIDENTITY']._serialized_start=4310 - _globals['_SESSIONIDENTITY']._serialized_end=4450 + _globals['_WORKER_LABELSENTRY']._loaded_options = None + _globals['_WORKER_LABELSENTRY']._serialized_options = b'8\001' + _globals['_EXTERNALSNAPSHOTINFO']._serialized_start=57 + _globals['_EXTERNALSNAPSHOTINFO']._serialized_end=108 + _globals['_LOCALSNAPSHOTINFO']._serialized_start=110 + _globals['_LOCALSNAPSHOTINFO']._serialized_end=193 + _globals['_SNAPSHOTINFO']._serialized_start=196 + _globals['_SNAPSHOTINFO']._serialized_end=324 + _globals['_SELECTOR']._serialized_start=326 + _globals['_SELECTOR']._serialized_end=445 + _globals['_SELECTOR_MATCHLABELSENTRY']._serialized_start=395 + _globals['_SELECTOR_MATCHLABELSENTRY']._serialized_end=445 + _globals['_RESOURCEMETADATA']._serialized_start=448 + _globals['_RESOURCEMETADATA']._serialized_end=626 + _globals['_ACTOR']._serialized_start=629 + _globals['_ACTOR']._serialized_end=1210 + _globals['_ACTOR_STATUS']._serialized_start=1033 + _globals['_ACTOR_STATUS']._serialized_end=1210 + _globals['_ATESPACE']._serialized_start=1212 + _globals['_ATESPACE']._serialized_end=1266 + _globals['_OBJECTREF']._serialized_start=1268 + _globals['_OBJECTREF']._serialized_end=1311 + _globals['_CREATEATESPACEREQUEST']._serialized_start=1313 + _globals['_CREATEATESPACEREQUEST']._serialized_end=1372 + _globals['_GETATESPACEREQUEST']._serialized_start=1374 + _globals['_GETATESPACEREQUEST']._serialized_end=1431 + _globals['_LISTATESPACESREQUEST']._serialized_start=1433 + _globals['_LISTATESPACESREQUEST']._serialized_end=1455 + _globals['_LISTATESPACESRESPONSE']._serialized_start=1457 + _globals['_LISTATESPACESRESPONSE']._serialized_end=1517 + _globals['_DELETEATESPACEREQUEST']._serialized_start=1519 + _globals['_DELETEATESPACEREQUEST']._serialized_end=1579 + _globals['_GETACTORREQUEST']._serialized_start=1581 + _globals['_GETACTORREQUEST']._serialized_end=1632 + _globals['_CREATEACTORREQUEST']._serialized_start=1634 + _globals['_CREATEACTORREQUEST']._serialized_end=1684 + _globals['_UPDATEACTORREQUEST']._serialized_start=1686 + _globals['_UPDATEACTORREQUEST']._serialized_end=1783 + _globals['_UPDATEACTORRESPONSE']._serialized_start=1785 + _globals['_UPDATEACTORRESPONSE']._serialized_end=1836 + _globals['_SUSPENDACTORREQUEST']._serialized_start=1838 + _globals['_SUSPENDACTORREQUEST']._serialized_end=1893 + _globals['_SUSPENDACTORRESPONSE']._serialized_start=1895 + _globals['_SUSPENDACTORRESPONSE']._serialized_end=1947 + _globals['_PAUSEACTORREQUEST']._serialized_start=1949 + _globals['_PAUSEACTORREQUEST']._serialized_end=2002 + _globals['_PAUSEACTORRESPONSE']._serialized_start=2004 + _globals['_PAUSEACTORRESPONSE']._serialized_end=2054 + _globals['_RESUMEACTORREQUEST']._serialized_start=2056 + _globals['_RESUMEACTORREQUEST']._serialized_end=2124 + _globals['_RESUMEACTORRESPONSE']._serialized_start=2126 + _globals['_RESUMEACTORRESPONSE']._serialized_end=2177 + _globals['_DELETEACTORREQUEST']._serialized_start=2179 + _globals['_DELETEACTORREQUEST']._serialized_end=2233 + _globals['_LISTWORKERSREQUEST']._serialized_start=2235 + _globals['_LISTWORKERSREQUEST']._serialized_end=2255 + _globals['_LISTWORKERSRESPONSE']._serialized_start=2257 + _globals['_LISTWORKERSRESPONSE']._serialized_end=2311 + _globals['_LISTACTORSREQUEST']._serialized_start=2313 + _globals['_LISTACTORSREQUEST']._serialized_end=2389 + _globals['_LISTACTORSRESPONSE']._serialized_start=2391 + _globals['_LISTACTORSRESPONSE']._serialized_end=2467 + _globals['_WORKER']._serialized_start=2470 + _globals['_WORKER']._serialized_end=2771 + _globals['_WORKER_LABELSENTRY']._serialized_start=2726 + _globals['_WORKER_LABELSENTRY']._serialized_end=2771 + _globals['_ASSIGNMENT']._serialized_start=2773 + _globals['_ASSIGNMENT']._serialized_end=2876 + _globals['_KUBENAMESPACEDOBJECTREF']._serialized_start=2878 + _globals['_KUBENAMESPACEDOBJECTREF']._serialized_end=2936 + _globals['_DEBUGCLEARREQUEST']._serialized_start=2938 + _globals['_DEBUGCLEARREQUEST']._serialized_end=2957 + _globals['_DEBUGCLEARRESPONSE']._serialized_start=2959 + _globals['_DEBUGCLEARRESPONSE']._serialized_end=2979 + _globals['_MINTJWTREQUEST']._serialized_start=2981 + _globals['_MINTJWTREQUEST']._serialized_end=3068 + _globals['_MINTJWTRESPONSE']._serialized_start=3070 + _globals['_MINTJWTRESPONSE']._serialized_end=3108 + _globals['_MINTCERTREQUEST']._serialized_start=3110 + _globals['_MINTCERTREQUEST']._serialized_end=3217 + _globals['_MINTCERTRESPONSE']._serialized_start=3219 + _globals['_MINTCERTRESPONSE']._serialized_end=3267 + _globals['_CONTROL']._serialized_start=3270 + _globals['_CONTROL']._serialized_end=4175 + _globals['_DEBUG']._serialized_start=4177 + _globals['_DEBUG']._serialized_end=4255 + _globals['_SESSIONIDENTITY']._serialized_start=4258 + _globals['_SESSIONIDENTITY']._serialized_end=4398 # @@protoc_insertion_point(module_scope) diff --git a/benchmarking/locust/common/ateapi_pb2_grpc.py b/benchmarking/locust/common/ateapi_pb2_grpc.py index c4a1816ae..ba4dc5919 100644 --- a/benchmarking/locust/common/ateapi_pb2_grpc.py +++ b/benchmarking/locust/common/ateapi_pb2_grpc.py @@ -52,12 +52,12 @@ def __init__(self, channel): self.GetActor = channel.unary_unary( '/ateapi.Control/GetActor', request_serializer=ateapi__pb2.GetActorRequest.SerializeToString, - response_deserializer=ateapi__pb2.GetActorResponse.FromString, + response_deserializer=ateapi__pb2.Actor.FromString, _registered_method=True) self.CreateActor = channel.unary_unary( '/ateapi.Control/CreateActor', request_serializer=ateapi__pb2.CreateActorRequest.SerializeToString, - response_deserializer=ateapi__pb2.CreateActorResponse.FromString, + response_deserializer=ateapi__pb2.Actor.FromString, _registered_method=True) self.UpdateActor = channel.unary_unary( '/ateapi.Control/UpdateActor', @@ -82,7 +82,7 @@ def __init__(self, channel): self.DeleteActor = channel.unary_unary( '/ateapi.Control/DeleteActor', request_serializer=ateapi__pb2.DeleteActorRequest.SerializeToString, - response_deserializer=ateapi__pb2.DeleteActorResponse.FromString, + response_deserializer=ateapi__pb2.Actor.FromString, _registered_method=True) self.ListWorkers = channel.unary_unary( '/ateapi.Control/ListWorkers', @@ -97,12 +97,12 @@ def __init__(self, channel): self.CreateAtespace = channel.unary_unary( '/ateapi.Control/CreateAtespace', request_serializer=ateapi__pb2.CreateAtespaceRequest.SerializeToString, - response_deserializer=ateapi__pb2.CreateAtespaceResponse.FromString, + response_deserializer=ateapi__pb2.Atespace.FromString, _registered_method=True) self.GetAtespace = channel.unary_unary( '/ateapi.Control/GetAtespace', request_serializer=ateapi__pb2.GetAtespaceRequest.SerializeToString, - response_deserializer=ateapi__pb2.GetAtespaceResponse.FromString, + response_deserializer=ateapi__pb2.Atespace.FromString, _registered_method=True) self.ListAtespaces = channel.unary_unary( '/ateapi.Control/ListAtespaces', @@ -112,12 +112,7 @@ def __init__(self, channel): self.DeleteAtespace = channel.unary_unary( '/ateapi.Control/DeleteAtespace', request_serializer=ateapi__pb2.DeleteAtespaceRequest.SerializeToString, - response_deserializer=ateapi__pb2.DeleteAtespaceResponse.FromString, - _registered_method=True) - self.DebugClear = channel.unary_unary( - '/ateapi.Control/DebugClear', - request_serializer=ateapi__pb2.DebugClearRequest.SerializeToString, - response_deserializer=ateapi__pb2.DebugClearResponse.FromString, + response_deserializer=ateapi__pb2.Atespace.FromString, _registered_method=True) @@ -216,25 +211,18 @@ def DeleteAtespace(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def DebugClear(self, request, context): - """Debugging: drop all data from the ate database. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def add_ControlServicer_to_server(servicer, server): rpc_method_handlers = { 'GetActor': grpc.unary_unary_rpc_method_handler( servicer.GetActor, request_deserializer=ateapi__pb2.GetActorRequest.FromString, - response_serializer=ateapi__pb2.GetActorResponse.SerializeToString, + response_serializer=ateapi__pb2.Actor.SerializeToString, ), 'CreateActor': grpc.unary_unary_rpc_method_handler( servicer.CreateActor, request_deserializer=ateapi__pb2.CreateActorRequest.FromString, - response_serializer=ateapi__pb2.CreateActorResponse.SerializeToString, + response_serializer=ateapi__pb2.Actor.SerializeToString, ), 'UpdateActor': grpc.unary_unary_rpc_method_handler( servicer.UpdateActor, @@ -259,7 +247,7 @@ def add_ControlServicer_to_server(servicer, server): 'DeleteActor': grpc.unary_unary_rpc_method_handler( servicer.DeleteActor, request_deserializer=ateapi__pb2.DeleteActorRequest.FromString, - response_serializer=ateapi__pb2.DeleteActorResponse.SerializeToString, + response_serializer=ateapi__pb2.Actor.SerializeToString, ), 'ListWorkers': grpc.unary_unary_rpc_method_handler( servicer.ListWorkers, @@ -274,12 +262,12 @@ def add_ControlServicer_to_server(servicer, server): 'CreateAtespace': grpc.unary_unary_rpc_method_handler( servicer.CreateAtespace, request_deserializer=ateapi__pb2.CreateAtespaceRequest.FromString, - response_serializer=ateapi__pb2.CreateAtespaceResponse.SerializeToString, + response_serializer=ateapi__pb2.Atespace.SerializeToString, ), 'GetAtespace': grpc.unary_unary_rpc_method_handler( servicer.GetAtespace, request_deserializer=ateapi__pb2.GetAtespaceRequest.FromString, - response_serializer=ateapi__pb2.GetAtespaceResponse.SerializeToString, + response_serializer=ateapi__pb2.Atespace.SerializeToString, ), 'ListAtespaces': grpc.unary_unary_rpc_method_handler( servicer.ListAtespaces, @@ -289,12 +277,7 @@ def add_ControlServicer_to_server(servicer, server): 'DeleteAtespace': grpc.unary_unary_rpc_method_handler( servicer.DeleteAtespace, request_deserializer=ateapi__pb2.DeleteAtespaceRequest.FromString, - response_serializer=ateapi__pb2.DeleteAtespaceResponse.SerializeToString, - ), - 'DebugClear': grpc.unary_unary_rpc_method_handler( - servicer.DebugClear, - request_deserializer=ateapi__pb2.DebugClearRequest.FromString, - response_serializer=ateapi__pb2.DebugClearResponse.SerializeToString, + response_serializer=ateapi__pb2.Atespace.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( @@ -324,7 +307,7 @@ def GetActor(request, target, '/ateapi.Control/GetActor', ateapi__pb2.GetActorRequest.SerializeToString, - ateapi__pb2.GetActorResponse.FromString, + ateapi__pb2.Actor.FromString, options, channel_credentials, insecure, @@ -351,7 +334,7 @@ def CreateActor(request, target, '/ateapi.Control/CreateActor', ateapi__pb2.CreateActorRequest.SerializeToString, - ateapi__pb2.CreateActorResponse.FromString, + ateapi__pb2.Actor.FromString, options, channel_credentials, insecure, @@ -486,7 +469,7 @@ def DeleteActor(request, target, '/ateapi.Control/DeleteActor', ateapi__pb2.DeleteActorRequest.SerializeToString, - ateapi__pb2.DeleteActorResponse.FromString, + ateapi__pb2.Actor.FromString, options, channel_credentials, insecure, @@ -567,7 +550,7 @@ def CreateAtespace(request, target, '/ateapi.Control/CreateAtespace', ateapi__pb2.CreateAtespaceRequest.SerializeToString, - ateapi__pb2.CreateAtespaceResponse.FromString, + ateapi__pb2.Atespace.FromString, options, channel_credentials, insecure, @@ -594,7 +577,7 @@ def GetAtespace(request, target, '/ateapi.Control/GetAtespace', ateapi__pb2.GetAtespaceRequest.SerializeToString, - ateapi__pb2.GetAtespaceResponse.FromString, + ateapi__pb2.Atespace.FromString, options, channel_credentials, insecure, @@ -648,7 +631,7 @@ def DeleteAtespace(request, target, '/ateapi.Control/DeleteAtespace', ateapi__pb2.DeleteAtespaceRequest.SerializeToString, - ateapi__pb2.DeleteAtespaceResponse.FromString, + ateapi__pb2.Atespace.FromString, options, channel_credentials, insecure, @@ -659,6 +642,58 @@ def DeleteAtespace(request, metadata, _registered_method=True) + +class DebugStub: + """Debug is the RPC interface for administrative and debugging operations + (such as wiping state during development). + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.DebugClear = channel.unary_unary( + '/ateapi.Debug/DebugClear', + request_serializer=ateapi__pb2.DebugClearRequest.SerializeToString, + response_deserializer=ateapi__pb2.DebugClearResponse.FromString, + _registered_method=True) + + +class DebugServicer: + """Debug is the RPC interface for administrative and debugging operations + (such as wiping state during development). + """ + + def DebugClear(self, request, context): + """Debugging: drop all data from the ate database. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DebugServicer_to_server(servicer, server): + rpc_method_handlers = { + 'DebugClear': grpc.unary_unary_rpc_method_handler( + servicer.DebugClear, + request_deserializer=ateapi__pb2.DebugClearRequest.FromString, + response_serializer=ateapi__pb2.DebugClearResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ateapi.Debug', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('ateapi.Debug', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class Debug: + """Debug is the RPC interface for administrative and debugging operations + (such as wiping state during development). + """ + @staticmethod def DebugClear(request, target, @@ -673,7 +708,7 @@ def DebugClear(request, return grpc.experimental.unary_unary( request, target, - '/ateapi.Control/DebugClear', + '/ateapi.Debug/DebugClear', ateapi__pb2.DebugClearRequest.SerializeToString, ateapi__pb2.DebugClearResponse.FromString, options, diff --git a/benchmarking/locust/common/atespace.py b/benchmarking/locust/common/atespace.py index bd5e97a3d..52c5a6d16 100644 --- a/benchmarking/locust/common/atespace.py +++ b/benchmarking/locust/common/atespace.py @@ -26,7 +26,7 @@ from common.grpc_tracing import traced_grpc # Single atespace for all benchmark runs. Actor names within an atespace -# must be unique, and every user picks an `sb-` actor id, so a +# must be unique, and every user picks an `sb-` actor name, so a # shared atespace doesn't introduce collisions. ATESPACE = "benchmark" @@ -35,7 +35,11 @@ def ensure_atespace(stub, user_class: str, name: str = ATESPACE) -> None: with traced_grpc("CreateAtespace", user_class) as metadata: try: _, metadata.call = stub.CreateAtespace.with_call( - ateapi_pb2.CreateAtespaceRequest(name=name), + ateapi_pb2.CreateAtespaceRequest( + atespace=ateapi_pb2.Atespace( + metadata=ateapi_pb2.ResourceMetadata(name=name) + ) + ), metadata=metadata, ) except grpc.RpcError as e: diff --git a/benchmarking/locust/tests/ate_api.py b/benchmarking/locust/tests/ate_api.py index 8785ff1ec..a84f3c105 100644 --- a/benchmarking/locust/tests/ate_api.py +++ b/benchmarking/locust/tests/ate_api.py @@ -61,14 +61,18 @@ def on_start(self) -> None: print(f"Failed to ensure atespace {ATESPACE}: {e}") # Call CreateActor - self.actor_id = str(uuid.uuid4()) - self.actor_ref = ateapi_pb2.ActorRef(atespace=ATESPACE, name=self.actor_id) + self.actor_name = str(uuid.uuid4()) + self.actor_ref = ateapi_pb2.ObjectRef(atespace=ATESPACE, name=self.actor_name) try: self.stub.CreateActor( ateapi_pb2.CreateActorRequest( - actor_ref=self.actor_ref, - actor_template_namespace="ate-demo-counter", - actor_template_name="counter" + actor=ateapi_pb2.Actor( + metadata=ateapi_pb2.ResourceMetadata( + atespace=ATESPACE, name=self.actor_name + ), + actor_template_namespace="ate-demo-counter", + actor_template_name="counter", + ) ) ) except Exception as e: @@ -78,7 +82,7 @@ def on_stop(self) -> None: update_user_count(-1, self.__class__.__name__) try: self.stub.SuspendActor( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref) + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref) ) except Exception as e: print(f"Failed to suspend actor: {e}") @@ -89,7 +93,7 @@ def invoke_target(self) -> None: try: with traced_grpc("GetActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.GetActor.with_call( - ateapi_pb2.GetActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.GetActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: @@ -98,7 +102,7 @@ def invoke_target(self) -> None: try: with traced_grpc("ResumeActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.ResumeActor.with_call( - ateapi_pb2.ResumeActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.ResumeActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: @@ -107,7 +111,7 @@ def invoke_target(self) -> None: try: with traced_grpc("SuspendActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.SuspendActor.with_call( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: diff --git a/benchmarking/locust/tests/counter_demo.py b/benchmarking/locust/tests/counter_demo.py index 52a15a17d..e89a70ed6 100644 --- a/benchmarking/locust/tests/counter_demo.py +++ b/benchmarking/locust/tests/counter_demo.py @@ -48,7 +48,7 @@ # Atenet router fronts all actor traffic. Actors are addressed by setting -# the HTTP Host header to ..actors.resources.substrate.ate.dev; +# the HTTP Host header to ..actors.resources.substrate.ate.dev; # the router resolves that to the actor's current worker pod. ROUTER_URL = "http://atenet-router.ate-system.svc.cluster.local" ACTOR_DOMAIN = "actors.resources.substrate.ate.dev" @@ -81,38 +81,42 @@ def on_start(self) -> None: logger.error(f"Failed to ensure atespace {ATESPACE}: {e}") # Call CreateActor - self.actor_id = f"sb-{uuid.uuid4()}" - self.actor_ref = ateapi_pb2.ActorRef(atespace=ATESPACE, name=self.actor_id) + self.actor_name = f"sb-{uuid.uuid4()}" + self.actor_ref = ateapi_pb2.ObjectRef(atespace=ATESPACE, name=self.actor_name) try: with traced_grpc("CreateActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.CreateActor.with_call( ateapi_pb2.CreateActorRequest( - actor_ref=self.actor_ref, - actor_template_namespace="ate-demo-counter", - actor_template_name="counter", + actor=ateapi_pb2.Actor( + metadata=ateapi_pb2.ResourceMetadata( + atespace=ATESPACE, name=self.actor_name + ), + actor_template_namespace="ate-demo-counter", + actor_template_name="counter", + ) ), metadata=metadata, ) except Exception as e: - logger.error(f"Failed to create actor {self.actor_id}: {e}") + logger.error(f"Failed to create actor {self.actor_name}: {e}") # One HTTP session per user, talking to the router. The Host header # pins each request to this actor regardless of which worker pod # hosts it after a resume. self.http_session = requests.Session() self.run_url = f"{ROUTER_URL}/" - self.host_header = f"{self.actor_id}.{ATESPACE}.{ACTOR_DOMAIN}" + self.host_header = f"{self.actor_name}.{ATESPACE}.{ACTOR_DOMAIN}" def on_stop(self) -> None: update_user_count(-1, self.__class__.__name__) try: with traced_grpc("SuspendActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.SuspendActor.with_call( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception as e: - logger.error(f"Failed to suspend actor {self.actor_id}: {e}") + logger.error(f"Failed to suspend actor {self.actor_name}: {e}") self.channel.close() try: self.http_session.close() @@ -127,7 +131,7 @@ def run_and_suspend(self) -> None: try: with traced_grpc("ResumeActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.ResumeActor.with_call( - ateapi_pb2.ResumeActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.ResumeActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: @@ -170,7 +174,7 @@ def run_and_suspend(self) -> None: try: with traced_grpc("SuspendActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.SuspendActor.with_call( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: diff --git a/benchmarking/locust/tests/kernelmem.py b/benchmarking/locust/tests/kernelmem.py index c8149c0c1..cc0f2f0b7 100644 --- a/benchmarking/locust/tests/kernelmem.py +++ b/benchmarking/locust/tests/kernelmem.py @@ -57,18 +57,22 @@ def on_start(self) -> None: raise StopUser() # Call CreateActor - self.actor_id = f"sb-{uuid.uuid4()}" - self.actor_ref = ateapi_pb2.ActorRef(atespace=ATESPACE, name=self.actor_id) + self.actor_name = f"sb-{uuid.uuid4()}" + self.actor_ref = ateapi_pb2.ObjectRef(atespace=ATESPACE, name=self.actor_name) try: self.stub.CreateActor( ateapi_pb2.CreateActorRequest( - actor_ref=self.actor_ref, - actor_template_namespace="benchmark-workloads", - actor_template_name=self.template_name + actor=ateapi_pb2.Actor( + metadata=ateapi_pb2.ResourceMetadata( + atespace=ATESPACE, name=self.actor_name + ), + actor_template_namespace="benchmark-workloads", + actor_template_name=self.template_name, + ) ) ) except Exception as e: - logger.error(f"Failed to create actor {self.actor_id}: {e}") + logger.error(f"Failed to create actor {self.actor_name}: {e}") self.channel.close() raise StopUser() @@ -77,18 +81,18 @@ def on_stop(self) -> None: # Suspend first try: self.stub.SuspendActor( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref) + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref) ) except Exception as e: - logger.warning(f"Failed to suspend actor {self.actor_id} during teardown: {e}") + logger.warning(f"Failed to suspend actor {self.actor_name} during teardown: {e}") # Delete actor try: self.stub.DeleteActor( - ateapi_pb2.DeleteActorRequest(actor_ref=self.actor_ref) + ateapi_pb2.DeleteActorRequest(actor=self.actor_ref) ) except Exception as e: - logger.warning(f"Failed to delete actor {self.actor_id}: {e}") + logger.warning(f"Failed to delete actor {self.actor_name}: {e}") self.channel.close() @@ -100,7 +104,7 @@ def workload_cycle(self) -> None: try: with traced_grpc("SuspendActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.SuspendActor.with_call( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: @@ -112,7 +116,7 @@ def workload_cycle(self) -> None: try: with traced_grpc("ResumeActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.ResumeActor.with_call( - ateapi_pb2.ResumeActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.ResumeActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: diff --git a/benchmarking/locust/tests/sleep.py b/benchmarking/locust/tests/sleep.py index 0b2d324d0..d9f029f3d 100644 --- a/benchmarking/locust/tests/sleep.py +++ b/benchmarking/locust/tests/sleep.py @@ -57,18 +57,22 @@ def on_start(self) -> None: raise StopUser() # Call CreateActor - self.actor_id = f"sb-{uuid.uuid4()}" - self.actor_ref = ateapi_pb2.ActorRef(atespace=ATESPACE, name=self.actor_id) + self.actor_name = f"sb-{uuid.uuid4()}" + self.actor_ref = ateapi_pb2.ObjectRef(atespace=ATESPACE, name=self.actor_name) try: self.stub.CreateActor( ateapi_pb2.CreateActorRequest( - actor_ref=self.actor_ref, - actor_template_namespace="benchmark-workloads", - actor_template_name=self.template_name + actor=ateapi_pb2.Actor( + metadata=ateapi_pb2.ResourceMetadata( + atespace=ATESPACE, name=self.actor_name + ), + actor_template_namespace="benchmark-workloads", + actor_template_name=self.template_name, + ) ) ) except Exception as e: - logger.error(f"Failed to create actor {self.actor_id}: {e}") + logger.error(f"Failed to create actor {self.actor_name}: {e}") self.channel.close() raise StopUser() @@ -77,18 +81,18 @@ def on_stop(self) -> None: # Suspend first try: self.stub.SuspendActor( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref) + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref) ) except Exception as e: - logger.warning(f"Failed to suspend actor {self.actor_id} during teardown: {e}") + logger.warning(f"Failed to suspend actor {self.actor_name} during teardown: {e}") # Delete actor try: self.stub.DeleteActor( - ateapi_pb2.DeleteActorRequest(actor_ref=self.actor_ref) + ateapi_pb2.DeleteActorRequest(actor=self.actor_ref) ) except Exception as e: - logger.warning(f"Failed to delete actor {self.actor_id}: {e}") + logger.warning(f"Failed to delete actor {self.actor_name}: {e}") self.channel.close() @@ -100,7 +104,7 @@ def workload_cycle(self) -> None: try: with traced_grpc("SuspendActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.SuspendActor.with_call( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: @@ -112,7 +116,7 @@ def workload_cycle(self) -> None: try: with traced_grpc("ResumeActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.ResumeActor.with_call( - ateapi_pb2.ResumeActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.ResumeActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: diff --git a/benchmarking/locust/tests/usermem.py b/benchmarking/locust/tests/usermem.py index 1a6114cf1..acf55f8ba 100644 --- a/benchmarking/locust/tests/usermem.py +++ b/benchmarking/locust/tests/usermem.py @@ -57,18 +57,22 @@ def on_start(self) -> None: raise StopUser() # Call CreateActor - self.actor_id = f"sb-{uuid.uuid4()}" - self.actor_ref = ateapi_pb2.ActorRef(atespace=ATESPACE, name=self.actor_id) + self.actor_name = f"sb-{uuid.uuid4()}" + self.actor_ref = ateapi_pb2.ObjectRef(atespace=ATESPACE, name=self.actor_name) try: self.stub.CreateActor( ateapi_pb2.CreateActorRequest( - actor_ref=self.actor_ref, - actor_template_namespace="benchmark-workloads", - actor_template_name=self.template_name + actor=ateapi_pb2.Actor( + metadata=ateapi_pb2.ResourceMetadata( + atespace=ATESPACE, name=self.actor_name + ), + actor_template_namespace="benchmark-workloads", + actor_template_name=self.template_name, + ) ) ) except Exception as e: - logger.error(f"Failed to create actor {self.actor_id}: {e}") + logger.error(f"Failed to create actor {self.actor_name}: {e}") self.channel.close() raise StopUser() @@ -77,18 +81,18 @@ def on_stop(self) -> None: # Suspend first try: self.stub.SuspendActor( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref) + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref) ) except Exception as e: - logger.warning(f"Failed to suspend actor {self.actor_id} during teardown: {e}") + logger.warning(f"Failed to suspend actor {self.actor_name} during teardown: {e}") # Delete actor try: self.stub.DeleteActor( - ateapi_pb2.DeleteActorRequest(actor_ref=self.actor_ref) + ateapi_pb2.DeleteActorRequest(actor=self.actor_ref) ) except Exception as e: - logger.warning(f"Failed to delete actor {self.actor_id}: {e}") + logger.warning(f"Failed to delete actor {self.actor_name}: {e}") self.channel.close() @@ -100,7 +104,7 @@ def workload_cycle(self) -> None: try: with traced_grpc("SuspendActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.SuspendActor.with_call( - ateapi_pb2.SuspendActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.SuspendActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: @@ -112,7 +116,7 @@ def workload_cycle(self) -> None: try: with traced_grpc("ResumeActor", self.__class__.__name__) as metadata: _, metadata.call = self.stub.ResumeActor.with_call( - ateapi_pb2.ResumeActorRequest(actor_ref=self.actor_ref), + ateapi_pb2.ResumeActorRequest(actor=self.actor_ref), metadata=metadata, ) except Exception: diff --git a/internal/benchmarking/boomer/glutton/lifecycle.go b/internal/benchmarking/boomer/glutton/lifecycle.go index 7c5fb913d..5cd8a9626 100644 --- a/internal/benchmarking/boomer/glutton/lifecycle.go +++ b/internal/benchmarking/boomer/glutton/lifecycle.go @@ -126,10 +126,10 @@ func (r *taskRuntime) iterate() { func (r *taskRuntime) startUser(ctx context.Context) (*gluttonUser, error) { u := &gluttonUser{ cfg: r.cfg, - actorID: "sb-" + uuid.NewString(), + actorName: "sb-" + uuid.NewString(), firstResume: true, } - u.hostHeader = u.actorID + "." + u.cfg.Atespace + "." + actorDomain + u.hostHeader = u.actorName + "." + u.cfg.Atespace + "." + actorDomain bmetrics.UpdateUsers(userClass, 1) if err := u.ensureAtespace(ctx); err != nil { bmetrics.UpdateUsers(userClass, -1) @@ -169,14 +169,14 @@ func (r *taskRuntime) dynamicWait() time.Duration { type gluttonUser struct { cfg *Config - actorID string + actorName string hostHeader string firstResume bool actorRunning bool } func (u *gluttonUser) ref() *ateapipb.ObjectRef { - return &ateapipb.ObjectRef{Atespace: u.cfg.Atespace, Name: u.actorID} + return &ateapipb.ObjectRef{Atespace: u.cfg.Atespace, Name: u.actorName} } // ensureAtespace creates the configured atespace, swallowing AlreadyExists @@ -206,7 +206,7 @@ func (u *gluttonUser) create(ctx context.Context) error { return u.tracedCall(ctx, "CreateActor", func(callCtx context.Context, tr *metadata.MD) error { _, err := u.cfg.APIStub.CreateActor(callCtx, &ateapipb.CreateActorRequest{ Actor: &ateapipb.Actor{ - Metadata: &ateapipb.ResourceMetadata{Atespace: u.cfg.Atespace, Name: u.actorID}, + Metadata: &ateapipb.ResourceMetadata{Atespace: u.cfg.Atespace, Name: u.actorName}, ActorTemplateNamespace: templateNS, ActorTemplateName: templateName, }, From 96665b2e0bd471b7fad18603854d66474b6d2c33 Mon Sep 17 00:00:00 2001 From: Julian Gutierrez Oschmann Date: Fri, 17 Jul 2026 15:09:33 -0400 Subject: [PATCH 2/4] Update actor id -> actor name in docs. --- docs/api-guide.md | 12 +++++------- docs/architecture.md | 10 +++++----- docs/glossary.md | 4 ++-- docs/observability.md | 8 ++++---- docs/roadmap.md | 2 +- docs/threat-model.md | 6 +++--- 6 files changed, 20 insertions(+), 22 deletions(-) diff --git a/docs/api-guide.md b/docs/api-guide.md index e02324790..c5ba25252 100644 --- a/docs/api-guide.md +++ b/docs/api-guide.md @@ -106,9 +106,9 @@ Substrate uses a **Uniform DNS Mesh**: every actor created from a template is au **Format:** `..actors.resources.substrate.ate.dev` ### Actor Identity -Substrate bind-mounts a read-only, per-actor identity directory at **`/run/ate`** into each of the actor's containers. An actor can learn its own ID without parsing the `Host` header by reading the file **`/run/ate/actor-id`** inside it, which contains the raw actor ID with no trailing newline. Further identity and configuration data may appear in this directory over time. +Substrate bind-mounts a read-only, per-actor identity directory at **`/run/ate`** into each of the actor's containers. An actor can learn its own name without parsing the `Host` header by reading the file **`/run/ate/actor-id`** inside it, which contains the raw actor name with no trailing newline. Further identity and configuration data may appear in this directory over time. -Read it fresh rather than caching it at process start. It is delivered as a per-actor bind mount, not an environment variable, precisely so it carries the correct ID after a resume from the golden snapshot — an env var (or a file baked into the image) would be frozen at the *golden* actor's ID, since it lives in the checkpointed process memory, and would therefore be identical for every actor of the template. +Read it fresh rather than caching it at process start. It is delivered as a per-actor bind mount, not an environment variable, precisely so it carries the correct name after a resume from the golden snapshot — an env var (or a file baked into the image) would be frozen at the *golden* actor's name, since it lives in the checkpointed process memory, and would therefore be identical for every actor of the template. ### Container Readiness Probe (`readyz`) @@ -239,22 +239,20 @@ The Substrate Control Plane (`ate-api-server`) exposes a gRPC interface for mana #### `CreateActor` Registers a new logical actor in the system. * **Request:** `CreateActorRequest` - * `actor_ref`: `ActorRef` (atespace and actor ID, ID must be a DNS-1123 label). - * `actor_template_namespace`: Namespace of the `ActorTemplate`. - * `actor_template_name`: Name of the `ActorTemplate`. + * `actor`: `Actor` — the actor to create. Its `metadata` carries the atespace and name (name must be a DNS-1123 label); `actor_template_namespace` and `actor_template_name` select the `ActorTemplate`. * **Response:** `CreateActorResponse` containing the initialized `Actor` object. #### `ResumeActor` Activates a suspended actor by restoring it onto a physical worker. * **Request:** `ResumeActorRequest` - * `actor_ref`: `ActorRef` of the actor to resume. + * `actor`: `ObjectRef` of the actor to resume. * `boot`: (Optional) If `true`, bypasses snapshots and performs a cold boot. * **Response:** `ResumeActorResponse` containing the updated `Actor` object (including the physical `worker_ip`). #### `SuspendActor` Hibernate a running actor, capturing its current RAM and disk state into a snapshot. * **Request:** `SuspendActorRequest` - * `actor_ref`: `ActorRef` of the actor to suspend. + * `actor`: `ObjectRef` of the actor to suspend. * **Response:** `SuspendActorResponse` containing the `Actor` object in `STATUS_SUSPENDED`. #### `DeleteActor` diff --git a/docs/architecture.md b/docs/architecture.md index 2d30e5978..a29251446 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -292,7 +292,7 @@ classDiagram } class Worker { <> - actorId + actorName podIP } } @@ -344,9 +344,9 @@ A `WorkerPool` selects a **sandbox class** (`spec.sandboxClass`), and each class Handles session-aware routing and automatic re-animation. - * **Uniform DNS Mesh**: Substrate provides a location-transparent actor discovery scheme via a global DNS suffix (`..actors.resources.substrate.ate.dev`). + * **Uniform DNS Mesh**: Substrate provides a location-transparent actor discovery scheme via a global DNS suffix (`..actors.resources.substrate.ate.dev`). - * **Routing**: The `atenet` router (powered by Envoy and an External Processing server) intercepts traffic destined for the mesh. It extracts the actor ID from the `Host` header, queries the Control Plane to determine the actor's current location, and triggers a `ResumeActor` workflow if the session is currently suspended. + * **Routing**: The `atenet` router (powered by Envoy and an External Processing server) intercepts traffic destined for the mesh. It extracts the actor name from the `Host` header, queries the Control Plane to determine the actor's current location, and triggers a `ResumeActor` workflow if the session is currently suspended. * **Latency**: The data plane is optimized for sub-100ms activation by bypassing Kubernetes' eventual consistency and performing atomic physical assignments. @@ -369,7 +369,7 @@ sequenceDiagram Client->>DNS: resolve actor DNS name DNS-->>Client: router address Client->>Router: HTTP request (Host = actor) - Router->>API: ResumeActor(actorID) + Router->>API: ResumeActor(actorName) API->>Atelet: Restore Store-->>Atelet: download snapshot Atelet->>Ateom: RestoreWorkload @@ -478,7 +478,7 @@ Agent Substrate is built on a **Defense-in-Depth** model: * **Request Authorization**: The system currently performs **Identity-Aware Routing** by utilizing a uniform DNS routing scheme - (`..actors.resources.substrate.ate.dev`) + (`..actors.resources.substrate.ate.dev`) at the gateway to extract and validate actor identifiers from incoming traffic. This ensures requests are only routed to recognized, registered actors. Pluggable, granular authorization policies are planned for future diff --git a/docs/glossary.md b/docs/glossary.md index f79c90b48..9f1fa6fe3 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -23,7 +23,7 @@ These are not Kubernetes objects; they live in the control-plane database because they change too frequently for etcd. - **Actor**: a single instance derived from an `ActorTemplate`, identified by a - DNS-1123 actor ID. It is the unit that is suspended and resumed, and it moves + DNS-1123 name. It is the unit that is suspended and resumed, and it moves between workers over its lifetime. An Actor record tracks its lifecycle status and snapshot references. @@ -114,5 +114,5 @@ because they change too frequently for etcd. ## Networking - **Uniform DNS Mesh**: every Actor is reachable at a uniform address, - `..actors.resources.substrate.ate.dev`, resolved by atenet. Traffic to + `..actors.resources.substrate.ate.dev`, resolved by atenet. Traffic to that name is routed (and the Actor resumed if needed) automatically. diff --git a/docs/observability.md b/docs/observability.md index 0f00b4141..d8410c0e2 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -7,7 +7,7 @@ This guide explains how Agent Substrate achieves observability across these susp ## The Observability Model To make underlying infrastructure transitions transparent, Agent Substrate establishes a standardized metadata model to identify actors across worker pods: -* `ate.dev/actor_id`: The unique identifier of the actor (e.g., `my-counter-1` or `test`). +* `ate.dev/actor_name`: The name of the actor (e.g., `my-counter-1` or `test`). * `ate.dev/actor_atespace`: The atespace the actor lives in (e.g., `ate-demo-counter`). * `ate.dev/actor_template_name`: The name of the actor's ActorTemplate (e.g., `counter`). * `ate.dev/actor_template_namespace`: The Kubernetes namespace of the actor's ActorTemplate (e.g., `ate-demo-counter`). @@ -25,7 +25,7 @@ Agent Substrate captures container standard output/error, wraps them into struct For quick, on-demand debugging of an active actor, use the Agent Substrate CLI: ```bash -kubectl ate logs actors [--follow / -f] +kubectl ate logs actors [--follow / -f] ``` > **Note:** By default, `kubectl ate logs` queries the Kubernetes API of the worker pod where the actor is *currently* running. It is designed for immediate inspection of active actors. To view historical logs across past worker pods and suspension cycles, use a centralized logging backend. @@ -73,7 +73,7 @@ Because the logging pipeline indexes the core metadata labels, you can query you To track the unified, continuous lifecycle of a single actor regardless of how many times it migrated across worker pods or was suspended/resumed: ```text -labels.actor_id="test" +labels.actor_name="test" ``` #### 2. Atespace-Centric View @@ -157,7 +157,7 @@ To visualize traces locally: ```bash kubectl ate get actor -A --trace # or - kubectl ate suspend actor -a --trace + kubectl ate suspend actor -a --trace ``` 4. **Search and Inspect**: Copy the printed Trace ID from the CLI output and paste it into the Jaeger search box (top right), or select `ateapi` or `atelet` under the **Service** dropdown and click **Find Traces** to inspect detailed call stacks, DB transactions, state updates, and worker pod handoffs. diff --git a/docs/roadmap.md b/docs/roadmap.md index 63de6b64d..195a72492 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -70,7 +70,7 @@ Below is a collection of finer-grained efforts which we believe align with the a ### Observability -* Session-Aware Telemetry Correlation: Automated OTLP export where all logs, metrics, and traces are natively tagged with the Substrate Actor ID and worker ID. +* Session-Aware Telemetry Correlation: Automated OTLP export where all logs, metrics, and traces are natively tagged with the Substrate actor name and worker ID. * Prometheus metrics ### Performance and Reliability diff --git a/docs/threat-model.md b/docs/threat-model.md index 190fc6874..7e3a0d1ac 100644 --- a/docs/threat-model.md +++ b/docs/threat-model.md @@ -42,8 +42,8 @@ Substrate is an early, fast moving product. It is full of debate and subject to * **Worker:** Preprovisioned Pods that actors get scheduled to. * **Actor:** The core compute primitive, gets scheduled to/from worker via Run for cold start and Resume for snapshot resume. * **Actor IP:** Actor networking is based on Pod networking. Each actor gets the IP of the worker it's currently scheduled to. The ateom has the opportunity to set up additional rules when it sets up interior sandboxes. -* **Actor DNS:** Each Actor gets a DNS name like `..actors.resources.substrate.ate.dev`. Substrate runs a custom CoreDNS instance that returns atenet-router's IP address for any A record query matching the actor DNS name pattern. Substrate also includes a built-in controller that both keeps Substrate's CoreDNS configuration up to date with the router's Service IP and updates kube-dns with a stub domain for `actors.resources.substrate.ate.dev` that points to the IP of Substrate's CoreDNS Service. The latter enables traditional Kubernetes Pods to resolve Substrate Actor DNS names. -* **atenet-router:** Substrate runs an Envoy proxy to handle ingress to actors. When a client sends a request to an actor's DNS name, it is resolved to atenet-router's Envoy sidecar. Envoy then forwards headers to atenet-router (ext\_proc filter), which extracts the actor ID, automatically resumes the actor if it is in a suspended state, queries the Substrate API for the current IP of the actor, and tells Envoy to rewrite the host header to the actor IP before forwarding the request to the actor. atenet-router includes a local xDS server that configures the Envoy sidecar with this behavior. +* **Actor DNS:** Each Actor gets a DNS name like `..actors.resources.substrate.ate.dev`. Substrate runs a custom CoreDNS instance that returns atenet-router's IP address for any A record query matching the actor DNS name pattern. Substrate also includes a built-in controller that both keeps Substrate's CoreDNS configuration up to date with the router's Service IP and updates kube-dns with a stub domain for `actors.resources.substrate.ate.dev` that points to the IP of Substrate's CoreDNS Service. The latter enables traditional Kubernetes Pods to resolve Substrate Actor DNS names. +* **atenet-router:** Substrate runs an Envoy proxy to handle ingress to actors. When a client sends a request to an actor's DNS name, it is resolved to atenet-router's Envoy sidecar. Envoy then forwards headers to atenet-router (ext\_proc filter), which extracts the actor name, automatically resumes the actor if it is in a suspended state, queries the Substrate API for the current IP of the actor, and tells Envoy to rewrite the host header to the actor IP before forwarding the request to the actor. atenet-router includes a local xDS server that configures the Envoy sidecar with this behavior. * **Object Storage:** Used to store actor snapshots. * **Filesystem support:** Container local filesystem is saved in snapshots, future integrations likely to include networked storage. * **Substrate Database:** Currently Valkey (Redis-compatible API). The choice of backend database/interface is under active debate. @@ -114,7 +114,7 @@ While it's probably unlikely that Substrate, which is expected to be an internal | | Medium | Compromised process inside actor uses actor identity to write its own snapshot, enabling local privilege escalation (still in actor sandbox). | Issue separate credentials for accessing snapshots. | Even if actor identity is used to make snapshot access permissions granular, require an extra claim, audience, or dual-identity authorization to prove that it's atelet accessing the snapshot on behalf of the actor, rather than the actor itself. | Medium since it's still a local exploit within the application layer. Example: nonroot process with access to the actor credential rewrites a snapshot so that it can `su` to root after the next restore. | | | Medium | Attacker creates a large number of malicious actors to rapidly spread across the cluster or exhaust resources (via direct create or fork-bomb equivalent). | Limit resource consumption and number of child actors for each actor. | Direct ability to create actors should be considered a privileged permission. Use rate quotas and throttling to limit the speed of execution of this attack. Account for number of child actors and resource consumption by children so quotas can be enforced. Implement a namespace-like concept that quotas can be attached to. | | | | Medium | Attacker discovers Kubernetes-internal network topology from inside sandboxed actor | Don't allow actors to explore the cluster network | Don't expose cluster internal DNS to actors. Don't mount worker Pod resolv.conf in actors, instead provision a new file for the actor. | | -| | Low | Attacker discovers enough information about actor IDs or namespace names to be consequential, from inside a sandboxed actor. | Only expose actor IDs for peers the actor needs to interact with. | Don't expose full Substrate-internal DNS to actors by default (since some "actors" may need access, opt-in may be acceptable). | Likely want to expose separate DNS for internet, when internet egress is required. The actor IDs are opaque UUIDs so there's probably not much you can get from them, other than potential targets. What's more consequential is what you can actually send traffic to, since actors get the IP of the worker Pod and those are IPv4 allocated from the cluster's IP space, it's possible to enumerate them with a network scan. Namespace names in DNS might be consequential, ideally they're also just IDs in DNS, or even unnecessary. | +| | Low | Attacker discovers enough information about actor names or namespace names to be consequential, from inside a sandboxed actor. | Only expose actor names for peers the actor needs to interact with. | Don't expose full Substrate-internal DNS to actors by default (since some "actors" may need access, opt-in may be acceptable). | Likely want to expose separate DNS for internet, when internet egress is required. The actor names are opaque UUIDs so there's probably not much you can get from them, other than potential targets. What's more consequential is what you can actually send traffic to, since actors get the IP of the worker Pod and those are IPv4 allocated from the cluster's IP space, it's possible to enumerate them with a network scan. Namespace names in DNS might be consequential, ideally they're also just IDs in DNS, or even unnecessary. | ## Attacks from Nodes From 40c36cbae028b21b9879ac41c8d4ded041f63dc9 Mon Sep 17 00:00:00 2001 From: Julian Gutierrez Oschmann Date: Fri, 17 Jul 2026 15:10:20 -0400 Subject: [PATCH 3/4] Update actor id -> actor name in demos. --- demos/claude-code-multiplex/ui/server.go | 2 +- demos/sandbox/README.md | 4 ++-- demos/sandbox/client/main.go | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/demos/claude-code-multiplex/ui/server.go b/demos/claude-code-multiplex/ui/server.go index 0164e4246..0df15b8f5 100644 --- a/demos/claude-code-multiplex/ui/server.go +++ b/demos/claude-code-multiplex/ui/server.go @@ -230,7 +230,7 @@ func workerPhase(w *ateapipb.Worker) string { return "Idle" } -// listActorNames returns current actor IDs in the namespace via +// listActorNames returns current actor names in the namespace via // ateapi. Replaces the prior kubectl-shellout fallback chain. func listActorNames(ctx context.Context) []string { if ateClient == nil { diff --git a/demos/sandbox/README.md b/demos/sandbox/README.md index 2e87e6fe7..174393473 100644 --- a/demos/sandbox/README.md +++ b/demos/sandbox/README.md @@ -44,7 +44,7 @@ kubectl wait --for=condition=Ready actortemplate/sandbox-template -n ate-demo-sa ### 2. Create a Sandbox Actor -Actors live in an **atespace**, which must exist before you create actors in it. Create one (e.g., `demo`), then create the sandbox actor with a chosen ID (e.g., `my-sandbox-1`): +Actors live in an **atespace**, which must exist before you create actors in it. Create one (e.g., `demo`), then create the sandbox actor with a chosen name (e.g., `my-sandbox-1`): ```bash # Install the CLI as a kubectl plugin if not already installed @@ -76,7 +76,7 @@ Build and run the client REPL: ```bash go build -o bin/sandbox-client ./demos/sandbox/client -./bin/sandbox-client --ateapi=localhost:8080 --atenet=localhost:8000 --atespace=demo --id=my-sandbox-1 +./bin/sandbox-client --ateapi=localhost:8080 --atenet=localhost:8000 --atespace=demo --name=my-sandbox-1 ``` Once in the `sandbox>` prompt, you can run commands: diff --git a/demos/sandbox/client/main.go b/demos/sandbox/client/main.go index 9c1e64c65..3df1d14e5 100644 --- a/demos/sandbox/client/main.go +++ b/demos/sandbox/client/main.go @@ -60,14 +60,14 @@ func dialAteAPI(endpoint string) (ateapipb.ControlClient, *grpc.ClientConn, erro } func main() { - actorID := pflag.String("id", "", "ID of the sandbox actor (required)") + actorName := pflag.String("name", "", "Name of the sandbox actor (required)") atespace := pflag.String("atespace", "", "Atespace the actor lives in (required)") ateapiAddr := pflag.String("ateapi", "localhost:8080", "Address of the ateapi gRPC server") atenetAddr := pflag.String("atenet", "localhost:8000", "Address of the atenet HTTP router") pflag.Parse() - if *actorID == "" { - log.Fatal("--id is required") + if *actorName == "" { + log.Fatal("--name is required") } if *atespace == "" { log.Fatal("--atespace is required") @@ -93,8 +93,8 @@ func main() { } defer conn.Close() - log.Printf("Resuming actor %s...", *actorID) - _, err = cli.ResumeActor(ctx, &ateapipb.ResumeActorRequest{Actor: &ateapipb.ObjectRef{Atespace: *atespace, Name: *actorID}}) + log.Printf("Resuming actor %s...", *actorName) + _, err = cli.ResumeActor(ctx, &ateapipb.ResumeActorRequest{Actor: &ateapipb.ObjectRef{Atespace: *atespace, Name: *actorName}}) if err != nil { log.Fatalf("Failed to resume actor: %v", err) } @@ -102,9 +102,9 @@ func main() { // Ensure we suspend the actor on exit defer func() { - log.Printf("Suspending actor %s...", *actorID) + log.Printf("Suspending actor %s...", *actorName) suspendCtx := context.Background() - _, err := cli.SuspendActor(suspendCtx, &ateapipb.SuspendActorRequest{Actor: &ateapipb.ObjectRef{Atespace: *atespace, Name: *actorID}}) + _, err := cli.SuspendActor(suspendCtx, &ateapipb.SuspendActorRequest{Actor: &ateapipb.ObjectRef{Atespace: *atespace, Name: *actorName}}) if err != nil { log.Printf("Failed to suspend actor: %v", err) } else { @@ -152,7 +152,7 @@ func main() { } // Send command to atenet router - output, err := runCommand(ctx, *atenetAddr, *atespace, *actorID, line) + output, err := runCommand(ctx, *atenetAddr, *atespace, *actorName, line) if err != nil { fmt.Printf("Error: %v\n", err) continue @@ -171,7 +171,7 @@ func main() { } } -func runCommand(ctx context.Context, atenetAddr, atespace, actorID, command string) (*ProcessResponse, error) { +func runCommand(ctx context.Context, atenetAddr, atespace, actorName, command string) (*ProcessResponse, error) { url := fmt.Sprintf("http://%s/process", atenetAddr) reqBody := ProcessRequest{ @@ -184,7 +184,7 @@ func runCommand(ctx context.Context, atenetAddr, atespace, actorID, command stri return nil, fmt.Errorf("failed to create request: %w", err) } req.Header.Set("Content-Type", "application/json") - req.Host = resources.ActorDNSName(atespace, actorID) + req.Host = resources.ActorDNSName(atespace, actorName) resp, err := http.DefaultClient.Do(req) if err != nil { From 4d9fd696bba692680aa0dd81b06b4f3cc73eba02 Mon Sep 17 00:00:00 2001 From: Julian Gutierrez Oschmann Date: Fri, 17 Jul 2026 15:11:17 -0400 Subject: [PATCH 4/4] Update some more old references to actor id. --- .../internal/controlapi/functional_test.go | 8 +- cmd/atelet/oci.go | 2 +- cmd/atenet/internal/dns/README.md | 6 +- hack/install-ate.sh | 16 +- internal/e2e/router_client.go | 6 +- internal/e2e/suites/demo/demo_test.go | 166 +++++++++--------- 6 files changed, 102 insertions(+), 102 deletions(-) diff --git a/cmd/ateapi/internal/controlapi/functional_test.go b/cmd/ateapi/internal/controlapi/functional_test.go index 57c08a9c5..7bc3cf4cf 100644 --- a/cmd/ateapi/internal/controlapi/functional_test.go +++ b/cmd/ateapi/internal/controlapi/functional_test.go @@ -1737,11 +1737,11 @@ func TestUpdateActor_NotFound(t *testing.T) { // tier=a. // 2. Makes the fake atelet fail Run, then resumes: the actor gets assigned // to worker-a (the only eligible pool) and the resume fails after the -// worker is claimed, leaving worker-a's actor_id set and the actor +// worker is claimed, leaving worker-a's actor assignment set and the actor // stuck in RESUMING. // 3. Updates the actor's selector to tier=b, making pool-a ineligible. // 4. Resumes again; asserts it succeeds onto worker-b, and that worker-a -// has been released (actor_id cleared) rather than left dangling. +// has been released (actor assignment cleared) rather than left dangling. func TestResumeActor_ReleasesStaleWorkerWhenPoolBecomesIneligible(t *testing.T) { ns := namespaceForTest("ns-resume-release-stale") tc := setupTest(t, ns) @@ -1810,7 +1810,7 @@ func TestResumeActor_ReleasesStaleWorkerWhenPoolBecomesIneligible(t *testing.T) if wass.Actor != nil { got = wass.Actor.Name } - t.Errorf("expected worker-a (now-ineligible pool-a) to be released, got actor_id=%q", got) + t.Errorf("expected worker-a (now-ineligible pool-a) to be released, got actor name=%q", got) } case "pool-b": if wass := w.Assignment; wass == nil { @@ -1820,7 +1820,7 @@ func TestResumeActor_ReleasesStaleWorkerWhenPoolBecomesIneligible(t *testing.T) t.Errorf("expected worker-b to be claimed by %q, got nil assignment.actor", name) } else { if got := wact.Name; got != name { - t.Errorf("expected worker-b to be claimed by %q, got actor_id=%q", name, got) + t.Errorf("expected worker-b to be claimed by %q, got actor name=%q", name, got) } } } diff --git a/cmd/atelet/oci.go b/cmd/atelet/oci.go index 341c4d60d..c148f4b4c 100644 --- a/cmd/atelet/oci.go +++ b/cmd/atelet/oci.go @@ -85,7 +85,7 @@ func prepareOCIDirectory(ctx context.Context, pullCache *memorypullcache.MemoryP } // Bind-mount the per-actor identity directory so the workload can read its - // own ID at IdentityMountPath/ActorIDFileName. The bind target must exist + // own name at IdentityMountPath/ActorIDFileName. The bind target must exist // in the rootfs for the mount to attach. if identityDir != "" { if err := createMountPoint(rootPath, IdentityMountPath); err != nil { diff --git a/cmd/atenet/internal/dns/README.md b/cmd/atenet/internal/dns/README.md index 1bee770c2..90196b7ba 100644 --- a/cmd/atenet/internal/dns/README.md +++ b/cmd/atenet/internal/dns/README.md @@ -2,9 +2,9 @@ The DNS Controller orchestrates the configuration needed to setup the ATE routing. -We want to resolve requests for ..actors.resources.substrate.ate.dev to the router service address. +We want to resolve requests for ..actors.resources.substrate.ate.dev to the router service address. -* Stub resolver mode: orchestrate running a CoreDNS instance with the actor id mapped to the router service address. +* Stub resolver mode: orchestrate running a CoreDNS instance with the actor name mapped to the router service address. Cluster resources: @@ -23,7 +23,7 @@ These are defined in manifests/ate-install/atenet-dns.yaml. ConfigMap `ate-system:dns`: ``` -# Match any 'A' query for an actor id + atespace pattern under actors.resources.substrate.ate.dev +# Match any 'A' query for an actor name + atespace pattern under actors.resources.substrate.ate.dev template IN A actors.resources.substrate.ate.dev { match "^[a-z0-9]([-a-z0-9]*[a-z0-9])?\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?\\.actors\\.resources\\.substrate\\.ate\\.dev\\.$" answer "{{ .Name }} 60 IN A " diff --git a/hack/install-ate.sh b/hack/install-ate.sh index 637b453e9..c8f568975 100755 --- a/hack/install-ate.sh +++ b/hack/install-ate.sh @@ -376,11 +376,11 @@ deploy_atenet() { # get_actor_status echoes the actor's status enum (e.g. STATUS_SUSPENDED). get_actor_status() { - local actor_id="$1" + local actor_name="$1" local atespace="$2" local json - if ! json=$(run_kubectl_ate get actor "${actor_id}" -a "${atespace}" -o json 2>/dev/null); then + if ! json=$(run_kubectl_ate get actor "${actor_name}" -a "${atespace}" -o json 2>/dev/null); then return 1 fi jq -r '.actors[0].status // empty' <<<"${json}" @@ -389,14 +389,14 @@ get_actor_status() { # prepare_actor_for_delete suspends (or resumes then suspends) until DeleteActor # is allowed. Actors must be STATUS_SUSPENDED before deletion. prepare_actor_for_delete() { - local actor_id="$1" + local actor_name="$1" local atespace="$2" local timeout_secs="${3:-120}" local deadline=$((SECONDS + timeout_secs)) local status while ((SECONDS < deadline)); do - if ! status=$(get_actor_status "${actor_id}" "${atespace}"); then + if ! status=$(get_actor_status "${actor_name}" "${atespace}"); then return 0 fi @@ -405,22 +405,22 @@ prepare_actor_for_delete() { return 0 ;; STATUS_PAUSED) - run_kubectl_ate resume actor "${actor_id}" -a "${atespace}" -o json >/dev/null + run_kubectl_ate resume actor "${actor_name}" -a "${atespace}" -o json >/dev/null ;; STATUS_RUNNING) - run_kubectl_ate suspend actor "${actor_id}" -a "${atespace}" -o json >/dev/null + run_kubectl_ate suspend actor "${actor_name}" -a "${atespace}" -o json >/dev/null ;; STATUS_RESUMING | STATUS_SUSPENDING | STATUS_PAUSING) ;; *) - echo "cannot delete actor ${actor_id}: unexpected status ${status}" >&2 + echo "cannot delete actor ${actor_name}: unexpected status ${status}" >&2 return 1 ;; esac sleep 2 done - echo "timed out waiting for actor ${actor_id} to reach STATUS_SUSPENDED" >&2 + echo "timed out waiting for actor ${actor_name} to reach STATUS_SUSPENDED" >&2 return 1 } diff --git a/internal/e2e/router_client.go b/internal/e2e/router_client.go index 48f1fcbb9..cd5f0d67a 100644 --- a/internal/e2e/router_client.go +++ b/internal/e2e/router_client.go @@ -193,15 +193,15 @@ func (c *RouterClient) Close() { close(c.stopCh) } -// Get issues GET path to (atespace, actorID) through the router, setting the +// Get issues GET path to (atespace, actorName) through the router, setting the // actor's mesh Host so the router routes (and resumes) it. The caller must close // the body. -func (c *RouterClient) Get(ctx context.Context, atespace, actorID, path string) (*http.Response, error) { +func (c *RouterClient) Get(ctx context.Context, atespace, actorName, path string) (*http.Response, error) { req, err := http.NewRequestWithContext(ctx, http.MethodGet, c.baseURL+path, nil) if err != nil { return nil, err } // The router routes on the Host/:authority, not a header. - req.Host = resources.ActorDNSName(atespace, actorID) + req.Host = resources.ActorDNSName(atespace, actorName) return c.http.Do(req) } diff --git a/internal/e2e/suites/demo/demo_test.go b/internal/e2e/suites/demo/demo_test.go index 69d251de0..d7755a0ff 100644 --- a/internal/e2e/suites/demo/demo_test.go +++ b/internal/e2e/suites/demo/demo_test.go @@ -153,11 +153,11 @@ func TestDurableDirLifecycle(t *testing.T) { // // Create an Actor. // - actorID := "durabledir-lifecycle" + "-" + nsObj.Name + actorName := "durabledir-lifecycle" + "-" + nsObj.Name - t.Logf("Creating Actor %q using Substrate API...", actorID) + t.Logf("Creating Actor %q using Substrate API...", actorName) createResp, err := clients.SubstrateAPI.CreateActor(ctx, &ateapipb.CreateActorRequest{Actor: &ateapipb.Actor{ - Metadata: &ateapipb.ResourceMetadata{Atespace: demoAtespace, Name: actorID}, + Metadata: &ateapipb.ResourceMetadata{Atespace: demoAtespace, Name: actorName}, ActorTemplateNamespace: nsObj.Name, ActorTemplateName: at.Name, }}) @@ -167,20 +167,20 @@ func TestDurableDirLifecycle(t *testing.T) { t.Logf("Successfully created Actor: %s", createResp.GetMetadata().GetName()) defer func() { clients.SubstrateAPI.DeleteActor(ctx, &ateapipb.DeleteActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }) }() // Resuming the actor - t.Logf("Resuming Actor %q...", actorID) + t.Logf("Resuming Actor %q...", actorName) if _, err := clients.SubstrateAPI.ResumeActor(ctx, &ateapipb.ResumeActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to resume Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_RUNNING) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_RUNNING) - resp, err := callActor(t, demoAtespace, actorID) + resp, err := callActor(t, demoAtespace, actorName) if err != nil { t.Fatalf("failed to call actor: %v", err) } @@ -189,24 +189,24 @@ func TestDurableDirLifecycle(t *testing.T) { // // Pausing the actor // - t.Logf("Pausing Actor %q...", actorID) + t.Logf("Pausing Actor %q...", actorName) if _, err := clients.SubstrateAPI.PauseActor(ctx, &ateapipb.PauseActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to pause Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_PAUSED) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_PAUSED) // Resuming the actor - t.Logf("Resuming Actor %q again...", actorID) + t.Logf("Resuming Actor %q again...", actorName) if _, err := clients.SubstrateAPI.ResumeActor(ctx, &ateapipb.ResumeActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to resume Actor again: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_RUNNING) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_RUNNING) - resp, err = callActor(t, demoAtespace, actorID) + resp, err = callActor(t, demoAtespace, actorName) if err != nil { t.Fatalf("failed to call actor again: %v", err) } @@ -215,24 +215,24 @@ func TestDurableDirLifecycle(t *testing.T) { // // Suspending the actor // - t.Logf("Suspending Actor %q...", actorID) + t.Logf("Suspending Actor %q...", actorName) if _, err := clients.SubstrateAPI.SuspendActor(ctx, &ateapipb.SuspendActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to suspend Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_SUSPENDED) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_SUSPENDED) // Resuming the actor - t.Logf("Resuming Actor %q again...", actorID) + t.Logf("Resuming Actor %q again...", actorName) if _, err := clients.SubstrateAPI.ResumeActor(ctx, &ateapipb.ResumeActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to resume Actor again: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_RUNNING) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_RUNNING) - resp, err = callActor(t, demoAtespace, actorID) + resp, err = callActor(t, demoAtespace, actorName) if err != nil { t.Fatalf("failed to call actor again: %v", err) } @@ -255,11 +255,11 @@ func validateCounterResponse(t *testing.T, resp string, stage string, wantMemory func createActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj *e2e.Namespace, at *v1alpha1.ActorTemplate) error { // Create an Actor using the ATE API. - actorID := "demo-actor-1-" + nsObj.Name + actorName := "demo-actor-1-" + nsObj.Name - t.Logf("Creating Actor %q using Substrate API...", actorID) + t.Logf("Creating Actor %q using Substrate API...", actorName) createResp, err := clients.SubstrateAPI.CreateActor(ctx, &ateapipb.CreateActorRequest{Actor: &ateapipb.Actor{ - Metadata: &ateapipb.ResourceMetadata{Atespace: demoAtespace, Name: actorID}, + Metadata: &ateapipb.ResourceMetadata{Atespace: demoAtespace, Name: actorName}, ActorTemplateNamespace: nsObj.Name, ActorTemplateName: at.Name, }}) @@ -269,7 +269,7 @@ func createActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj t.Logf("Successfully created Actor: %s", createResp.GetMetadata().GetName()) defer func() { clients.SubstrateAPI.DeleteActor(ctx, &ateapipb.DeleteActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }) }() @@ -280,19 +280,19 @@ func createActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj var myActors []*ateapipb.Actor for _, actor := range listResp.GetActors() { - if actor.GetActorTemplateNamespace() == nsObj.Name && actor.GetMetadata().GetName() == actorID { + if actor.GetActorTemplateNamespace() == nsObj.Name && actor.GetMetadata().GetName() == actorName { myActors = append(myActors, actor) } } // Check that we have our Actor created. if len(myActors) != 1 { - t.Fatalf("expected actor %s in namespace %s, got %d actors: %v", actorID, nsObj.Name, len(myActors), myActors) + t.Fatalf("expected actor %s in namespace %s, got %d actors: %v", actorName, nsObj.Name, len(myActors), myActors) } actor := myActors[0] - if actor.GetMetadata().GetName() != actorID { - t.Errorf("expected actor ID %s, got %s", actorID, actor.GetMetadata().GetName()) + if actor.GetMetadata().GetName() != actorName { + t.Errorf("expected actor name %s, got %s", actorName, actor.GetMetadata().GetName()) } if actor.GetActorTemplateName() != at.Name { t.Errorf("expected actor template name %s, got %s", at.Name, actor.GetActorTemplateName()) @@ -308,29 +308,29 @@ func createActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj } func pauseActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj *e2e.Namespace, at *v1alpha1.ActorTemplate) error { - actorID := "pause-actor-" + nsObj.Name + actorName := "pause-actor-" + nsObj.Name // Creating an actor - t.Logf("Creating Actor %q...", actorID) + t.Logf("Creating Actor %q...", actorName) if _, err := clients.SubstrateAPI.CreateActor(ctx, &ateapipb.CreateActorRequest{Actor: &ateapipb.Actor{ - Metadata: &ateapipb.ResourceMetadata{Atespace: demoAtespace, Name: actorID}, + Metadata: &ateapipb.ResourceMetadata{Atespace: demoAtespace, Name: actorName}, ActorTemplateNamespace: nsObj.Name, ActorTemplateName: at.Name, }}); err != nil { t.Fatalf("failed to create Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_SUSPENDED) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_SUSPENDED) // Resuming the actor - t.Logf("Resuming Actor %q...", actorID) + t.Logf("Resuming Actor %q...", actorName) if _, err := clients.SubstrateAPI.ResumeActor(ctx, &ateapipb.ResumeActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to resume Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_RUNNING) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_RUNNING) - resp, err := callActor(t, demoAtespace, actorID) + resp, err := callActor(t, demoAtespace, actorName) if err != nil { t.Fatalf("failed to call actor: %v", err) } @@ -342,24 +342,24 @@ func pauseActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj * } // Pausing the actor - t.Logf("Pausing Actor %q...", actorID) + t.Logf("Pausing Actor %q...", actorName) if _, err := clients.SubstrateAPI.PauseActor(ctx, &ateapipb.PauseActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to pause Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_PAUSED) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_PAUSED) // Resuming the actor again - t.Logf("Resuming Actor %q again...", actorID) + t.Logf("Resuming Actor %q again...", actorName) if _, err := clients.SubstrateAPI.ResumeActor(ctx, &ateapipb.ResumeActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to resume Actor again: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_RUNNING) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_RUNNING) - resp, err = callActor(t, demoAtespace, actorID) + resp, err = callActor(t, demoAtespace, actorName) if err != nil { t.Fatalf("failed to call actor again: %v", err) } @@ -370,55 +370,55 @@ func pauseActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj * } // Suspending the actor before deletion - t.Logf("Suspending Actor %q before deletion...", actorID) + t.Logf("Suspending Actor %q before deletion...", actorName) if _, err := clients.SubstrateAPI.SuspendActor(ctx, &ateapipb.SuspendActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to suspend Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_SUSPENDED) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_SUSPENDED) // Deleting the actor - t.Logf("Deleting Actor %q...", actorID) + t.Logf("Deleting Actor %q...", actorName) if _, err := clients.SubstrateAPI.DeleteActor(ctx, &ateapipb.DeleteActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to delete Actor: %v", err) } // Verify deletion if _, err := clients.SubstrateAPI.GetActor(ctx, &ateapipb.GetActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err == nil { - t.Fatalf("expected actor %q to be deleted, but it still exists", actorID) + t.Fatalf("expected actor %q to be deleted, but it still exists", actorName) } return nil } func suspendActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj *e2e.Namespace, at *v1alpha1.ActorTemplate) error { - actorID := "suspend-actor-" + nsObj.Name + actorName := "suspend-actor-" + nsObj.Name // Creating an actor - t.Logf("Creating Actor %q...", actorID) + t.Logf("Creating Actor %q...", actorName) if _, err := clients.SubstrateAPI.CreateActor(ctx, &ateapipb.CreateActorRequest{Actor: &ateapipb.Actor{ - Metadata: &ateapipb.ResourceMetadata{Atespace: demoAtespace, Name: actorID}, + Metadata: &ateapipb.ResourceMetadata{Atespace: demoAtespace, Name: actorName}, ActorTemplateNamespace: nsObj.Name, ActorTemplateName: at.Name, }}); err != nil { t.Fatalf("failed to create Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_SUSPENDED) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_SUSPENDED) // Resuming the actor - t.Logf("Resuming Actor %q...", actorID) + t.Logf("Resuming Actor %q...", actorName) if _, err := clients.SubstrateAPI.ResumeActor(ctx, &ateapipb.ResumeActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to resume Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_RUNNING) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_RUNNING) - resp, err := callActor(t, demoAtespace, actorID) + resp, err := callActor(t, demoAtespace, actorName) if err != nil { t.Fatalf("failed to call actor: %v", err) } @@ -429,24 +429,24 @@ func suspendActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj } // Suspending the actor - t.Logf("Suspending Actor %q...", actorID) + t.Logf("Suspending Actor %q...", actorName) if _, err := clients.SubstrateAPI.SuspendActor(ctx, &ateapipb.SuspendActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to suspend Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_SUSPENDED) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_SUSPENDED) // Resuming the actor again - t.Logf("Resuming Actor %q again...", actorID) + t.Logf("Resuming Actor %q again...", actorName) if _, err := clients.SubstrateAPI.ResumeActor(ctx, &ateapipb.ResumeActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to resume Actor again: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_RUNNING) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_RUNNING) - resp, err = callActor(t, demoAtespace, actorID) + resp, err = callActor(t, demoAtespace, actorName) if err != nil { t.Fatalf("failed to call actor again: %v", err) } @@ -457,26 +457,26 @@ func suspendActor(ctx context.Context, t *testing.T, clients *e2e.Clients, nsObj } // Suspending the actor before deletion - t.Logf("Suspending Actor %q before deletion...", actorID) + t.Logf("Suspending Actor %q before deletion...", actorName) if _, err := clients.SubstrateAPI.SuspendActor(ctx, &ateapipb.SuspendActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to suspend Actor: %v", err) } - waitForActorStatus(ctx, t, clients, actorID, ateapipb.Actor_STATUS_SUSPENDED) + waitForActorStatus(ctx, t, clients, actorName, ateapipb.Actor_STATUS_SUSPENDED) // Deleting the actor - t.Logf("Deleting Actor %q...", actorID) + t.Logf("Deleting Actor %q...", actorName) if _, err := clients.SubstrateAPI.DeleteActor(ctx, &ateapipb.DeleteActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err != nil { t.Fatalf("failed to delete Actor: %v", err) } // Verify deletion if _, err := clients.SubstrateAPI.GetActor(ctx, &ateapipb.GetActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }); err == nil { - t.Fatalf("expected actor %q to be deleted, but it still exists", actorID) + t.Fatalf("expected actor %q to be deleted, but it still exists", actorName) } return nil @@ -599,33 +599,33 @@ func createActorTemplate(ctx context.Context, t *testing.T, clients *e2e.Clients return at, nil } -func waitForActorStatus(ctx context.Context, t *testing.T, clients *e2e.Clients, actorID string, expectedStatus ateapipb.Actor_Status) { +func waitForActorStatus(ctx context.Context, t *testing.T, clients *e2e.Clients, actorName string, expectedStatus ateapipb.Actor_Status) { t.Helper() - t.Logf("Waiting for Actor %q to be %v...", actorID, expectedStatus) + t.Logf("Waiting for Actor %q to be %v...", actorName, expectedStatus) timeout := 60 * time.Second deadline := time.Now().Add(timeout) for time.Now().Before(deadline) { resp, err := clients.SubstrateAPI.GetActor(ctx, &ateapipb.GetActorRequest{ - Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorID}, + Actor: &ateapipb.ObjectRef{Atespace: demoAtespace, Name: actorName}, }) if err == nil { if resp.GetStatus() == expectedStatus { - t.Logf("Actor %q reached status %v", actorID, expectedStatus) + t.Logf("Actor %q reached status %v", actorName, expectedStatus) return } } time.Sleep(1 * time.Second) } - t.Fatalf("timed out waiting for actor %q to reach status %v", actorID, expectedStatus) + t.Fatalf("timed out waiting for actor %q to reach status %v", actorName, expectedStatus) } -func callActor(t *testing.T, atespace, actorID string) (string, error) { +func callActor(t *testing.T, atespace, actorName string) (string, error) { t.Helper() deadline := time.Now().Add(30 * time.Second) var lastErr error for time.Now().Before(deadline) { - resp, err := callActorOnce(t, atespace, actorID) + resp, err := callActorOnce(t, atespace, actorName) if err == nil { return resp, nil } @@ -636,7 +636,7 @@ func callActor(t *testing.T, atespace, actorID string) (string, error) { return "", fmt.Errorf("timed out waiting for actor response: %w", lastErr) } -func callActorOnce(t *testing.T, atespace, actorID string) (string, error) { +func callActorOnce(t *testing.T, atespace, actorName string) (string, error) { t.Helper() clients := e2e.GetClients() @@ -707,7 +707,7 @@ func callActorOnce(t *testing.T, atespace, actorID string) (string, error) { if err != nil { return "", fmt.Errorf("failed to create request: %w", err) } - reqHttp.Host = resources.ActorDNSName(atespace, actorID) + reqHttp.Host = resources.ActorDNSName(atespace, actorName) httpClient := &http.Client{Timeout: 15 * time.Second} resp, err := httpClient.Do(reqHttp)