You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The task distribution middlewares remove duplicate backends with list(set(...)) (TaskDistributionBaseClass._set_tes_urls(), the random
and distance-based middlewares). That loses the order of custom.tes.service_list and the discovered backends that get_backends() returns; with Python's hash randomization the order even
differs between processes. So the base class (usable as a middleware of
its own) forwards in an arbitrary order instead of the configured one,
and the distance-based middleware orders backends at the same distance
arbitrarily. The tests worked around it (fixture in_order).
Proposal
De-duplicate with dict.fromkeys() (first occurrence wins, order kept)
everywhere in the task distribution middlewares; document the order.
Acceptance criteria
The base class keeps the configured order (first occurrences);
backends at the same distance keep their order (both
permutations); the random order depends on the random state only
(tests fail with the old code under several PYTHONHASHSEEDs).
Activity