Skip to content

Commit

Permalink
Revert part of PR #3638 which is part of a now-abandoned task priorit…
Browse files Browse the repository at this point in the history
…y 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
  • Loading branch information
benclifford authored Jan 18, 2025
1 parent f560d76 commit 6ac930e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
6 changes: 2 additions & 4 deletions parsl/executors/high_throughput/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from collections import defaultdict
from concurrent.futures import Future
from dataclasses import dataclass
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union
from typing import Callable, Dict, List, Optional, Sequence, Set, Tuple, Union

import typeguard

Expand Down Expand Up @@ -357,10 +357,8 @@ def worker_logdir(self):
return self.logdir

def validate_resource_spec(self, resource_specification: dict):
"""HTEX supports the following *Optional* resource specifications:
priority: lower value is higher priority"""
if resource_specification:
acceptable_fields = {'priority'}
acceptable_fields: Set[str] = set() # add new resource spec field names here to make htex accept them
keys = set(resource_specification.keys())
invalid_keys = keys - acceptable_fields
if invalid_keys:
Expand Down
7 changes: 0 additions & 7 deletions parsl/tests/test_htex/test_resource_spec_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ def test_resource_spec_validation():
assert ret_val is None


@pytest.mark.local
def test_resource_spec_validation_one_key():
htex = HighThroughputExecutor()
ret_val = htex.validate_resource_spec({"priority": 2})
assert ret_val is None


@pytest.mark.local
def test_resource_spec_validation_bad_keys():
htex = HighThroughputExecutor()
Expand Down

0 comments on commit 6ac930e

Please sign in to comment.