Skip to content

Show unresolved parameters in resource state - #18896

Closed
James Newton-King (JamesNK) wants to merge 28 commits into
mainfrom
feature/unresolved-parameter-resource-state
Closed

James Newton-King (JamesNK) wants to merge 28 commits into
mainfrom
feature/unresolved-parameter-resource-state

Conversation

@JamesNK

@JamesNK James Newton-King (JamesNK) commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Description

Resources that reference unresolved parameters previously remained in the Starting state while launch configuration waited for parameter values. This made it difficult to distinguish parameter blocking from ordinary startup and did not identify which values were required.

This change introduces an UnresolvedParameters resource state and publishes the unresolved parameter names as resource metadata. The list updates as values are supplied, then the resource returns to Starting while normal startup completes. Dashboard state details show the parameter names, and late parameter completions cannot overwrite a newer running or terminal state.

User-facing usage

When a resource is blocked by missing parameter values, the dashboard now displays Unresolved parameters with warning styling. Its state details identify the required values, for example:

Waiting for parameters: first, second

The detail list shrinks as parameters resolve and is removed once startup can continue.

image image unresolved-parameters

Known limitation

The UnresolvedParameters state is inferred from recorded parameter reference relationships and inspectable value expressions, not by observing every parameter read at runtime. A parameter used only inside an opaque environment-variable or argument callback, with no recorded reference or inspectable value expression, is not detected by this state-reporting mechanism.

Launch configuration still waits for the parameter value, but the resource may remain in Starting (or Waiting if it also has resource dependencies) instead of displaying UnresolvedParameters and the missing parameter name. Launch callbacks are deliberately not executed early just to discover these references, preserving their startup ordering and avoiding duplicate side effects.

Validation:

  • dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class "*.ApplicationOrchestratorTests" --filter-class "*.ResourceNotificationTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" (66 passed)
  • dotnet test --project tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj --no-launch-profile -- --filter-class "*.ResourceStateViewModelTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" (21 passed)
  • dotnet build /t:UpdateXlf src/Aspire.Dashboard/Aspire.Dashboard.csproj

No existing issue was found that directly tracks dependent resources remaining in Starting while waiting for unresolved parameters.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

@github-actions

Copy link
Copy Markdown
Contributor

🚀 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 -- 18896

Or

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

@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an UnresolvedParameters resource state so blocked resources expose missing parameter names in the dashboard.

Changes:

  • Tracks unresolved parameters during resource startup.
  • Adds dashboard state text, warning styling, and localization.
  • Adds hosting and dashboard regression tests.

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Aspire.Hosting.Tests/ResourceNotificationTests.cs Tests metadata cleanup after state transitions.
tests/Aspire.Hosting.Tests/Orchestrator/ApplicationOrchestratorTests.cs Tests unresolved-parameter lifecycle behavior.
tests/Aspire.Dashboard.Tests/Model/ResourceStateViewModelTests.cs Tests dashboard state presentation.
src/Shared/Model/KnownProperties.cs Defines unresolved-parameter metadata key.
src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs Publishes and monitors unresolved parameters.
src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs Clears stale unresolved-parameter metadata.
src/Aspire.Hosting/ApplicationModel/CustomResourceSnapshot.cs Defines the new public resource state.
src/Aspire.Dashboard/Resources/Columns.resx Adds dashboard strings.
src/Aspire.Dashboard/Resources/Columns.Designer.cs Exposes generated resource properties.
src/Aspire.Dashboard/Resources/xlf/Columns.cs.xlf Updates Czech localization.
src/Aspire.Dashboard/Resources/xlf/Columns.de.xlf Updates German localization.
src/Aspire.Dashboard/Resources/xlf/Columns.es.xlf Updates Spanish localization.
src/Aspire.Dashboard/Resources/xlf/Columns.fr.xlf Updates French localization.
src/Aspire.Dashboard/Resources/xlf/Columns.it.xlf Updates Italian localization.
src/Aspire.Dashboard/Resources/xlf/Columns.ja.xlf Updates Japanese localization.
src/Aspire.Dashboard/Resources/xlf/Columns.ko.xlf Updates Korean localization.
src/Aspire.Dashboard/Resources/xlf/Columns.pl.xlf Updates Polish localization.
src/Aspire.Dashboard/Resources/xlf/Columns.pt-BR.xlf Updates Brazilian Portuguese localization.
src/Aspire.Dashboard/Resources/xlf/Columns.ru.xlf Updates Russian localization.
src/Aspire.Dashboard/Resources/xlf/Columns.tr.xlf Updates Turkish localization.
src/Aspire.Dashboard/Resources/xlf/Columns.zh-Hans.xlf Updates Simplified Chinese localization.
src/Aspire.Dashboard/Resources/xlf/Columns.zh-Hant.xlf Updates Traditional Chinese localization.
src/Aspire.Dashboard/Model/ResourceViewModelExtensions.cs Reads unresolved parameter metadata.
src/Aspire.Dashboard/Model/ResourceStateViewModel.cs Builds parameter-aware tooltips.
src/Aspire.Dashboard/Model/KnownResourceState.cs Adds the dashboard state enum value.
src/Aspire.Dashboard/Extensions/ResourceViewModelExtensions.cs Identifies the new state.
Files not reviewed (1)
  • src/Aspire.Dashboard/Resources/Columns.Designer.cs: Generated file

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@JamesNK
James Newton-King (JamesNK) marked this pull request as draft July 27, 2026 02:22
Copilot AI review requested due to automatic review settings July 27, 2026 02:29
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 27 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • src/Aspire.Dashboard/Resources/Columns.Designer.cs: Generated file
Comments suppressed due to low confidence (3)

src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs:239

  • This dependency discovery executes environment/argument callbacks before BeforeResourceStartedEvent is published below. That reverses the lifecycle contract covered by DcpExecutorTests.EnvironmentCallbacksInvokedAfterBeforeResourceStartEvent: callbacks may depend on state initialized by that event, so enabling this feature can hang startup or compute the wrong dependencies whenever any parameter is unresolved. Reuse dependency data captured during parameter initialization, or defer discovery until after the event while accounting for the existing Waiting transition.
        var dependencies = await context.Resource.GetResourceDependenciesAsync(
            _executionContext,
            ResourceDependencyDiscoveryMode.DirectOnly,
            context.CancellationToken).ConfigureAwait(false);

src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs:243

  • Using Task.IsCompleted does not match the processor's definition of unresolved. DeleteParameterCoreAsync re-adds a cleared parameter to _unresolvedParameters and sets the global flag, but assigns it a completed faulted TCS; therefore a dependent resource started after clearing the value is omitted from this list and never shows UnresolvedParameters. Query unresolved membership from ParameterProcessor rather than inferring it from task completion, and cover the clear-then-start path.
        var unresolvedParameters = dependencies
            .OfType<ParameterResource>()
            .Where(static parameter => parameter.WaitForValueTcs?.Task.IsCompleted is false)
            .OrderBy(static parameter => parameter.Name, StringComparers.ResourceName)

src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs:348

  • UnresolvedParameters replaces Starting, but the lifecycle command state machine does not recognize it. In this state the start command becomes hidden and stop/restart become enabled, whereas Starting makes start/restart disabled and stop hidden (CommandsConfigurationExtensions.cs:33-46,66-79,106-116). Add this state to those classifiers and their ResourceCommandAnnotationTests cases so displaying the blocker does not change available operations.
            return snapshot with
            {
                State = new(KnownResourceStates.UnresolvedParameters, KnownResourceStateStyles.Warn),
                Properties = snapshot.Properties.SetResourceProperty(KnownProperties.Resource.UnresolvedParameters, parameterNames)

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI review requested due to automatic review settings July 27, 2026 03:16
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • src/Aspire.Dashboard/Resources/Columns.Designer.cs: Generated file

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI review requested due to automatic review settings July 27, 2026 03:57
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 35 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • src/Aspire.Dashboard/Resources/Columns.Designer.cs: Generated file
Comments suppressed due to low confidence (1)

src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs:244

  • Dependency discovery can block before the unresolved state is published. For example, the supported external-service environment callback in ResourceBuilderExtensions.cs:439-452 awaits UrlParameter.GetValueAsync() before adding the parameter to the callback result. When that URL parameter is missing, this await never returns, so OnResourceStarting remains here and the resource still appears as Starting. Track these parameter references statically (or use a discovery path that does not await runtime value resolution) and add coverage for a parameterized external-service reference.
        var dependencies = await context.Resource.GetResourceDependenciesAsync(
            _executionContext,
            ResourceDependencyDiscoveryMode.DirectOnly,
            context.CancellationToken).ConfigureAwait(false);

Copilot AI review requested due to automatic review settings July 27, 2026 04:19
Separate startup-blocker tracking from interactive prompting and cover non-interactive deletion and prompt recovery. Keep Stress parameters unset at startup for runtime restart validation.

Co-authored-by: Copilot <[email protected]>
Reuse recursive value-provider discovery for the connection-string-builder environment overload. Cover nested and referenced-only parameters, partial resolution, and relationship preservation, and document the delegated relationship tracking.

Co-authored-by: Copilot <[email protected]>
Cancel only private monitor waits when pending or missing-value generations are replaced, and detach value-change observers on completion. Preserve shared startup tasks and valid monitors across successful reassignment or ordinary failures. Cover repeated replacements, group and instance scopes, stale generations, and callbacks captured before cancellation.

Co-authored-by: Copilot <[email protected]>
Rediscover current connection metadata and expose parameter dependencies held by Keycloak, Entra ID, external-service, and MongoDB callbacks. Centralize startup-state eligibility and report unresolved parameters during custom-resource initialization while preserving per-start and replica behavior. Add regression coverage and a manual Stress scenario.

Co-authored-by: Copilot <[email protected]>
Preserve endpoint owner relationships without traversing their connection metadata during configuration or startup parameter discovery. Retain credential tracking when connection strings are explicitly consumed. Add regression coverage for endpoint properties, expressions, late metadata, dependency force-start, and publish placeholders.

Co-authored-by: Copilot <[email protected]>
Publish model snapshots before parameter initialization so referenced-only parameters cannot claim IDs owned by model resources. Preserve parameter value processing and resource initialization ordering, with coverage for resolved and unresolved values.

Co-authored-by: Copilot <[email protected]>
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Monitor cleanup and unresolved-state reporting for parent-owned children remain incomplete.

2 open issues
1 resolved since last review
1 file not reviewed
  • src/Aspire.Dashboard/Resources/Columns.Designer.cs: Generated file

Review effort: Balanced

break;
}

await PublishUnresolvedParametersStateAsync(context.Resource, context.DcpResourceName, context.CancellationToken).ConfigureAwait(false);
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@IEvangelist

Copy link
Copy Markdown
Member

PR Testing Report

PR Information

  • PR Number: Show unresolved parameters in resource state #18896
  • Title: Show unresolved parameters in resource state
  • Head Commit: 6ad11db58fef45c706beceb1c0baf3b61e4b4781
  • Tested At: 2026-10-19, 13:43–14:33 UTC (Windows, local mode, isolated AppHosts via aspire start --isolated)

Artifact Version Verification

Build Used for aspire --version (installed PR binary) Expected commit Status
A S1, S2, S3 17.0.0-pr.18896.ga0839e64 a0839e64… (PR head when installed) ✅ Verified
B H2 17.0.0-pr.18896.g6ad11db5 6ad11db5… (current PR head) ✅ Verified

The Build B MCP server also reported aspire-mcp-server 17.0.0-pr.18896.g6ad11db5.

The PR head moved during testing. It was force-pushed (rebase) at 13:39:13 UTC: a0839e64 → 6ad11db5. Each head's own change set was compared (git diff -U0 against its own merge-base, index and @@ lines stripped; 27 commits each) and is byte-identical (MD5 7606DAC6B36FCBE425C5D14A2EAA34E3, 0 differing +/- lines), so only the base changed. The combined scenario (H2) was re-run on Build B so the results also cover the current head.

Changes Analyzed

59 files, +4240/−271, 27 commits.

Files Changed

  • Hosting (src/Aspire.Hosting)
    • KnownResourceStates - new UnresolvedParameters state (warning style) plus WaitingStates.
    • ResourceNotificationService / KnownProperties - startup-blocker state and the unresolvedParameters resource property.
    • ApplicationOrchestrator (+339) - discovers the parameters a resource depends on and publishes/monitors the state.
    • ResourceBuilderExtensions / ResourceReferenceDiscoveryAnnotation - record parameter usage from WithEnvironment, WithArgs, WithReference and connection properties.
    • ParameterProcessor / ParameterResource - re-flag consumers when a parameter becomes unresolved again.
    • CommandsConfigurationExtensions - command-state rules; DcpExecutor / DcpExecutorEvents - event ordering.
  • Integrations: EntraId, Keycloak (admin password), MongoDB (WithKeyFile), ExternalService (URL parameter), Dotnet build coordinator.
  • Dashboard: new known state, state view model and tooltip ("Waiting for parameters: …"), localized strings (resx + 13 xlf).
  • CLI: McpToolHelpers.MapResourceState allow-list.
  • Playground / tests: Stress AppHost; about 25 test files (mostly ApplicationOrchestratorTests and WithReferenceTests).

