pitrou commented on code in PR #14456:
URL: https://github.com/apache/arrow/pull/14456#discussion_r999426748
##########
dev/archery/archery/crossbow/core.py:
##########
@@ -1185,34 +1185,49 @@ def select(self, tasks=None, groups=None):
"Unable to match any tasks for `{}`".format(pattern)
)
- requested_group_tasks = set()
- for group in group_allowlist:
- # separate the patterns from the blocklist patterns
- task_patterns = list(config_groups[group])
- task_blocklist_patterns = [
- x.strip("~") for x in task_patterns if x.startswith("~")]
- task_patterns = [x for x in task_patterns if not x.startswith("~")]
-
- # treat the task names as glob patterns to select tasks more easily
- for pattern in task_patterns:
- matches = fnmatch.filter(valid_tasks, pattern)
- if len(matches):
- requested_group_tasks.update(matches)
- else:
+ def resolve_group(group):
+ group_tasks = set()
+ patterns = list(config_groups[group])
+ blocklist_patterns = [
+ x.strip("~") for x in patterns if x.startswith("~")]
+ patterns = [x for x in patterns if not x.startswith("~")]
+
+ # treat the task/group names as glob patterns to select
+ # tasks/groups more easily
Review Comment:
Ok, but why is it duplicated above in `select()`?
Also, it seems that the user wouldn't be able to use a group pattern
directly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]