Commit a692ce4
committed
Restore live conformer jobs by name on restart, not the fossil 'conformer{i}'
The contract: a running conformer job lives in self.running_jobs under the
same name the live path emits, '{job_type}_{i}' (e.g. 'conf_opt_0'). Every
consumer parses that format -- get_i_from_job_name strips the 'conf_opt'/
'conf_sp' prefix, and get_completed_incore_jobs routes on it into
job_dict[label]['conf_opt'][i].
How it broke: restore_running_jobs emitted the fossil 'conformer{i}' instead.
get_i_from_job_name returns None for it, so get_completed_incore_jobs fell into
its fallback branch, derived an empty job-type from the underscore-less name
('conformer0'.split('_')[:-1] == []), and died with KeyError: '' on the first
scheduling sweep -- crashing every ARC restart that had a live conformer job.
The fix emits '{job_type}_{i}' from the same expression the live path uses,
rather than a second hard-coded literal that must be kept in sync by hand. The
job_dict was already reconstructed correctly (conf_opt keyed by int index), so
the name was the only defect. Also corrects get_i_from_job_name's docstring,
which still advertised the retired 'conformer12' format.
The test drives a restart payload carrying a live conf_opt job through the real
restore_running_jobs + get_completed_incore_jobs path: red with KeyError: '' on
the unfixed code, green after.1 parent d285b1e commit a692ce4
3 files changed
Lines changed: 79 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4060 | 4060 | | |
4061 | 4061 | | |
4062 | 4062 | | |
4063 | | - | |
| 4063 | + | |
| 4064 | + | |
| 4065 | + | |
4064 | 4066 | | |
4065 | 4067 | | |
4066 | 4068 | | |
| |||
4091 | 4093 | | |
4092 | 4094 | | |
4093 | 4095 | | |
| 4096 | + | |
| 4097 | + | |
| 4098 | + | |
| 4099 | + | |
| 4100 | + | |
4094 | 4101 | | |
4095 | 4102 | | |
4096 | | - | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
4097 | 4106 | | |
4098 | 4107 | | |
4099 | 4108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
243 | 310 | | |
244 | 311 | | |
245 | 312 | | |
| |||
0 commit comments