-
Notifications
You must be signed in to change notification settings - Fork 703
Make parameters and connection strings visible in dashboard #10336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ng IsHidden=true Co-authored-by: davidfowl <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes default hiding of parameters and connection strings so they appear in the Aspire dashboard by default.
- Removed
IsHidden = true
from parameter and connection string builders - Removed explicit
IsHidden = false
in error handling for parameters - Updated/add tests to assert that parameters and connection strings are visible by default
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/Aspire.Hosting/ParameterResourceBuilderExtensions.cs | Removed default hiding of parameter resources |
src/Aspire.Hosting/ConnectionStringBuilderExtensions.cs | Removed default hiding of connection string resources |
src/Aspire.Hosting/Orchestrator/ParameterProcessor.cs | No longer forces parameters visible only on error |
tests/Aspire.Hosting.Tests/AddParameterTests.cs | Renamed parameter test, added connection-string visibility test |
Comments suppressed due to low confidence (2)
tests/Aspire.Hosting.Tests/AddParameterTests.cs:14
- [nitpick] The class now contains tests for both parameters and connection strings; consider renaming it to something like
ResourceVisibilityTests
for clarity and separation of concerns.
public class AddParameterTests
src/Aspire.Hosting/ParameterResourceBuilderExtensions.cs:164
- Consider setting an explicit initial state (e.g. State = KnownResourceStates.Waiting) for parameter snapshots to match the pattern used in ConnectionStringResource builders.
ResourceType = KnownResourceTypes.Parameter,
await _notificationService.PublishUpdateAsync(connectionStringResource, s => s with | ||
{ | ||
State = new(KnownResourceStates.Active, KnownResourceStateStyles.Info), | ||
State = new(KnownResourceStates.Active, KnownResourceStateStyles.Success), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this just a mistake previously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I changed the previous ones to Success in this PR #10235 for parameters.
/backport to release/9.4 |
Started backporting to release/9.4: https://github.com/dotnet/aspire/actions/runs/16228237194 |
Interesting side effect of this change. Parameters are not "related resources" anywhere it seems. The graph view shows them as islands 😄 |
This PR makes parameters and connection strings visible in the Aspire dashboard by removing the
IsHidden = true
settings that were previously hiding them by default.Background
Previously, parameters and connection strings were hidden from the dashboard because:
Now that the dashboard supports hierarchy display, these resources should be visible as they contain valuable configuration properties that are useful to developers.
Changes Made
IsHidden = true
from parameter resources - they are now visible by defaultIsHidden = true
from connection string resources - they are now visible by defaultIsHidden = false
from error handling since resources are visible by defaultBefore vs After
Before: Parameters and connection strings only appeared in the dashboard when there were errors or missing values, making it look odd and providing limited visibility into configuration.
After: Parameters and connection strings are always visible in the dashboard, showing their valuable properties and providing better insight into the application's configuration.
All existing tests pass, confirming the changes don't break existing functionality while providing the intended improved visibility.
Fixes #10335.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.