[CI] Add new Agent for disabling or quarantining tests#12570
Conversation
radical
commented
Oct 31, 2025
- Add support for ActiveIssue to QuarantineTools
- Add new test-disabler agent
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12570Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12570" |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for marking tests with [ActiveIssue] in addition to [QuarantinedTest] in the QuarantineTools utility. This allows the tool to handle both Aspire-specific test quarantining and standard xUnit test disabling workflows.
- Adds a new
--modeoption to switch betweenquarantine(default, uses QuarantinedTest) andactiveissue(uses ActiveIssue) modes - Updates the tool to handle both attribute types with appropriate namespace imports (
Aspire.TestUtilitiesfor QuarantinedTest,Xunitfor ActiveIssue) - Adds comprehensive test coverage for ActiveIssue functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/QuarantineTools/README.md | Updated documentation to describe the new --mode option and ActiveIssue functionality with usage examples |
| tools/QuarantineTools/Quarantine.cs | Added mode selection logic, constants for both attribute types, and refactored to support either attribute dynamically |
| tests/QuarantineTools.Tests/ActiveIssueTests.cs | New comprehensive test suite covering ActiveIssue attribute addition/removal scenarios |
| .github/agents/test-disabler.md | New agent instruction document for automated test disabling/quarantining via GitHub Copilot |
Comments suppressed due to low confidence (3)
tools/QuarantineTools/Quarantine.cs:636
- The XML documentation comment is outdated. It should be updated to reflect that this method can now remove either [QuarantinedTest] or [ActiveIssue] attributes depending on configuration, not just [QuarantinedTest].
/// <summary>
/// Removes the [QuarantinedTest] attribute from a method, if present. Returns the (potentially)
/// modified method and flags via <paramref name="removed"/> whether a change occurred.
/// </summary>
tools/QuarantineTools/Quarantine.cs:18
- The overview comment at the top of the file should be updated to mention that the tool now supports both [QuarantinedTest] and [ActiveIssue] attributes, not just [QuarantinedTest].
// This small command-line tool helps developers quarantine or unquarantine failing/flaky xUnit tests
// across the repository's tests folder by adding or removing the [QuarantinedTest] attribute on
// test methods. It edits source files directly using Roslyn (Microsoft.CodeAnalysis) to ensure safe and
// structured modifications.
tools/QuarantineTools/Quarantine.cs:1
- The workflow description in the file header comment should be updated to describe that the tool can now add either [QuarantinedTest] or [ActiveIssue] based on the mode, and add the corresponding using directive (Aspire.TestUtilities or Xunit).
// Licensed to the .NET Foundation under one or more agreements.
davidfowl
left a comment
There was a problem hiding this comment.
I want something to investigate tests next ! 😄