Skip to content

ec2: group instances by launch spec and lifecycle in instant fleets#175

Open
nik-localstack wants to merge 1 commit intolocalstack:localstackfrom
nik-localstack:unc-404-group-instances-created-in-fleet
Open

ec2: group instances by launch spec and lifecycle in instant fleets#175
nik-localstack wants to merge 1 commit intolocalstack:localstackfrom
nik-localstack:unc-404-group-instances-created-in-fleet

Conversation

@nik-localstack
Copy link
Copy Markdown

EC2: create_fleet() (instant type) now groups instances sharing the same launch spec and lifecycle into a single response entry with aggregated InstanceIds, matching AWS behaviour.

Tested with https://github.com/localstack/localstack-pro/pull/6895

@nik-localstack nik-localstack self-assigned this Apr 30, 2026
@nik-localstack nik-localstack force-pushed the unc-404-group-instances-created-in-fleet branch 7 times, most recently from dedd8f5 to 589ae57 Compare May 1, 2026 16:41
@nik-localstack nik-localstack force-pushed the unc-404-group-instances-created-in-fleet branch from 589ae57 to ed20470 Compare May 1, 2026 16:42
@nik-localstack nik-localstack marked this pull request as ready for review May 2, 2026 10:45
Copy link
Copy Markdown
Member

@viren-nadkarni viren-nadkarni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the v2026.04.0 release, we are no longer allowing any changes to Moto-Ext as it will break backwards compatibility. This change directly impacts the model for Fleet which is part of the persisted state.

@nik-localstack
Copy link
Copy Markdown
Author

With the v2026.04.0 release, we are no longer allowing any changes to Moto-Ext as it will break backwards compatibility. This change directly impacts the model for Fleet which is part of the persisted state.

@viren-nadkarni If I'm not mistaken, this doesn't change how the fleet is stored but how it is represented in the response of the create fleet operation.
What it changes is only how the instances are grouped. The reason for this change is for better parity in aws validated responses of https://github.com/localstack/localstack-pro/pull/6895 .

I'm fine with skipping this change if you still have any concerns about state management.

@viren-nadkarni
Copy link
Copy Markdown
Member

this doesn't change how the fleet is stored but how it is represented in the response of the create fleet operation

Effectively yes, but the logic resides in the Fleet model. For example: if a state is created in the v2026.04.0 release, this proposed fix goes out in v2026.05.0, and the persisted state is loaded in v2026.05.0, it will still return older response - because the model has the old logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants