Skip to content
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

Only add dashboard services if the dashboard is enabled #3489

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

ReubenBond
Copy link
Member

@ReubenBond ReubenBond commented Apr 8, 2024

If the dashboard is disabled, we should not add dashboard services to the container.

If the application is run in the Development environment with the dashboard disabled, this will cause a startup crash as dependency container validation will be unable to construct HostDashboardEndpointProvider.

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Apr 8, 2024
@ReubenBond ReubenBond enabled auto-merge (squash) April 8, 2024 19:26
@ReubenBond ReubenBond merged commit a6f7540 into main Apr 8, 2024
8 checks passed
@ReubenBond ReubenBond deleted the rebond/fix-disabled-dash-servicecollection branch April 8, 2024 19:58
davidfowl pushed a commit that referenced this pull request Apr 10, 2024
* Only add dashboard services if the dashboard is enabled
joperezr pushed a commit that referenced this pull request Apr 10, 2024
* Improve service address allocation (#3294)

* Improve service address allocation
Should fix #3265

* Make the dashboard an appmodel resource (#3453)

* Make the dashboard an appmodel resource

- Moved dashboard resource into a lifecycle hook instead of making it a dcp resource.
This removes the specialized code from ApplicationExecutor from knowing about the dashboard.
As a result of this change I also cleaned up how we configure and validate dcp options to use IConfigureOptions and IValidateOptions.
- Added tests for the dashboard resource
- Made a change to ApplicationExecutor to allow resources that start as
hidden to remain hidden.
- Added hidden to a new known resource states class
- Added more test cases

* Only add dashboard services if the dashboard is enabled (#3489)

* Only add dashboard services if the dashboard is enabled

* Don't wait until after we've started the entire app to print the token (#3472)

- Print it right after we print the dashboard url
- Refactored the dashboard resource to use DashboardOptions instead of DcpOptions

---------

Co-authored-by: Karol Zadora-Przylecki <[email protected]>
Co-authored-by: Reuben Bond <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants