Skip to content

Commit 6ac930e

Browse files
authored
Revert part of PR #3638 which is part of a now-abandoned task priority PR series (#3750)
PR #3638 introduced parameters and documentation for a task priority field which was never implemented in mainline Parsl. This PR leaves most of the infrastructure in place, as other code now depends on it, but removes `priority` as a valid resource specification field. # Changed Behaviour users trying to use the no-effect priority parameter will now get runtime errors rather than silent ignore. ## Type of change - Code maintenance/cleanup
1 parent f560d76 commit 6ac930e

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

parsl/executors/high_throughput/executor.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from collections import defaultdict
99
from concurrent.futures import Future
1010
from dataclasses import dataclass
11-
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union
11+
from typing import Callable, Dict, List, Optional, Sequence, Set, Tuple, Union
1212

1313
import typeguard
1414

@@ -357,10 +357,8 @@ def worker_logdir(self):
357357
return self.logdir
358358

359359
def validate_resource_spec(self, resource_specification: dict):
360-
"""HTEX supports the following *Optional* resource specifications:
361-
priority: lower value is higher priority"""
362360
if resource_specification:
363-
acceptable_fields = {'priority'}
361+
acceptable_fields: Set[str] = set() # add new resource spec field names here to make htex accept them
364362
keys = set(resource_specification.keys())
365363
invalid_keys = keys - acceptable_fields
366364
if invalid_keys:

parsl/tests/test_htex/test_resource_spec_validation.py

-7
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ def test_resource_spec_validation():
3030
assert ret_val is None
3131

3232

33-
@pytest.mark.local
34-
def test_resource_spec_validation_one_key():
35-
htex = HighThroughputExecutor()
36-
ret_val = htex.validate_resource_spec({"priority": 2})
37-
assert ret_val is None
38-
39-
4033
@pytest.mark.local
4134
def test_resource_spec_validation_bad_keys():
4235
htex = HighThroughputExecutor()

0 commit comments

Comments
 (0)