Commit 2dfe398
authored
Implement instance pipeline (#3636)
* Move delete_instance_health_checks to a separate module
* Move utils/provisioning.py to ssh_fleets/provisioning.py
* Use SSHProvisioningError for ssh instances errors
* Fix _add_remote() nested try-excepts
* Refactor _resolve_ssh_instance_network
* Refactor _process_instance() into thin dispatcher
* Refactor instance check code
* Add fetchers tests
* Add TestInstanceWorker
* Run pyright for pipeline tests
* WIP: InstanceWorker
* Fix volumes pipeline processing active
* Refactor log_lock_token
* Build instance events from update map
* Rename
* Refactor instance pipeline into modules
* Inline _get_effective_ helpers
* Process new instance immediately
* Do not refetch status
* Fix sibling_update_rows
* Drop redundant synchronize_session=False
* Add ProcessContext
* Simplify placement groups code
* Drop _PlacementGroupState
* Restore comments
* Fix result.sibling_update_rows append
* Fix unset typing
* Add migration
* Lock instances in fleet pipeline
* Optimize instance lock in fleet pipeline
* Respect instance lock in delete_fleets
* Skip locked instances in process_next_terminating_job
* Respect instance lock in submitted_jobs
* Add ix_instances_pipeline_fetch_q_index
* Wire instance pipeline
* Set current_master_instance
* Refactor current_master_instance
* Terminate instances with MASTER_FAILED if the master dies with NO_OFFERS
* Fix instance unlock in fleet pipeline
* Remove extra fleet_model_to_fleet
* Wire pipeline_hinter
* Remove extra fleet_model_to_fleet
* Fix index name
* Rebase migrations
* Fix redundant fleet.instances loads in instance pipeline
* Do not lock all instances in delete_fleets
* Add FIXME
* Fix tests
* Retry instance lock in delete_fleets
* Retry lock in all delete endpoints
* Fix created_at and last_processed_at init values1 parent 8bedd73 commit 2dfe398
File tree
52 files changed
+7535
-566
lines changed- src
- dstack/_internal
- core
- server
- background
- pipeline_tasks
- instances
- scheduled_tasks
- migrations/versions/2026
- routers
- services
- gateways
- runs
- ssh_fleets
- utils
- tests/_internal/server
- background
- pipeline_tasks
- test_instances
- scheduled_tasks
- routers
- services
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
52 files changed
+7535
-566
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
Lines changed: 46 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
| 336 | + | |
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
342 | 350 | | |
343 | 351 | | |
344 | 352 | | |
| |||
416 | 424 | | |
417 | 425 | | |
418 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 199 | + | |
203 | 200 | | |
204 | 201 | | |
205 | 202 | | |
| |||
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 228 | + | |
237 | 229 | | |
238 | 230 | | |
239 | 231 | | |
| |||
249 | 241 | | |
250 | 242 | | |
251 | 243 | | |
| 244 | + | |
| 245 | + | |
252 | 246 | | |
253 | 247 | | |
254 | 248 | | |
| |||
0 commit comments