mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Reenable disabled tests by pr body (#103790)
Query for list of renabled issues in the filter test config step: switch filter test config to query for all the PR info instead of just the labels so token usage should stay the same, move code and tests related to parsing reenabled issues to filter test config step, remove old code to get PR body and commit message. `REENABLED_ISSUES` should be a comma separated list of issue numbers to be reenabled. For testing: Fixes #103789 Check that 103789 shows up in list of ignored disabled issues Sanity check that test-config labels still work Pull Request resolved: https://github.com/pytorch/pytorch/pull/103790 Approved by: https://github.com/huydhn
This commit is contained in:
committed by
PyTorch MergeBot
parent
ede1965f5d
commit
2237b4ad75
@ -4,21 +4,13 @@ import datetime
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
from typing import Any, Callable, cast, Dict, List, Optional
|
||||
from urllib.request import urlopen
|
||||
|
||||
|
||||
def get_disabled_issues() -> List[str]:
|
||||
pr_body = os.getenv("PR_BODY", "")
|
||||
commit_messages = os.getenv("COMMIT_MESSAGES", "")
|
||||
# The below regex is meant to match all *case-insensitive* keywords that
|
||||
# GitHub has delineated would link PRs to issues, more details here:
|
||||
# https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.
|
||||
# E.g., "Close #62851", "fixES #62851" and "RESOLVED #62851" would all match, but not
|
||||
# "closes #62851" --> extra space, "fixing #62851" --> not a keyword, nor "fix 62851" --> no #
|
||||
regex = "(?i)(Close(d|s)?|Resolve(d|s)?|Fix(ed|es)?) (#|https://github.com/pytorch/pytorch/issues/)([0-9]+)"
|
||||
issue_numbers = [x[5] for x in re.findall(regex, pr_body + commit_messages)]
|
||||
reenabled_issues = os.getenv("REENABLED_ISSUES", "")
|
||||
issue_numbers = reenabled_issues.split(",")
|
||||
print("Ignoring disabled issues: ", issue_numbers)
|
||||
return issue_numbers
|
||||
|
||||
|
Reference in New Issue
Block a user