Change Categories

  • CLI changes detected (MCP state mapping)
  • Hosting integration changes
  • Dashboard changes
  • Template changes
  • Client/Component changes
  • CI infrastructure changes
  • VS Code extension changes
  • Test changes

Test Scenarios Executed

Fixtures were created with aspire new aspire-starter from the PR hive and edited to add parameters. "Unset" parameters had no value; all values used were dummy test values.

Scenario S1: Blocked → unblocked, dashboard, rebuild/delete/restart (Build A)

Objective: Consumers of unset parameters show UnresolvedParameters with the right list instead of looking like they are starting, and recover as parameters are set.
Coverage Type: Happy path + unhappy path
Status: ✅ Passed

Steps:

  1. apiservice consumed two unset parameters (api-key, db-password); webfrontend consumed one (region) and used WaitFor(apiservice).
  2. aspire describe: both consumers UnresolvedParameters with the correct lists; webfrontend kept waitingFor=[apiservice].
  3. Dashboard: warning icon, "Waiting for parameters: …" tooltip, "Enter values" banner, Start disabled. Actions menu: Start/Restart disabled, Rebuild enabled, Stop hidden.
  4. aspire resource <param> set-parameter: the list shrank one name at a time. apiservice launched when its last parameter was set while webfrontend stayed UnresolvedParameters [region]. webfrontend reached Running about 0.2 s after region was set.
  5. Unhappy: aspire resource webfrontend rebuild while blocked - exit 0 in about 2 s, state unchanged, new message logged ("Resource will start with the updated binary when startup blockers are resolved").
  6. Unhappy: delete-parameter db-password while apiservice was Running - it stayed Running and the parameter went to ValueMissing. restart apiservice re-flagged it UnresolvedParameters [db-password]; set-parameter recovered it.
  7. Unhappy: aspire resource apiservice start while blocked - see Finding 1.

Evidence: s1-dashboard-01…05.png, s1-describe-*, s1-set-commands.log, s1-rebuild-while-blocked.txt, s1-delete-while-running.txt, s1-follow.log

Expected Unhappy-Path Outcome: blocked resources stay blocked (no state change on rebuild); deleted parameters only affect the next launch; recovery by setting the parameter. All observed.


Scenario S2: Late-bound properties, ExternalService, opaque callback, MCP (Build A)

Objective: Exercise discovery paths beyond plain WithEnvironment, plus failure and recovery paths.
Coverage Type: Happy path + unhappy path + boundary
Status: ✅ Passed

Steps:

  1. Initial: apiservice [api-key, cs-password, db-password, ext-url]; webfrontend [late-prop, region] (late-bound connection property discovered); ext (ExternalService) [ext-url]. opaque-value, used only inside an environment callback, is not listed (documented limitation, Finding 3).
  2. A: after webfrontend's own parameters were set, it moved from UnresolvedParameters to Waiting (on apiservice).
  3. B: delete-parameter region while webfrontend was Waiting re-flagged it UnresolvedParameters [region] (and kept waitingFor); setting it again returned to Waiting.
  4. C (unhappy): set-parameter api-key --value '' was rejected (--value: Value is required., exit 16); state unchanged.
  5. D/E: the list shrank per set-parameter; apiservice sat in Starting with an empty list until opaque-value was set, then all 5 resources were Running/Healthy and the secret argument was masked.
  6. F (unhappy): with everything Running, ext-url=not-a-url left Running resources untouched. restart apiservice then gave FailedToStart ("The URL for the external service must be an absolute URI") while webfrontend stayed Running.
  7. G: a valid ext-url plus aspire resource apiservice start recovered apiservice to Running/Healthy.
  8. MCP: list_resources reports state: UnresolvedParameters / state_style: warning (not unknown); wait_for_resources (healthy, 300 s) returned outcome: success across UnresolvedParameters → Starting → Running.

Evidence: s2-dashboard-01…05.png, s2-step-a…g-*.txt, s2-mcp-blocked.txt, s2-mcp-unblock.txt, s2-timeline-summary.txt

