Commit 22e44b8
committed
fix(providers): restore fulfillment_final semantics for async fleet handlers
The branch had inverted ``fulfillment_final`` from True to False for
EC2Fleet REQUEST/MAINTAIN, SpotFleet, ASG, and RunInstances on the
theory that the create call is not "final" until the underlying
instances are running. That redefinition forced all async-provider
completion through the polling layer (``check_hosts_status`` →
``request_status_service.update_request_status``) and ran straight
into a known limitation of that layer: any transient ``partial`` or
``failed`` poll result terminates the request irrevocably, so a
healthy request that happens to be observed mid-launch flips to
``complete_with_error`` and the HostFactory wire status reports
non-success despite the fleet actually being fulfilled.
The semantic that actually fits the existing two-layer state machine
is the one main used: ``fulfillment_final`` reports whether the
provider's CREATE call is the final word from the provisioning layer.
Every fleet type returns a stable resource handle synchronously on
create; whether the resulting instances are running is a separate
``check_hosts_status`` concern that drives the request from
IN_PROGRESS to COMPLETED on the polling layer. That keeps the
provisioning path and the polling path cleanly separated and lets
``_update_request_status`` stamp COMPLETED directly when the fleet
returns the full target capacity synchronously (INSTANT) or hand off
to the poller when it doesn't (REQUEST / MAINTAIN / ASG / SpotFleet /
RunInstances).
The ``if not fulfillment_final: IN_PROGRESS`` guards in
``request_status_management_service`` stay as a safety net for any
future provider that genuinely cannot signal a final CREATE-time
answer (e.g. one that returns ``RequiresFollowUp``). They will not
fire for any provider in the current tree.1 parent 61584b9 commit 22e44b8
4 files changed
Lines changed: 15 additions & 13 deletions
File tree
- src/orb/providers/aws/infrastructure/handlers
- asg
- ec2_fleet
- run_instances
- spot_fleet
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
0 commit comments