Skip to content

Commit c1c71a8

Browse files
committed
fix(handler/ec2-fleet): set resource_id on instant fleet machine stubs
When _acquire_hosts_internal builds the initial instance list for an instant fleet, each stub only carried instance_id. Without resource_id, group_by_resource (used by the return path) silently skips every stub, so the machines are never fed to terminate_instances and the AWS instances stay running until they expire or are cleaned up out-of-band. Stamp resource_id=fleet_id on every stub at creation time. fleet_id is already in scope from the line above where the fleet was created.
1 parent f3a42c9 commit c1c71a8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • src/orb/providers/aws/infrastructure/handlers/ec2_fleet

src/orb/providers/aws/infrastructure/handlers/ec2_fleet/handler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ def _acquire_hosts_internal(
155155
# lazily by the check_hosts_status / _check_single_fleet_status polling path.
156156
instance_ids = fleet_result.get("instance_ids", [])
157157
if instance_ids:
158-
instances = [{"instance_id": iid} for iid in instance_ids]
158+
instances = [
159+
{"instance_id": iid, "resource_id": fleet_id} for iid in instance_ids
160+
]
159161
self._logger.info(
160162
"EC2Fleet instant fleet created with %d instance(s): %s",
161163
len(instance_ids),

0 commit comments

Comments
 (0)