Skip to content

Commit 99297b4

Browse files
wtgodbeCopilot
andauthored
Fix quarantine workflow: don't append test name to re-quarantine search (#66657)
* Fix re-quarantine check: don't append test name to search query The agent was adding the test class name to the GitHub search query for re-quarantine PRs (e.g., 'label:re-quarantine TlsHandshakeFeatureTests'), but PR #49307's title uses the method name ('SetsTlsHandshakeFeatureForHttps'), causing 0 results. The instructions now explicitly say NOT to append the test name to the search query, and instead filter by checking changed files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Broaden re-quarantine check to cover class and assembly level The check should exclude a test if any re-quarantine PR added a [QuarantinedTest] attribute to the test method, its containing class, or its assembly — not just if the PR touched the same file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 31fc9ba commit 99297b4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/test-quarantine.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ A test is a candidate for unquarantining if ALL of the following are true:
205205
git log --format="%H %ai" -1 -G 'QuarantinedTest.*{ISSUE_NUMBER}' -- {FILE_PATH}
206206
```
207207
If the commit date is less than 60 days ago, skip this test — it was recently quarantined and needs more time to establish reliability.
208-
- The test has **never been re-quarantined**. A test is considered re-quarantined if there exists any merged PR in the repository that either has "Re-quarantine" (case-insensitive) in the title, or has the `re-quarantine` label, and that PR modified the same test file to add a `[QuarantinedTest]` attribute for this test. To check this, search for merged PRs with the `re-quarantine` label using `search_issues` (query: `repo:dotnet/aspnetcore is:pr is:merged label:re-quarantine`), and also search for merged PRs with "Re-quarantine" in the title (query: `repo:dotnet/aspnetcore is:pr is:merged "Re-quarantine" in:title`). For each matching PR, check its changed files — if any touch the same file and test, this test must be permanently excluded from automated unquarantining. Only a human may unquarantine such a test.
208+
- The test has **never been re-quarantined**. A test is considered re-quarantined if there exists any merged PR in the repository that either has "Re-quarantine" (case-insensitive) in the title, or has the `re-quarantine` label, and that PR added a `[QuarantinedTest]` attribute to the same test method, test class, or test assembly. To check this:
209+
1. Search for merged PRs with the `re-quarantine` label: `repo:dotnet/aspnetcore is:pr is:merged label:re-quarantine` (do **not** append the test name to this query — PR titles often use method names, class names, or abbreviations that won't match a text search).
210+
2. Search for merged PRs with "Re-quarantine" in the title: `repo:dotnet/aspnetcore is:pr is:merged "Re-quarantine" in:title` (again, do **not** append the test name).
211+
3. For each matching PR from either search, check its changed files using `pull_request_read` (method `get_files`). If any changed file adds a `[QuarantinedTest]` attribute to the test method, the test's containing class, or the test's assembly, this test must be permanently excluded from automated unquarantining. Only a human may unquarantine such a test.
209212

210213
For IIS tests compiled into multiple assemblies (Common.LongTests, Common.FunctionalTests), the same test method appears with different namespace prefixes (e.g., `FunctionalTests.StartupTests.X`, `IISExpress.FunctionalTests.StartupTests.X`, `NewHandler.FunctionalTests.StartupTests.X`, `NewShim.FunctionalTests.StartupTests.X`). ALL variants must have 100% pass rates. Variants with 0 pass / 0 fail (all "other" outcomes) represent tests skipped by `[ConditionalFact]` and should be excluded from the pass-rate check — they are neither passing nor failing.
211214

0 commit comments

Comments
 (0)