Skip to content

Fix empty required parameter startup recovery and diagnostics - #22124

Closed
Adam Ratzman (adamint) wants to merge 6 commits into
mainfrom
adamint-empty-parameter-handling
Closed

Adam Ratzman (adamint) wants to merge 6 commits into
mainfrom
adamint-empty-parameter-handling

Conversation

@adamint

@adamint Adam Ratzman (adamint) commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #21795.

An empty required startup parameter now stays pending for Dashboard input instead of faulting consumers before they can recover. State tooltips and Details name missing referenced parameters, including those behind waiting dependencies. The diagnostic follows Reference/WaitFor relationships and active waits, handles replicas and cycles, and only reads parameter names and state.

The required-value contract from #18108 is unchanged: required null/empty values are invalid, including runtime updates. Startup now checks the existing validator before committing the initial value task, so interactive input can complete the original consumer task.

User-facing usage

For an intentionally empty selector:

const selector = await builder.addParameter('optional-selector', { value: '' });
await selector.withOptional();
await api.withEnvironment('OPTIONAL_SELECTOR', selector);

C#: builder.AddParameter("optional-selector", "").WithOptional().

An explicit empty optional value remains ""; an optional parameter without a configured value resolves to null and omits the environment variable. Missing required startup values can be supplied in Dashboard Parameters without restarting the app. Existing troubleshooting guidance covers this migration. Website publication is a separate, nonblocking follow-up in microsoft/aspire.dev#2114; it has not been published by this PR.

Screenshots

Captured from the rebuilt source Dashboard at 44a7f9889a. State remains separate from the explanation: Missing parameter values: optional-selector. Set values in Parameters.

Missing required value: API is Starting and its consumer is Waiting.

Missing parameter with concise State details

After entering selected through Dashboard Parameters, both resources recover without restarting and the diagnostic clears.

API and waiting consumer recovered without restarting

Validation

Before the fix, the initialization regression failed for all three explicit-empty cases (ordinary, secret, connection string); all three absent-value cases passed. The Hosting build and focused suite passed with zero warnings/errors and 203 tests passed:

dotnet build tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-restore -m:1 /p:BuildInParallel=false /p:SkipNativeBuild=true /nr:false -v:q
dotnet artifacts/bin/Aspire.Hosting.Tests/Debug/net10.0/Aspire.Hosting.Tests.dll --filter-class '*.AddParameterTests' --filter-class '*.ParameterProcessorTests' --filter-class '*.ExecutionConfigurationGathererTests' --filter-not-trait quarantined=true --filter-not-trait outerloop=true

Both current-source Dashboard builds below passed, including after the concise State details correction. The local workaround uses existing generated C# from unchanged protobuf inputs, disables native generation, and sets a fail-fast compiler path. It does not validate native regeneration. The earlier unbounded build was interrupted after macOS x86_64 protoc stalled; that attempt did not pass. These managed builds report the existing ILCompiler NU1903 advisory.

dotnet build tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj --no-restore -m:1 /p:BuildInParallel=false /p:SkipNativeBuild=true /p:DisableProtobufDesignTimeBuild=true /p:Protobuf_ProtocFullPath=/usr/bin/false /nr:false -v:q
dotnet build tests/Aspire.Dashboard.Components.Tests/Aspire.Dashboard.Components.Tests.csproj --no-restore -m:1 /p:BuildInParallel=false /p:SkipNativeBuild=true /p:DisableProtobufDesignTimeBuild=true /p:Protobuf_ProtocFullPath=/usr/bin/false /nr:false -v:q

Passed on 44a7f9889a: 28 model tests and 74 related component tests, including both legacy regression cases:

dotnet artifacts/bin/Aspire.Dashboard.Tests/Debug/net11.0/Aspire.Dashboard.Tests.dll --filter-class '*.ResourceStateViewModelTests' --filter-not-trait quarantined=true --filter-not-trait outerloop=true
dotnet artifacts/bin/Aspire.Dashboard.Components.Tests/Debug/net11.0/Aspire.Dashboard.Components.Tests.dll --filter-class '*.ResourceDetailsTests' --filter-class '*.ResourcesTests' --filter-not-trait quarantined=true --filter-not-trait outerloop=true --hangdump --hangdump-timeout 2m --hangdump-type none

Localization regeneration also passed:

dotnet build src/Aspire.Dashboard/Aspire.Dashboard.csproj /t:UpdateXlf --no-restore -m:1 /p:BuildInParallel=false /p:SkipNativeBuild=true /p:DisableProtobufDesignTimeBuild=true /p:Protobuf_ProtocFullPath=/usr/bin/false /nr:false -v:q

The legacy regression first reached its stale-description assertion against the old Dashboard binary, then passed against rebuilt current source. Its initial CI hang was missing viewport-size setup in the new test; managed stacks identified the splitter callback, and the correction initializes the dimensions without weakening the assertions or increasing the timeout.

Live, container-free TypeScript checks also passed:

  • Required empty: parameter ValueMissing, API Starting, frontend Waiting. The rebuilt source Dashboard showed optional-selector in Details. Supplying selected through the real Dashboard input form recovered both resources to Running without restarting and cleared the diagnostic. This was repeated for the concise State details correction shown above. The actual Dashboard process command pointed to this worktree's rebuilt DLL. The child emitted {"selector":"selected","selectorPresent":true,"absentPresent":false}.
  • Optional empty: API/frontend Running; the child emitted {"selector":"","selectorPresent":true,"absentPresent":false}. This earlier Hosting check used the installed Dashboard, not the modified UI.

The samples used scoped aspire start --no-build --isolated --format Json, aspire wait, aspire describe --format Json, aspire logs api --format Json, and aspire stop with --apphost and --non-interactive. Browser automation exercised the actual source Dashboard. All samples stopped cleanly, and all heavy local work held the shared exclusive validation lock.

Review and CI

Current head: 44a7f9889a20c45fc5e13d4d610ed685e7d91278. Copilot re-review and CI for this State details presentation correction are in progress.

Actual GitHub Copilot reviews identified stale legacy Details after parameter-only updates, repeated resource scans, and implicit parent waits missing from static relationships. All three corrections have executed regressions, verified replies, and resolved inline threads. The previous-head Copilot re-review (5854466981, head 64d6cd49) reported No open issues in a COMMENTED review, not an approval.

The previous head's complete check set finished: 356 successful, 7 skipped, no failing or pending checks. CI run 42968191452, attempt 2 succeeded, including Hosting and Dashboard model/component tests on Windows and Ubuntu, all six native Dashboard platform validations, and all six starter platform validations. Native Dashboard coverage in CI includes normal generation/build paths, unlike the guarded local workaround above. These results do not stand in for the current head's pending checks.

That run's first attempt had an unrelated Windows extension taskkill deadline assertion and a Windows ARM64 starter diagnostics-upload ENOENT after starter validation itself passed. Both cleared on the automatic rerun. The earlier head's component hang was an introduced test-harness issue, fixed and verified here, not an external CI failure. No approval or merge was performed by this agent.

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@adamint
Adam Ratzman (adamint) requested a balanced review from Copilot November 11, 2026 03:47
@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 -- 22124

Or

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

@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

Dependency descriptions can omit blocking parameters or retain resolved ones, while repeated resource scans introduce quadratic rendering overhead.

3 open issues
1 file not reviewed
  • src/Aspire.Dashboard/Resources/Columns.Designer.cs: Generated file
What changed in this PR

Fixes startup recovery for empty required parameters while preserving required-value validation. Extends Dashboard diagnostics to name missing referenced parameters and documents the Aspire 17 migration.

Changes:

  • Keeps missing required startup values pending so consumers can resume after Dashboard input.
  • Adds dependency traversal for missing-parameter diagnostics, with replica and cycle handling.
  • Adds regression tests and guidance distinguishing optional empty values from omitted values.
File Description
tests/​Aspire.Hosting.Tests/​Orchestrator/​ParameterProcessorTests.cs Tests recovery, optional values, and unavailable interaction.
tests/​Aspire.Hosting.Tests/​ExecutionConfigurationGathererTests.cs Tests preservation of empty optional environment values.
tests/​Aspire.Dashboard.Tests/​Model/​ResourceStateViewModelTests.cs Tests missing-parameter diagnostics and dependency traversal.
src/​Aspire.Hosting/​Orchestrator/​ParameterProcessor.cs Validates initial values before completing consumer tasks.
src/​Aspire.Hosting/​ApplicationModel/​ParameterResource.cs Makes the existing validator available internally.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.zh-Hant.xlf Adds diagnostic text awaiting Traditional Chinese translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.zh-Hans.xlf Adds diagnostic text awaiting Simplified Chinese translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.tr.xlf Adds diagnostic text awaiting Turkish translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.ru.xlf Adds diagnostic text awaiting Russian translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.pt-BR.xlf Adds diagnostic text awaiting Brazilian Portuguese translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.pl.xlf Adds diagnostic text awaiting Polish translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.ko.xlf Adds diagnostic text awaiting Korean translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.ja.xlf Adds diagnostic text awaiting Japanese translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.it.xlf Adds diagnostic text awaiting Italian translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.fr.xlf Adds diagnostic text awaiting French translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.es.xlf Adds diagnostic text awaiting Spanish translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.de.xlf Adds diagnostic text awaiting German translation.
src/​Aspire.Dashboard/​Resources/​xlf/​Columns.cs.xlf Adds diagnostic text awaiting Czech translation.
src/​Aspire.Dashboard/​Resources/​Columns.resx Defines missing-parameter diagnostic wording.
src/​Aspire.Dashboard/​Resources/​Columns.Designer.cs Exposes the diagnostic resource string.
src/​Aspire.Dashboard/​Model/​ResourceViewModelExtensions.cs Traverses dependencies to collect missing parameter names.
src/​Aspire.Dashboard/​Model/​ResourceStateViewModel.cs Appends missing-parameter guidance to blocked resource descriptions.
docs/​tips-and-known-issues.md Documents optional-value migration and startup recovery.

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@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.

🔵 Needs a closer look

Final-head Dashboard/Components validation remains pending after the correction batch, including the new legacy Details refresh regression, so CI results must be confirmed before approval.

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

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@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.

🔵 Needs a closer look

Final-head CI and Dashboard model/component validation remain pending, leaving dependency-only Details refresh, replica/active-wait traversal, and live parameter recovery unverified.

1 open issue
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.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@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.

🔵 Needs a closer look

Final-head Dashboard validation remains unverified: the new legacy Details regression has not run, and the reported live scenarios exercised the installed Dashboard rather than the modified UI.

1 open issue
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.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@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.

🟢 Approval recommended

No active review issues block the change allowing missing required startup parameters to be supplied through the Dashboard without restarting.

No open issues 🎉

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

Review effort: Balanced

@adamint

Copy link
Copy Markdown
Member Author

All three findings are addressed and verified, and the inline threads are resolved. Keeping this draft, unapproved and unmerged while final-head CI runs.

🤖 AI-authored reply via Agency Finish PR.

@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.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@adamint
Adam Ratzman (adamint) requested a balanced review from Copilot November 16, 2026 07:57
@adamint

Copy link
Copy Markdown
Member Author

Updated State details in 44a7f98: the state stays separate, and the explanation is now “Missing parameter values: optional-selector. Set values in Parameters.”

First screenshot: the required parameter is missing, API is Starting, and its consumer is Waiting. Second: entering selected through Dashboard recovers both without restarting and clears the diagnostic. Captured from the rebuilt source Dashboard.

🤖 AI-authored reply via Agency Finish PR.

Missing parameter with concise State details

API and waiting consumer recovered without restarting

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

55 / 101 PR test projects · 5 PR jobs, from 26 changed files.

Selected PR test projects (55 / 101)

Aspire.Cli.EndToEnd.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

⚠️ 43 of the 55 selected test projects come from a single change — src/Aspire.Hosting/ApplicationModel/ParameterResource.cs.

🔧 src/Aspire.Hosting/ApplicationModel/ParameterResource.cs (changed source)
→ 43 via the project graph

show 43

Aspire.Hosting.Analyzers.Tests (2 hops), Aspire.Hosting.Azure.EntraId.Tests (2 hops), Aspire.Hosting.Azure.Kubernetes.Tests (2 hops), Aspire.Hosting.Azure.Kusto.Tests (2 hops), Aspire.Hosting.Azure.Provisioning.Tests (3 hops), Aspire.Hosting.Azure.Tests, Aspire.Hosting.Browsers.Tests (2 hops), 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 (2 hops), Aspire.Hosting.DevTunnels.Tests (2 hops), Aspire.Hosting.Docker.Tests (2 hops), Aspire.Hosting.EntityFrameworkCore.Tests (2 hops), Aspire.Hosting.Foundry.Tests (2 hops), Aspire.Hosting.Garnet.Tests (2 hops), Aspire.Hosting.Go.Tests (2 hops), Aspire.Hosting.Java.Tests (2 hops), Aspire.Hosting.Kafka.Tests (2 hops), Aspire.Hosting.Keycloak.Tests (2 hops), Aspire.Hosting.Kubernetes.Tests (2 hops), Aspire.Hosting.Maui.Tests, Aspire.Hosting.Milvus.Tests (2 hops), Aspire.Hosting.MongoDB.Tests (2 hops), Aspire.Hosting.MySql.Tests (2 hops), Aspire.Hosting.Nats.Tests (2 hops), Aspire.Hosting.OpenAI.Tests (2 hops), Aspire.Hosting.Oracle.Tests (2 hops), Aspire.Hosting.Orleans.Tests (2 hops), Aspire.Hosting.PostgreSQL.Tests (2 hops), Aspire.Hosting.Python.Tests (2 hops), Aspire.Hosting.Qdrant.Tests (2 hops), Aspire.Hosting.RabbitMQ.Tests (2 hops), Aspire.Hosting.Redis.Tests (2 hops), Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Rust.Tests (2 hops), Aspire.Hosting.Seq.Tests (2 hops), Aspire.Hosting.SqlServer.Tests (2 hops), Aspire.Hosting.Valkey.Tests (2 hops), Aspire.Hosting.Yarp.Tests (2 hops), Aspire.Playground.Tests

🧪 tests/Aspire.Hosting.Tests/ExecutionConfigurationGathererTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Tests
→ 3 via the project graph: Aspire.Hosting.Blazor.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.Radius.Tests

🔧 src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.cs (changed source)
→ 3 via the project graph: Aspire.Hosting.DotnetTool.Tests (2 hops), Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.Testing.Tests

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

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

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

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

🧪 tests/Aspire.Dashboard.Components.Tests/Aspire.Dashboard.Components.Tests.csproj (changed test)
→ 1 directly: Aspire.Dashboard.Components.Tests

🧪 tests/Aspire.Dashboard.Components.Tests/Pages/ResourcesTests.Legacy.cs (changed test)
→ 1 directly: Aspire.Dashboard.Components.Tests

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

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

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Hosting.Go
extension-e2e • src/Aspire.Dashboard/Components/Controls/ResourceDetails.razor.cs, src/Aspire.Dashboard/Components/Legacy/Pages/Resources.razor.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/ApplicationModel/ParameterResource.cs, src/Aspire.Hosting/Orchestrator/ParameterProcessor.cs
• affected project Aspire.Dashboard
native-dashboard-validation affected project Aspire.Dashboard
polyglot • affected project Aspire.Hosting
• affected project Aspire.Hosting.Azure.Provisioning.KeyVault
typescript-api-compat affected project Aspire.Hosting

Selection computed for commit 44a7f98.

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

Human assessment is needed because the resource pane still shows generic state tooltips instead of missing-parameter diagnostics, leaving the intended user-facing behavior incomplete.

No open issues 🎉

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

Review effort: Balanced

@adamint

Copy link
Copy Markdown
Member Author

I checked the resource-pane concern in Copilot review PRR_kwDOKYQzfc8AAAABYKoflA. The navigation pane still uses its existing short state label; this correction does not change it. The resource grid and modern overview pass all resources to the missing-parameter diagnostic, and legacy Details uses the separate concise description. Richer navigation-pane tooltips would be a separate UI enhancement, not a regression in this correction. The live Details screenshots above show the requested behavior and recovery.

🤖 AI-authored reply via Agency Finish PR.

@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.

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.

The required-empty-value recovery fix can stand on its own. Please remove or defer the relationship-based dashboard diagnostic from this PR: it can miss real parameter waits, report inactive parameters as blockers, and miss reads before a resource reaches Starting. The inline comments describe the cases.

#22291 explores tracking actual pending parameter reads on the requesting resource, including early reads, as a more accurate way to address unresolved parameters in a future change. It does not replace the empty-value recovery fix here.


foreach (var relationship in current.Relationships)
{
if (relationship.Type is not (KnownRelationshipTypes.Reference or KnownRelationshipTypes.WaitFor))

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.

This only finds parameters reachable through dashboard relationships or active waits, but actual parameter reads do not always create those relationships. For example, AddPostgres("postgres", password: password) uses the password in its connection string and environment callback without adding a Reference relationship to the parameter. If the password is missing, neither the server nor a resource waiting on it can find the cause through this walk. Custom environment callbacks have the same limitation.

Please defer this diagnostic or derive it from actual pending reads instead. If it stays here, a regression using a missing PostgreSQL password or a callback-only parameter would exercise the gap.


if (current.IsParameter && current.KnownState is KnownResourceState.ValueMissing)
{
missingParameters.Add(current.Name);

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.

A Reference relationship does not mean the parameter is currently being read. For example, a conditional reference expression exposes providers from both branches, so WithEnvironment can add relationships to both even though only one branch is evaluated. If both parameters are missing, this adds both names to the resource's explanation even though only the selected branch is blocking it.

Please avoid presenting all missing referenced parameters as the cause of the wait. If this diagnostic remains, a conditional-expression regression would cover the misleading result.

private static string? GetMissingParameterDescription(ResourceViewModel resource, IStringLocalizer<Columns> loc, IEnumerable<ResourceViewModel>? allResources)
{
if (allResources is not null
&& resource.KnownState is KnownResourceState.Starting or KnownResourceState.FailedToStart or KnownResourceState.Waiting)

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.

A parameter read can block before the resource reaches Starting, such as while publishing a connection string during startup. When the resource's state is still unset, this condition skips the diagnostic even if a relationship to the parameter exists. The resource can therefore be stuck without an explanation until a state transition that the blocked read itself is preventing.

If the diagnostic remains in this PR, please cover a pending pre-start parameter read; #22291 explores tracking those reads directly.

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.

I reviewed the parameter initialization and recovery flow, along with the dashboard diagnostics and resource details.

I found two nonblocking issues in the dashboard diagnostic.

<comment>{0} is a comma-separated list of dependency resource names.</comment>
</data>
<data name="StateColumnResourceMissingParameters" xml:space="preserve">
<value>Missing parameter values: {0}. Set values in Parameters.</value>

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.

When interactivity is disabled, the parameter has no set command and the dependent resource can already have failed to start, so this tells users to use a control they don't have. Consider only suggesting editing when it is available and otherwise directing users to configure the value and restart, with a regression test for the noninteractive case.


internal static string GetResourceStateDescription(ResourceViewModel resource, IStringLocalizer<Columns> loc, IEnumerable<ResourceViewModel> allResources)
{
return GetMissingParameterDescription(resource, loc, allResources)

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.

This replaces the existing state description whenever a missing parameter is found. If the resource is waiting on a and b, and only a is blocked by a missing parameter, the legacy details no longer show that it is also waiting on b. Consider including both the waiting dependencies and missing parameters, with a regression test for multiple dependencies.

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.

Aspire 17 rejects previously accepted empty parameter values; clarify breaking change and dashboard failure

4 participants