Commit a9d8cd9
committed
fix(providers/aws): restore main's fulfillment_final semantics for INSTANT + RunInstances
The earlier revert overshot: it set ``fulfillment_final=True`` uniformly
across every AWS handler, but the main-equivalent semantics differ per
provider. ``fulfillment_final=True`` means the CREATE call returned the
entire fulfilment story synchronously, so the dispatch layer can stamp
COMPLETED immediately when len(instances) >= count.
- EC2Fleet REQUEST / MAINTAIN: ``True`` — create returns only a fleet ID
and no instances; nothing more is coming synchronously. (Unchanged
from the earlier revert.)
- EC2Fleet INSTANT: ``False`` — create returns instance IDs but the
instances are still in ``pending`` state at create time; the polling
loop has to observe the running transition.
- RunInstances: key omitted (defaults to False) — instance IDs are
synchronous, instance state is not.
INSTANT and RunInstances were both wrong on the revert: they ended up
with ``fulfillment_final=True``, so dispatch tried to mark the request
COMPLETED at provisioning time before instances were actually running.
SpotFleet and ASG keep ``True`` because their create calls return zero
instances synchronously — the same shape as a REQUEST/MAINTAIN fleet.
Note that this fix does NOT resolve all live test failures we saw in
the latest run. AWS eu-west-2 is currently delivering only 2 of 4
t3.medium INSTANT instances, so the request correctly settles at
``state="partial"`` (HF wire: complete_with_error) for the 4-capacity
test scenarios. That is a real AWS capacity flake against the test
suite's assertions, not a code bug.1 parent d673441 commit a9d8cd9
2 files changed
Lines changed: 18 additions & 13 deletions
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
200 | 203 | | |
201 | 204 | | |
202 | 205 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| |||
0 commit comments