Skip to content

Isolate crashed Aspire probe from certificate preparation - #7566

Merged
thomhurst merged 1 commit into
mainfrom
issue-7555-aspire-probe
Nov 4, 2026
Merged

thomhurst merged 1 commit into
mainfrom
issue-7555-aspire-probe

Conversation

@thomhurst

@thomhurst thomhurst commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

The crashed-process regression can spend its startup budget in Aspire preparation before DCP launches the executable. Disable custom certificate trust for this probe, which makes no TLS connections, and remove the unused my-secret parameter along with the other unrelated AppHost resources. Keep the 60-second bound, the never-healthy check, the required InvalidOperationException, and both live/retained process-output assertions.

Aspire 13.6.4 defaults executable trust to Append; CertificateTrustExecutionConfigurationGatherer returns early for None, and ExecutableConfigurationResolver does not emit PEM certificate configuration for that scope. This removes an unnecessary pre-launch path from this regression. The original intermittent Ubuntu stall did not reproduce locally, so this is fixture isolation rather than a proven upstream deadlock diagnosis.

Validation: the targeted CrashedExecutableLogTests filter passed 2/2 in Release/net10.0 on macOS arm64 and in the Linux arm64 .NET SDK 10.0.403 container. The macOS baseline also passed 2/2. Ubuntu-hosted and Windows validation still need CI; no production API or generator output changed.

Closes #7555

Summary by CodeRabbit

  • Tests
    • Updated automated coverage for resource filtering and certificate trust handling.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1bfbe00f-945e-4c9e-b871-cdc168671d0b
Commits

Reviewing files that changed from the base of the PR and between 4cf89bc and 55736ee.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The crashed-executable test fixture now excludes my-secret and sets the probe executable’s certificate trust scope to None.

Changes: Crashed-executable test setup

Layer / File(s) Summary
Configure the test fixture
tests/TUnit.Aspire.Tests/CrashedExecutableLogTests.cs
The fixture excludes my-secret and updates its comment about excluded resources. The probe executable sets CertificateTrustScope.None; its comment states that it makes no TLS connections. The file adds the Aspire.Hosting.ApplicationModel import.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other · Severity of issue fixed: Low

Possibly related PRs

  • thomhurst/TUnit#7283: Introduced the crashed-executable tests and runtime-instance log behavior that this change’s fixture modifies.
Merge Risk: Minimal · previous review 4cf89

The change is limited to test-fixture isolation, with no established production or test correctness regression in the supplied evidence.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning Issue #7555 requires a reliable fixture that observes the nonzero dotnet exit, preserves InvalidOperationException, the live crashed-process marker assertion, and the retained-log assertion, and v… Run both CrashedExecutableLogTests tests on Ubuntu in Release/net10.0 and provide successful CI evidence. Confirm that the run observes the nonzero process exit and InvalidOperationException, while the live and retained output assertion…
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: isolating the crashed Aspire probe from certificate preparation.
Out of Scope Changes check Passed The reviewed changes are limited to CrashedExecutableLogTests.cs. They remove the unresolved my-secret and unrelated resources, and disable certificate preparation for the probe. These changes dir…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Out of Scope Changes check

Explanation

The reviewed changes are limited to CrashedExecutableLogTests.cs. They remove the unresolved my-secret and unrelated resources, and disable certificate preparation for the probe. These changes directly isolate the fixture described by issue #7555. No unrelated production or test behavior is shown.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Full details: Linked Issues check

Explanation

Issue #7555 requires a reliable fixture that observes the nonzero dotnet exit, preserves InvalidOperationException, the live crashed-process marker assertion, and the retained-log assertion, and validates both tests on Ubuntu. The diff removes my-secret and unrelated resources, sets CertificateTrustScope.None, keeps the 60-second timeout and never-healthy check, and preserves both output assertions. However, the PR description states that Ubuntu-hosted validation is still pending. The available evidence therefore does not satisfy the Ubuntu validation requirement.

Resolution

Run both CrashedExecutableLogTests tests on Ubuntu in Release/net10.0 and provide successful CI evidence. Confirm that the run observes the nonzero process exit and InvalidOperationException, while the live and retained output assertions pass. Preserve Windows and macOS validation.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the probe at dawn.
No secret resource lingers on.
Trust scope rests at None today.
The logs still mark the process way.
I nibble clover, then I hop away.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 683f3208-b5e1-4bd0-9820-dabc8a5f5ccd
Commits

