Skip to content

Conversation

@Sjark
Copy link
Contributor

@Sjark Sjark commented Sep 29, 2025

Closes #878

This fixes the issue described in #878 by referencing the correct daprSidecar annotations instead of using the main components annotations when looking for DaprComponentReferenceAnnotation in DaprDistributedApplicationLifecycleHook

It also updates the Dapr example to use the correct redis port and redis password.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Copilot AI review requested due to automatic review settings September 29, 2025 07:41
Copy link
Contributor

Copilot AI left a 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 fixes a bug in the Dapr integration where component annotations were being read from the wrong resource, and updates the Dapr example to use correct Redis configuration.

  • Fixes DaprDistributedApplicationLifecycleHook to read DaprComponentReferenceAnnotation from the Dapr sidecar instead of the main resource
  • Updates the Dapr example to use the correct Redis port property and conditionally add Redis password metadata

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/CommunityToolkit.Aspire.Hosting.Dapr/DaprDistributedApplicationLifecycleHook.cs Fixes annotation lookup to use daprSidecar.Annotations instead of resource.Annotations
examples/dapr/CommunityToolkit.Aspire.Hosting.Dapr.AppHost/Program.cs Updates Redis configuration to use correct port property and conditionally adds password metadata

@Sjark
Copy link
Contributor Author

Sjark commented Sep 29, 2025

@dotnet-policy-service agree

@FullStackChef FullStackChef enabled auto-merge (rebase) September 29, 2025 10:12
@FullStackChef FullStackChef merged commit 5280275 into CommunityToolkit:main Sep 29, 2025
103 checks passed
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.

Dapr components references are not working correctly in dapr sidecars

2 participants