Skip to content

Fix /create-issue workflow: parsing, error handling, speed, and testing#15972

Closed
radical wants to merge 7 commits intomicrosoft:mainfrom
radical:fix-create-issue
Closed

Fix /create-issue workflow: parsing, error handling, speed, and testing#15972
radical wants to merge 7 commits intomicrosoft:mainfrom
radical:fix-create-issue

Conversation

@radical
Copy link
Copy Markdown
Member

@radical radical commented Apr 8, 2026

Description

Follow-up to #15780 (merged as PR #15973 for the initial restore fix). This PR contains the remaining fixes, improvements, and test coverage for the /create-issue workflow.

Fixes

  1. Positional + flag parsing bug: /create-issue TestName --force-new was rejected because the parser didn't allow positional test names when flags were present. Fixed in create-failing-test-issue.js.
  2. Silent build failure in list-only mode: When the resolver step failed (e.g., build error), the workflow silently posted "No test failures found" instead of reporting the error. Added RESOLVE_OUTCOME check.
  3. Speed optimization: Replaced restore.sh (~2.5 min) with actions/setup-dotnet (~5s) by isolating CreateFailingTestIssue from the Arcade SDK. Added Directory.Build.props/.targets/Packages.props under the tool directory and replaced ProjectReference to Aspire.TestTools with shared source links.

New features

  • workflow_dispatch trigger: Enables testing from any branch with inputs for test_query, source_url, workflow, force_new, and pr_number.
  • formatListResponse() helper: Extracted list-only response formatting into a testable JS function.

Test coverage

  • 4 new workflow tests: positional+flags parsing, resolver failure error handling, test names from result, empty results
  • CI skip pattern added for create-failing-test-issue.*

Files changed

  • .github/workflows/create-failing-test-issue.yml — workflow fixes + speed optimization
  • .github/workflows/create-failing-test-issue.js — parser fix + formatListResponse
  • tools/CreateFailingTestIssue/ — Arcade isolation (Directory.Build.props/targets/Packages.props, shared source)
  • tests/Infrastructure.Tests/WorkflowScripts/ — new tests + harness update
  • eng/testing/github-ci-trigger-patterns.txt — CI skip pattern

E2E validation

All 7 /create-issue variants tested successfully via workflow_dispatch and PR comments during development.

Microsoft Reviewers: Open in CodeFlow

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15972

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15972"

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

No test failures were found. Use --url to point to a specific workflow run.

📋 /create-issue — Usage

Creates or updates a failing-test issue from CI failures.

/create-issue <test-name>
/create-issue <test-name> <pr|run|job-url>
/create-issue --test "<test-name>"
/create-issue --test "<test-name>" --url <pr|run|job-url>
/create-issue --test "<test-name>" --force-new

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue --url https://github.com/microsoft/aspire/actions/runs/24155707576

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

No test failures were found. Use --url to point to a specific workflow run.

📋 /create-issue — Usage

Creates or updates a failing-test issue from CI failures.

/create-issue <test-name>
/create-issue <test-name> <pr|run|job-url>
/create-issue --test "<test-name>"
/create-issue --test "<test-name>" --url <pr|run|job-url>
/create-issue --test "<test-name>" --force-new

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

No test failures were found. Use --url to point to a specific workflow run.

📋 /create-issue — Usage

Creates or updates a failing-test issue from CI failures.

/create-issue <test-name>
/create-issue <test-name> <pr|run|job-url>
/create-issue --test "<test-name>"
/create-issue --test "<test-name>" --url <pr|run|job-url>
/create-issue --test "<test-name>" --force-new

@radical radical force-pushed the fix-create-issue branch from 6f700dd to 7dc7e66 Compare April 8, 2026 20:56
- Remove --no-restore from dotnet build (fix NETSDK1004)
- Add workflow_dispatch trigger for testing from any branch
- Make workflow steps handle both issue_comment and workflow_dispatch
- Intentionally break two tests for end-to-end validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@radical radical force-pushed the fix-create-issue branch from 7dc7e66 to b38c474 Compare April 8, 2026 21:01
@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Failed tests found on this PR:

  • /create-issue Aspire.Hosting.Tests.ModelNameTests.ValidateName_Empty_Error
  • /create-issue Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet

📋 /create-issue — Usage

Creates or updates a failing-test issue from CI failures.

/create-issue <test-name>
/create-issue <test-name> <pr|run|job-url>
/create-issue --test "<test-name>"
/create-issue --test "<test-name>" --url <pr|run|job-url>
/create-issue --test "<test-name>" --force-new

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ Created failing-test issue #15978: #15978

To disable this test on your PR, comment:

/disable-test Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet https://github.com/microsoft/aspire/issues/15978

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue --test "Aspire.Hosting.Tests.ModelNameTests.ValidateName_Empty_Error"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ Created failing-test issue #15979: #15979

To disable this test on your PR, comment:

/disable-test Aspire.Hosting.Tests.ModelNameTests.ValidateName_Empty_Error https://github.com/microsoft/aspire/issues/15979

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ Updated failing-test issue #15978: #15978

To disable this test on your PR, comment:

/disable-test Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet https://github.com/microsoft/aspire/issues/15978

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet --force-new

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

@radical ❌ Unknown argument 'Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet'. Supported arguments are --test, --url, --workflow, and --force-new.