Expected Unhappy-Path Outcome: validation error with non-zero exit; safe FailedToStart that does not disturb other resources; recoverable by fixing the parameter. All observed.


Scenario S3: In-process state trace (Build A)

Objective: Confirm exact state transitions with ResourceNotificationService.WatchAsync.
Coverage Type: Happy path + boundary
Status: ✅ Passed

Observations:

  • apiservice (resolved parameters only) never reported UnresolvedParameters.
  • webfrontend went Starting → UnresolvedParameters [pending] within 3 ms; UnresolvedParameters won over Waiting; resolved parameters were never listed; only rebuild was enabled while blocked.
  • Setting pending gave Running/Healthy in about 0.2 s.

Evidence: s3-state-trace.log, s3-step-unblock.txt


Scenario H2: Combined re-run on the rebased head (Build B)

Objective: Re-verify every behavior above on the build from the current head.
Coverage Type: Happy path + unhappy path + boundary
Status: ✅ Passed

Fixture: 3 resolved and 7 unset parameters, connection strings appdb and late-source, ExternalService ext, apiservice (resolved-only consumer), webfrontend (heavy consumer plus an opaque env callback), and an in-process notification trace.

Steps and observations:

  1. Blocked state matched Build A: webfrontend UnresolvedParameters [api-key, cs-password, db-password, ext-url, late-prop, region] (opaque-value not listed, rebuild the only command); ext [ext-url]; apiservice Running throughout; appdb Waiting [cs-password].
  2. Dashboard: banner, warning icons, "Waiting for parameters: …" row text, Start disabled, actions menu with Start/Restart disabled and Rebuild enabled; secret values masked.
  3. MCP (blocked): webfrontend and ext report state: UnresolvedParameters, state_style: warning. wait_for_resources (8 s) returned outcome: timeout; apiservice succeeded and webfrontend reported "Timed out waiting for the target state."
  4. Unblock: the list shrank one name per set-parameter; appdb went Waiting → Running on cs-password; ext went Running on a valid ext-url; webfrontend went to Starting with an empty list while opaque-value was unset; setting it made everything Running/Healthy. A parallel MCP wait_for_resources (healthy) returned outcome: success after about 41 s.
  5. Unhappy: delete-parameter region while webfrontend was Running left it Running (region → ValueMissing). restart webfrontend went Stopping → Finished → Starting → UnresolvedParameters [region] in about 0.7 s. The restart command blocked until the gate opened and returned exit 0 after 179 s, once region was set from another shell.
  6. Unhappy: rebuild webfrontend while blocked - exit 0 in 3 s, state unchanged, still rebuild-only.
  7. Recovery: set-parameter region returned all resources to Running/Healthy; the dashboard showed all resources Running with no banner.
  8. Trace analysis (145 rows): 0 apiservice rows with UnresolvedParameters; 0 rows listing a resolved parameter; 0 rows with a non-empty list but a different state; 0 UnresolvedParameters rows with an empty list; 4 rows carrying both UnresolvedParameters and waitingFor (priority UnresolvedParameters > Waiting confirmed).
  9. ext showed Waiting for about 29 ms before UnresolvedParameters; ExternalServiceBuilderExtensions already created it with an initial Waiting state on main.

Evidence: h2-dashboard-01…03.png, h2-trace-analysis.txt, h2-state-trace.log, h2-step-*.txt, h2-mcp-*-summary.txt


Findings (none blocking)

  1. Forced start while blocked (Low). Start is disabled in the dashboard and not offered by describe, but aspire resource <name> start is still accepted while a resource is UnresolvedParameters: the command blocks until the parameters are resolved. In S1, when the last parameter was set, apiservice went Starting → Stopping → Starting → Waiting → Starting → Running (about 1.2 s) while a normal unblock of webfrontend in the same run was clean (Starting → Running). From reading the code, ResourceCommandService does not enforce the enabled state, so this looks pre-existing, but it was not baseline-compared and was observed on Build A only.
  2. MCP exposes the state, not the names (enhancement). list_resources reports UnresolvedParameters but waiting_for stays [], so an agent cannot tell which parameters to ask for. The names are available through aspire describe and the dashboard.
  3. Parameters used only inside opaque callbacks are not listed (documented in the PR). Confirmed on both builds: the resource stays Starting with an empty list. Launch is still gated on the parameter value, so nothing starts early; it is just not labeled.
  4. Rebuild log wording (nit). While blocked, the build log prints "Stopping resource for rebuild..." and "Build succeeded. Restarting resource..." before "Resource will start with the updated binary when startup blockers are resolved", although nothing is stopped or restarted.
  5. FYI (no action): appdb (connection string with an unset parameter) shows Waiting [param] rather than UnresolvedParameters - it comes from the existing WaitForStart on connection strings; the restart/start CLI commands block until the launch gate opens; short transients on start (a blank state between Starting and Running, a ~1.6 s Unhealthy → Healthy blip) were seen but not baseline-compared.

Not Covered / Limitations

  • The Docker engine was not running, so container-backed scenarios (Keycloak admin password, MongoDB WithKeyFile) were not run; EntraId needs Azure. Those integration changes were not exercised end to end. The PR's own unit tests were not run locally.
  • Windows only; no baseline (main) CLI comparison.
  • The empty-value rejection, the invalid-ExternalService-URL recovery and the forced-start observation were exercised on Build A only. The PR's own diff is byte-identical across the rebase.
  • No dashboard screenshot for S3 (verified through the in-process trace).

Summary

Scenario Build Status Notes
S1 Blocked → unblocked, dashboard, rebuild/delete/restart A ✅ Passed Forced start observation (Finding 1)
S2 Late-bound properties, ExternalService, opaque callback, MCP A ✅ Passed Empty value rejected (exit 16); invalid URL → FailedToStart and recovery
S3 In-process state trace A ✅ Passed -
H2 Combined re-run on the rebased head B ✅ Passed 145-row trace, no violations
Container-backed integrations (Keycloak, MongoDB, EntraId) - ⚪ Not run Docker not available

Overall Result

✅ PR VERIFIED - no blocking issues found. The UnresolvedParameters state, parameter lists, command states, dashboard presentation, MCP mapping and recovery paths behave as described.

Recommendations

  • Consider surfacing the unresolved parameter names to MCP clients, since waiting_for is empty in this state.
  • Decide whether the CLI/MCP start path should honor the disabled Start state while UnresolvedParameters (or document that it queues until resolved), and compare the transient Stopping blip against main.
  • Consider adjusting the rebuild log wording while a resource is blocked.

Evidence

Captured locally (screenshots cannot be attached through gh pr comment): 13 dashboard screenshots (Build A S1/S2, Build B H2) and the logs referenced above.

@IEvangelist David Pine (IEvangelist) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there's a bit of follow up questions and suggestions that I think needed to be addressed, but otherwise :shipit:.

Observe startup state changes and retire model-scoped monitors after each captured replica finishes its attempt. Cover overridden parameters, restarts, and replica lifetimes.

Co-authored-by: Copilot <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

56 / 99 PR test projects · 5 PR jobs, from 59 changed files.

Selected PR test projects (56 / 99)

Aspire.Cli.EndToEnd.Tests, Aspire.Cli.Tests, Aspire.Dashboard.Components.Tests, Aspire.Dashboard.Tests, Aspire.Hosting.Analyzers.Tests, Aspire.Hosting.Azure.EntraId.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Azure.Provisioning.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Browsers.Tests, Aspire.Hosting.CodeGeneration.Go.Tests, Aspire.Hosting.CodeGeneration.Java.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.Rust.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Garnet.Tests, Aspire.Hosting.Go.Tests, Aspire.Hosting.Java.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Kafka.Tests, Aspire.Hosting.Keycloak.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Maui.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.MongoDB.Tests, Aspire.Hosting.MySql.Tests, Aspire.Hosting.Nats.Tests, Aspire.Hosting.OpenAI.Tests, Aspire.Hosting.Oracle.Tests, Aspire.Hosting.Orleans.Tests, Aspire.Hosting.PostgreSQL.Tests, Aspire.Hosting.Python.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.RabbitMQ.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Redis.Tests, Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Rust.Tests, Aspire.Hosting.Seq.Tests, Aspire.Hosting.SqlServer.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Hosting.Valkey.Tests, Aspire.Hosting.Yarp.Tests, Aspire.Playground.Tests, Aspire.Templates.Tests, Infrastructure.Tests

Selected PR jobs (5)

cli-starter-validation, extension-e2e, native-dashboard-validation, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

⚠️ 23 of the 56 selected test projects come from a single change — tests/Aspire.Hosting.TestUtilities/Dcp/ApplicationOrchestratorProxy.cs.

🧪 tests/Aspire.Hosting.TestUtilities/Dcp/ApplicationOrchestratorProxy.cs (changed test)
→ 23 via the project graph

show 23

Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Containers.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.Garnet.Tests, Aspire.Hosting.Go.Tests, Aspire.Hosting.Java.Tests, Aspire.Hosting.Kafka.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.MySql.Tests, Aspire.Hosting.Nats.Tests, Aspire.Hosting.OpenAI.Tests, Aspire.Hosting.Oracle.Tests, Aspire.Hosting.Orleans.Tests, Aspire.Hosting.PostgreSQL.Tests, Aspire.Hosting.Python.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.RabbitMQ.Tests, Aspire.Hosting.Redis.Tests, Aspire.Hosting.Rust.Tests, Aspire.Hosting.Seq.Tests, Aspire.Hosting.SqlServer.Tests, Aspire.Hosting.Valkey.Tests, Aspire.Hosting.Yarp.Tests

🔧 src/Aspire.Hosting.Dotnet/DotnetProjectBuildCoordinator.cs (changed source)
→ 3 directly: Aspire.Cli.EndToEnd.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Templates.Tests
→ 6 via the project graph: Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Hosting/ApplicationModel/CommandsConfigurationExtensions.cs (changed source)
→ 8 via the project graph: Aspire.Hosting.Analyzers.Tests (2 hops), Aspire.Hosting.Azure.Provisioning.Tests (3 hops), Aspire.Hosting.CodeGeneration.Go.Tests, Aspire.Hosting.CodeGeneration.Java.Tests, Aspire.Hosting.CodeGeneration.Python.Tests, Aspire.Hosting.CodeGeneration.Rust.Tests, Aspire.Hosting.Maui.Tests, Aspire.Playground.Tests

🔧 src/Aspire.Dashboard/Extensions/ResourceViewModelExtensions.cs (changed source)
→ 3 via the project graph: Aspire.Dashboard.Components.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Testing.Tests

🧪 tests/Shared/TestInteractionService.cs (changed test)
→ 3 via the project graph: Aspire.Hosting.Browsers.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.RemoteHost.Tests

📦 affected project Aspire.Hosting.Dotnet
→ 2 tests: Aspire.Cli.EndToEnd.Tests, Aspire.Templates.Tests

🔧 src/Aspire.Hosting.Azure.EntraId/EntraIdResourceExtensions.cs (changed source)
→ 2 directly: Aspire.Hosting.Azure.EntraId.Tests, Aspire.Hosting.Azure.Tests

🔧 src/Shared/Model/KnownProperties.cs (changed source)
→ 2 via the project graph: Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests
→ 1 via the project graph: Aspire.Hosting.Blazor.Tests

📦 affected project Aspire.Cli
→ 1 test: Aspire.Cli.EndToEnd.Tests

📦 affected project Aspire.Dashboard
→ 1 test: Aspire.Templates.Tests

📄 playground/Stress/Stress.AppHost/AppHost.cs (changed)
→ 1 directly: Aspire.Playground.Tests

📄 playground/Stress/Stress.AppHost/Stress.AppHost.csproj (changed)
→ 1 directly: Aspire.Playground.Tests

🔧 src/Aspire.Dashboard/Resources/Columns.resx (changed source)
→ 1 directly: Infrastructure.Tests

🔧 src/Aspire.Hosting.Keycloak/KeycloakResourceBuilderExtensions.cs (changed source)
→ 1 directly: Aspire.Hosting.Keycloak.Tests

🔧 src/Aspire.Hosting.MongoDB/MongoDBBuilderExtensions.cs (changed source)
→ 1 directly: Aspire.Hosting.MongoDB.Tests

🧪 tests/Aspire.Cli.Tests/Mcp/ListResourcesToolTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Cli.Tests/Mcp/WaitForResourcesToolTests.cs (changed test)
→ 1 directly: Aspire.Cli.Tests

🧪 tests/Aspire.Dashboard.Tests/Model/ResourceStateViewModelTests.cs (changed test)
→ 1 directly: Aspire.Dashboard.Tests

🧪 tests/Aspire.Hosting.Azure.EntraId.Tests/EntraIdResourceBuilderTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.EntraId.Tests

🧪 tests/Aspire.Hosting.Dotnet.Tests/DotnetProjectBuildCoordinatorTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Dotnet.Tests

🧪 tests/Aspire.Hosting.Keycloak.Tests/KeycloakResourceBuilderTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Keycloak.Tests

🧪 tests/Aspire.Hosting.MongoDB.Tests/SingleMemberReplicaSetTests.cs (changed test)
→ 1 directly: Aspire.Hosting.MongoDB.Tests

🧪 tests/Aspire.Hosting.Tests/ExternalServiceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

🧪 tests/Aspire.Hosting.Tests/Orchestrator/ApplicationOrchestratorTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

🧪 tests/Aspire.Hosting.Tests/Orchestrator/ParameterProcessorTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

🧪 tests/Aspire.Hosting.Tests/ResourceCommandAnnotationTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

🧪 tests/Aspire.Hosting.Tests/ResourceCommandServiceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

🧪 tests/Aspire.Hosting.Tests/ResourceNotificationTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

🧪 tests/Aspire.Hosting.Tests/Utils/ReferenceUsage.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

🧪 tests/Aspire.Hosting.Tests/WithEnvironmentTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

🧪 tests/Aspire.Hosting.Tests/WithReferenceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests

Job reasons

Job Triggered by
cli-starter-validation • src/Aspire.Hosting.Dotnet/DotnetProjectBuildCoordinator.cs
• affected project Aspire.Cli
extension-e2e • src/Aspire.Cli/Mcp/Tools/McpToolHelpers.cs, src/Aspire.Dashboard/Extensions/ResourceViewModelExtensions.cs, src/Aspire.Dashboard/Model/KnownResourceState.cs, src/Aspire.Dashboard/Model/ResourceStateViewModel.cs, src/Aspire.Dashboard/Model/ResourceViewModelExtensions.cs, src/Aspire.Dashboard/Resources/Columns.Designer.cs, src/Aspire.Dashboard/Resources/Columns.resx, src/Aspire.Dashboard/Resources/xlf/Columns.cs.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.de.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.es.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.fr.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.it.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.ja.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.ko.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.pl.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.pt-BR.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.ru.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.tr.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.zh-Hans.xlf, src/Aspire.Dashboard/Resources/xlf/Columns.zh-Hant.xlf, src/Aspire.Hosting.Dotnet/DotnetProjectBuildCoordinator.cs, src/Aspire.Hosting/ApplicationModel/CommandsConfigurationExtensions.cs, src/Aspire.Hosting/ApplicationModel/KnownResourceStates.cs, src/Aspire.Hosting/ApplicationModel/ParameterResource.cs, src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs, src/Aspire.Hosting/ApplicationModel/ResourceReferenceDiscoveryAnnotation.cs, src/Aspire.Hosting/Dcp/DcpExecutor.cs, src/Aspire.Hosting/Dcp/DcpExecutorEvents.cs, src/Aspire.Hosting/ExternalServiceBuilderExtensions.cs, src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs, src/Aspire.Hosting/Orchestrator/ParameterProcessor.cs, src/Aspire.Hosting/ResourceBuilderExtensions.cs
• affected project Aspire.Cli
native-dashboard-validation affected project Aspire.Dashboard
polyglot • affected project Aspire.Cli
• affected project Aspire.Hosting.Azure.Provisioning.KeyVault
typescript-api-compat affected project Aspire.Cli

Selection computed for commit 1819a39.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

An overridden parameter reference can disable dependency force-start even when launch no longer needs that parameter.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Preserve dependency force-start for overridden parameters

src/​Aspire.Hosting/​ApplicationModel/​CommandsConfigurationExtensions.cs:139

This disables dependency force-start even when the recorded parameter is no longer consumed. For example, .WithEnvironment("VALUE", parameter).WithEnvironment("VALUE", "literal").WaitFor(dependency) retains the parameter reference and reports UnresolvedParameters. If the dependency never becomes ready, Start is now disabled even though launch needs no parameter value. Preserve dependency force-start when resource.waitingFor is present, and update ApplicationOrchestrator.StartResourceAsync to release that existing wait rather than request a second DCP start. Actual parameter reads should still gate launch. Add a regression that force-starts this overridden-parameter case while its dependency remains unready.

1 resolved since last review
1 file not reviewed
  • src/Aspire.Dashboard/Resources/Columns.Designer.cs: Generated file

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants