Skip to content

Commit d4f3d07

Browse files
suopytorchmergebot
authored andcommitted
[ci] don't compute ignored issues in generate-test-matrix
This doesn't have anything to do with controlling which test jobs are generated; it can be done dynamically in each job Pull Request resolved: #73020
1 parent 36fa50b commit d4f3d07

24 files changed

+51
-107
lines changed

.github/scripts/generate_pytorch_test_matrix.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import json
1111
import os
12-
import re
1312
from typing import Dict
1413

1514
from typing_extensions import TypedDict
@@ -23,17 +22,6 @@ class Config(TypedDict):
2322
runner: str
2423

2524

26-
def get_disabled_issues() -> str:
27-
pr_body = os.getenv('PR_BODY', '')
28-
# The below regex is meant to match all *case-insensitive* keywords that
29-
# GitHub has delineated would link PRs to issues, more details here:
30-
# https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.
31-
# E.g., "Close #62851", "fixES #62851" and "RESOLVED #62851" would all match, but not
32-
# "closes #62851" --> extra space, "fixing #62851" --> not a keyword, nor "fix 62851" --> no #
33-
regex = '(?i)(Close(d|s)?|Resolve(d|s)?|Fix(ed|es)?) #([0-9]+)'
34-
issue_numbers = [x[4] for x in re.findall(regex, pr_body)]
35-
return ','.join(issue_numbers)
36-
3725
# When the user specifies labels that are NOT ciflow/default, the expectation is
3826
# that the workflows should be triggered as if they are on trunk. For example, when
3927
# ciflow/all is specified, we should run the full test suite for Windows CUDA
@@ -128,7 +116,6 @@ def main() -> None:
128116
print(json.dumps({'matrix': matrix, 'render-matrix': render_matrix}, indent=2))
129117
print(f'::set-output name=matrix::{json.dumps(matrix)}')
130118
print(f'::set-output name=render-matrix::{json.dumps(render_matrix)}')
131-
print(f'::set-output name=ignore-disabled-issues::{get_disabled_issues()}')
132119

133120

134121
if __name__ == "__main__":

.github/templates/linux_ci_workflow.yml.j2

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,9 @@ jobs:
196196
MULTIGPU_RUNNER_TYPE: !{{ multigpu_runner_type }}
197197
DISTRIBUTED_GPU_RUNNER_TYPE: !{{ distributed_gpu_runner_type }}
198198
NOGPU_RUNNER_TYPE: linux.2xlarge
199-
PR_BODY: ${{ github.event.pull_request.body }}
200199
outputs:
201200
matrix: ${{ steps.set-matrix.outputs.matrix }}
202201
render-matrix: ${{ steps.set-matrix.outputs.render-matrix }}
203-
ignore-disabled-issues: ${{ steps.set-matrix.outputs.ignore-disabled-issues }}
204202
container:
205203
image: python:3.9
206204
steps:
@@ -225,7 +223,7 @@ jobs:
225223
TEST_CONFIG: ${{ matrix.config }}
226224
SHARD_NUMBER: ${{ matrix.shard }}
227225
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
228-
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
226+
PR_BODY: ${{ github.event.pull_request.body }}
229227
steps:
230228
{%- if 'rocm' in test_runner_type %}
231229
!{{ common.setup_rocm_linux() }}
@@ -322,7 +320,7 @@ jobs:
322320
-e JOB_BASE_NAME \
323321
-e TEST_CONFIG \
324322
-e NUM_TEST_SHARDS \
325-
-e PYTORCH_IGNORE_DISABLED_ISSUES \
323+
-e PR_BODY \
326324
-e PYTORCH_RETRY_TEST_CASES \
327325
-e PR_LABELS \
328326
-e MAX_JOBS="$(nproc --ignore=2)" \

.github/templates/macos_ci_workflow.yml.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,9 @@ jobs:
9595
TEST_RUNNER_TYPE: !{{ test_runner_type }}
9696
ENABLE_DISTRIBUTED_TEST: !{{ enable_distributed_test }}
9797
NUM_TEST_SHARDS: !{{ num_test_shards }}
98-
PR_BODY: ${{ github.event.pull_request.body }}
9998
outputs:
10099
matrix: ${{ steps.set-matrix.outputs.matrix }}
101100
render-matrix: ${{ steps.set-matrix.outputs.render-matrix }}
102-
ignore-disabled-issues: ${{ steps.set-matrix.outputs.ignore-disabled-issues }}
103101
container:
104102
image: python:3.9
105103
steps:
@@ -123,7 +121,7 @@ jobs:
123121
TEST_CONFIG: ${{ matrix.config }}
124122
SHARD_NUMBER: ${{ matrix.shard }}
125123
NUM_TEST_SHARDS: ${{ matrix.num_shards }}
126-
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
124+
PR_BODY: ${{ github.event.pull_request.body }}
127125
steps:
128126
!{{ common.checkout(submodules="false") }}
129127
- uses: actions/download-artifact@v2

.github/templates/windows_ci_workflow.yml.j2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,12 @@ jobs:
138138
TEST_RUNNER_TYPE: !{{ test_runner_type }}
139139
NUM_TEST_SHARDS: !{{ num_test_shards }}
140140
NUM_TEST_SHARDS_ON_PULL_REQUEST: !{{ num_test_shards_on_pull_request }}
141-
PR_BODY: ${{ github.event.pull_request.body }}
142141
NOGPU_RUNNER_TYPE: windows.4xlarge
143142
ENABLE_FORCE_ON_CPU_TEST: !{{ enable_force_on_cpu_test }}
144143
RUN_SMOKE_TESTS_ONLY_ON_PR: !{{ only_run_smoke_tests_on_pull_request }}
145144
outputs:
146145
matrix: ${{ steps.set-matrix.outputs.matrix }}
147146
render-matrix: ${{ steps.set-matrix.outputs.render-matrix }}
148-
ignore-disabled-issues: ${{ steps.set-matrix.outputs.ignore-disabled-issues }}
149147
container:
150148
image: python:3.9
151149
steps:
@@ -166,7 +164,7 @@ jobs:
166164
TEST_CONFIG: ${{ matrix.config }}
167165
http_proxy: "!{{ common.squid_proxy }}"
168166
https_proxy: "!{{ common.squid_proxy }}"
169-
PYTORCH_IGNORE_DISABLED_ISSUES: ${{ needs.generate-test-matrix.outputs.ignore-disabled-issues }}
167+
PR_BODY: ${{ github.event.pull_request.body }}
170168
needs: [build, generate-test-matrix]
171169
strategy:
172170
matrix: ${{ fromJson(needs.generate-test-matrix.outputs.matrix) }}

.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/generated-linux-bionic-py3.7-clang9.yml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/generated-linux-bionic-rocm4.5-py3.7.yml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/generated-linux-vulkan-bionic-py3.7-clang9.yml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/generated-linux-xenial-cuda11.3-py3.7-gcc7.yml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/generated-linux-xenial-py3.7-clang7-asan.yml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)