The parser rejected positional test names when any flag was present,
e.g. '/create-issue TestName --force-new' would fail with 'Unknown
argument'. Now non-flag tokens are accepted as positional test names
in flag mode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue --test "Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet" --force-new

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 8, 2026

/create-issue --test "Aspire.Hosting.Tests.ModelNameTests.ValidateName_Empty_Error" --url https://github.com/microsoft/aspire/actions/runs/24158509554

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ Created failing-test issue #15982: #15982

To disable this test on your PR, comment:

/disable-test Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet https://github.com/microsoft/aspire/issues/15982

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ Reopened failing-test issue #15979: #15979

To disable this test on your PR, comment:

/disable-test Aspire.Hosting.Tests.ModelNameTests.ValidateName_Empty_Error https://github.com/microsoft/aspire/issues/15979

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ Reopened failing-test issue #15982: #15982

To disable this test on your PR, comment:

/disable-test Aspire.Hosting.Tests.ValueSnapshotTests.IsValueSet_FalseBeforeAnySet https://github.com/microsoft/aspire/issues/15982

radical and others added 2 commits April 8, 2026 18:27
All /create-issue variants tested successfully:
- List-only (no args)
- Positional test name
- --test flag
- Update existing issue
- --force-new
- --url with explicit run URL
- workflow_dispatch with pr_number

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract the list-only response logic from inline YAML into a testable
formatListResponse() function in the JS helper. This covers the bug
where a resolver build failure silently fell through to 'No test
failures found' instead of reporting the error.

New tests:
- FormatListResponseReturnsErrorWhenResolverFailed
- FormatListResponseReturnsTestNamesFromResult
- FormatListResponseReturnsNoFailuresWhenResultIsEmpty

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Isolate CreateFailingTestIssue from the repo's Arcade SDK by adding
Directory.Build.props/targets/Packages.props that cut inheritance.
Replace ProjectReference to Aspire.TestTools with shared source links.
Replace restore.sh (~2.5min) with setup-dotnet action (~5s).

The tool builds in ~4s with a plain dotnet SDK, no Arcade needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@radical radical changed the title Fix /create-issue workflow restore failure Fix /create-issue workflow: parsing, error handling, speed, and testing Apr 8, 2026
# Conflicts:
#	.github/workflows/create-failing-test-issue.yml
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

No test failures were found. Use --url to point to a specific workflow run.

📋 /create-issue — Usage

Creates or updates a failing-test issue from CI failures.

/create-issue <test-name>
/create-issue <test-name> <pr|run|job-url>
/create-issue --test "<test-name>"
/create-issue --test "<test-name>" --url <pr|run|job-url>
/create-issue --test "<test-name>" --force-new

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Failed tests found on this PR:

  • /create-issue Aspire.Cli.EndToEnd.Tests.JavaScriptPublishTests.AllPublishMethodsBuildDockerImages
  • /create-issue Aspire.Cli.EndToEnd.Tests.StartStopTests.AddPackageInteractiveWhileAppHostRunningDetached
  • /create-issue Aspire.Cli.EndToEnd.Tests.StartStopTests.AddPackageWhileAppHostRunningDetached
  • /create-issue Aspire.Cli.EndToEnd.Tests.StartStopTests.CreateStartAndStopAspireProject
  • /create-issue Aspire.Cli.EndToEnd.Tests.StartStopTests.StopWithNoRunningAppHostExitsSuccessfully

📋 /create-issue — Usage

Creates or updates a failing-test issue from CI failures.

/create-issue <test-name>
/create-issue <test-name> <pr|run|job-url>
/create-issue --test "<test-name>"
/create-issue --test "<test-name>" --url <pr|run|job-url>
/create-issue --test "<test-name>" --force-new

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ Created failing-test issue #15983: #15983

To disable this test on your PR, comment:

/disable-test Aspire.Cli.EndToEnd.Tests.StartStopTests.StopWithNoRunningAppHostExitsSuccessfully https://github.com/microsoft/aspire/issues/15983

Replace Node 20 github-script@v7 with github-script@v8 to avoid
the upcoming Node 20 deprecation on GitHub Actions runners.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Failed tests found on this PR:

  • /create-issue Aspire.Cli.EndToEnd.Tests.JavaScriptPublishTests.AllPublishMethodsBuildDockerImages
  • /create-issue Aspire.Cli.EndToEnd.Tests.StartStopTests.AddPackageInteractiveWhileAppHostRunningDetached
  • /create-issue Aspire.Cli.EndToEnd.Tests.StartStopTests.AddPackageWhileAppHostRunningDetached
  • /create-issue Aspire.Cli.EndToEnd.Tests.StartStopTests.CreateStartAndStopAspireProject
  • /create-issue Aspire.Cli.EndToEnd.Tests.StartStopTests.StopWithNoRunningAppHostExitsSuccessfully

📋 /create-issue — Usage

Creates or updates a failing-test issue from CI failures.

/create-issue <test-name>
/create-issue <test-name> <pr|run|job-url>
/create-issue --test "<test-name>"
/create-issue --test "<test-name>" --url <pr|run|job-url>
/create-issue --test "<test-name>" --force-new

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ Created failing-test issue #15985: #15985

To disable this test on your PR, comment:

/disable-test Aspire.Cli.EndToEnd.Tests.StartStopTests.CreateStartAndStopAspireProject https://github.com/microsoft/aspire/issues/15985

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@radical
Copy link
Copy Markdown
Member Author

radical commented Apr 9, 2026

Closed in favor of #15988

@radical radical closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant