fix: address PR 47 batch execution and resource audit
Core regression / Python core, intervention UI and release configuration (push) Failing after 7m8s
Core regression / JavaScript syntax (push) Successful in 8s
Core regression / Python core, intervention UI and release configuration (pull_request) Failing after 7m12s
Core regression / JavaScript syntax (pull_request) Successful in 8s
Core regression / Python core, intervention UI and release configuration (push) Failing after 7m8s
Core regression / JavaScript syntax (push) Successful in 8s
Core regression / Python core, intervention UI and release configuration (pull_request) Failing after 7m12s
Core regression / JavaScript syntax (pull_request) Successful in 8s
This commit is contained in:
1 parent
392ae365da
commit
2a89d6fdd4
29 files changed
+1449
-298
No files matched your search
@@ -188,8 +188,11 @@ def test_missing_confirmed_manifest_cannot_fall_back_to_legacy_retry(confirmed_i
|
||||
|
||||
|
||||
def test_incident_dispatch_failure_exports_original_batch_revision(confirmed_incident_batch, monkeypatch):
|
||||
from hashlib import sha256
|
||||
from dx_productivity.dsh.execution_runs import _republish_incident_batch_summary
|
||||
from dx_productivity.trial_task_center.batch_resources import write_record
|
||||
from dx_productivity.trial_task_center.errors import TaskCenterError
|
||||
from dx_productivity.trial_task_center.supervisor_protocol import VERSION, encode
|
||||
|
||||
case, held = confirmed_incident_batch
|
||||
held['value'] = False
|
||||
@@ -208,8 +211,17 @@ def test_incident_dispatch_failure_exports_original_batch_revision(confirmed_inc
|
||||
|
||||
def failed_dispatch(item, **controls):
|
||||
controls['revalidate']()
|
||||
directory = root / 'batch-resources' / batch_id
|
||||
request = directory / 'request.json'
|
||||
header = {'version': VERSION, 'batch_id': batch_id, 'attempt_id': '5' * 32,
|
||||
'operation': 'execute_quick_run_queue', 'task_ids': [item]}
|
||||
write_record(request, dict(header, root=str(root),
|
||||
arguments=encode({'task_id': item, 'expected_item': controls['expected_item']})))
|
||||
write_record(directory / 'supervisor.json', dict(header, state='starting',
|
||||
request_sha256=sha256(request.read_bytes()).hexdigest(),
|
||||
parent_process={'pid': 1, 'creation_time': 'test'}))
|
||||
controls['before_launch'](batch_id)
|
||||
dispatched.append(item)
|
||||
service._last_supervisor_batch_id = batch_id
|
||||
raise TaskCenterError('supervisor_interrupted', 'worker ended without a durable result')
|
||||
|
||||
monkeypatch.setattr(service, 'execute_quick_run_queue', failed_dispatch)
|
||||
|
||||
Reference in new issue
Block a user