Reviewing files that changed from the base of the PR and between 8d0cffe and 4cf89bc.

Files selected for processing: 1
  • tests/TUnit.Aspire.Tests/CrashedExecutableLogTests.cs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.

@thomhurst

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T11:55:59.754774Z 55736ee New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Review: looks good.

Test-only change that isolates the crashed-executable fixture: it removes the unused my-secret parameter (the name matches the AppHost's AddParameter("my-secret", ...)) and sets WithCertificateTrustScope(CertificateTrustScope.None) on the probe. The 60s bound, never-healthy check, expected exception and output assertions are unchanged. ResourcesToRemove only affects this fixture, so WaitForHealthyReproductionTests is unaffected.

Two notes, neither blocking:

  • The PR description says this is fixture isolation, not a proven diagnosis of the Ubuntu stall. If the flake comes back, the next step is to capture Aspire/DCP logs during the startup window. Changing the fixture again won't tell you more.
  • The comment on the trust scope explains the reason well, so a later reader won't re-enable it by accident.

I couldn't run the tests here. They need CI on Ubuntu and Windows, as the description says.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 4cf89bc812

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Isolates the crashed-executable tests from unrelated Aspire setup.

  • The crashed-process probe starts without unused certificate preparation.

No actionable issues found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "Isolate crashed Aspire probe from certif..." · Reviewed by Greptile

@thomhurst
thomhurst marked this pull request as ready for review November 4, 2026 06:41
@thomhurst

Copy link
Copy Markdown
Owner Author

Marked ready after Claude and Codex approved head 4cf89bc; all review surfaces have no blocking findings or unresolved threads. The head is unchanged. Waiting for the ready-for-review Claude run 41787174229 and CI. Read its verdict before arming auto-merge, as required by the repository merge gate.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Review: LGTM.

Test-only change to CrashedExecutableLogTests. Setting CertificateTrustScope.None on the probe executable and removing the unused my-secret parameter both cut pre-launch work. The probe makes no TLS connections and never uses the parameter. The 60s bound, never-healthy check, InvalidOperationException and live/retained output assertions are unchanged.

Notes:

  • The PR description says this is fixture isolation, not a proven root cause of the Ubuntu stall. That is honest. Watch CI on Ubuntu and Windows over the next few runs. If the stall comes back, the cause is elsewhere and Aspire crashed-executable diagnostics test times out with probe still Starting on Ubuntu #7555 should be reopened.
  • ResourcesToRemove relies on hard-coded names from the AppHost. A rename would silently stop removing a resource. This was already the case, so it isn't a blocker.

No production code is affected, so no generator, AOT or public API concerns apply.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Review: LGTM.

The change is small and test-only. It does two things in CrashedExecutableLogTests:

  • It sets WithCertificateTrustScope(CertificateTrustScope.None) on the crashing probe, so the 60s startup budget no longer includes certificate preparation.
  • It adds my-secret to ResourcesToRemove, so the probe's AppHost doesn't carry an unresolved parameter.

I checked that my-secret is still declared in TUnit.Aspire.Tests.AppHost/Program.cs. Other tests still use it (WaitForHealthyReproductionTests). Removing it per fixture is therefore the right scope, and the shared AppHost stays intact.

The 60s bound, the never-healthy check, the InvalidOperationException expectation and the live/retained output assertions are all untouched. The PR description is also upfront that this is fixture isolation rather than a proven root-cause fix for #7555. The explanatory comments are accurate.

Two non-blocking notes:

  • Since the original stall never reproduced locally, watch CI on Ubuntu and Windows. If it recurs, the next suspect is DCP or executable launch timing, not certificate trust.
  • I haven't built or run the tests, so my confidence comes from reading the diff only.

No design concerns.

This branch was previously deployed

1 inactive deployment
Pull Requests — 55736ee9 Deployed Nov 4, 2026 by thomhurst via modularpipeline (windows-latest) #21170
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.

Aspire crashed-executable diagnostics test times out with probe still Starting on Ubuntu

1 participant