An expression to lock various Configurations might be good for some cases (I don't have examples), but it would be overkill for my needs and may not even meet my needs or my understanding of brianf's original request. What I need, and what I think the point of this ticket is, is to have the lock apply only to the parent Matrix Job – i.e. to the Matrix as a set, not to the individual configurations at all. That is, if I assign a lock to two Matrix Jobs, then when either of these Jobs runs, all of its Configurations should still run concurrently, but the other Job would not be allowed to start until all of the Configurations of the first one had finished. Then the second one can start up and run all of its Configurations concurrently. I want to distinguish sets of Jobs, each defined by a Matrix Job, and exclude those sets from running concurrently with other sets, but still allow all of the Jobs (Configurations) within a set to run concurrently.
It seems to me all that would be needed for this is a simple checkbox that, when assigning a Lock to a Matrix Job, indicates whether the Lock applies to the parent or the children. Then, if there is a need, that could be enhanced to allow some process of choosing to which children it applies. But I'm not sure whether anyone has expressed a need for that yet.
It is not true that this functionality is not useful... Here's a use-case:
the integration tests fighting in the shared database.
However, this is more correctly an enhancement request... probably for a new
type of lock