DaprMetadataResourceBuilderExtensions IValueProvider overload doesn't add DaprComponentSecretAnnotation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
Research direction
Start with the DaprMetadataResourceBuilderExtensions overload WithMetadata(this IResourceBuilder<IDaprComponentResource> builder, string name, IValueProvider valueProvider) named in the issue, and compare how it handles the secret reference with the lifecycle hook that adds the component’s secret-store reference. No test file or other entry point is mentioned; look for coverage of this overload and the lifecycle behavior. Done when the generated component can read the secret without manually adding auth.secretStore.
Written by the indexing model from the issue text.
Description
The DaprMetadataResourceBuilderExtensions overload WithMetadata(this IResourceBuilder<IDaprComponentResource> builder, string name, IValueProvider valueProvider) adds the value as a DaprSecretKeyRef and thus later in the lifecycle creates a secret store. However, it does not add a DaprComponentSecretAnnotation annotation, which allows the lifecycle hook to add an auth.secretstore reference to the component yaml later in the process.
This means the component cannot read the secret and thus the reference doesn't load.
My specific use case is:
var serviceBusResource = builder.AddAzureServiceBus("ServiceBus").RunAsEmulator();
builder.AddDaprComponent("servicebus-pubsub-queue", "pubsub.azure.servicebus.queues")
.WithMetadata("connectionString", serviceBusResource );
This does sucessfully create the component and YAML, however during startup the following error occurs:
initialization error occurred for servicebus-pubsub-queue (pubsub.azure.servicebus.queues/v1): either one of connection string or namespace name are required
Indicating the connection string reference cannot be read. Manually adding
auth:
secretStore: secretstore
and restarting does allow the reference to be read.
There does not seem to be a good way to work around this, as all of the annotations and schema references are internal so I am unable to manually add them.
- Dominant language
- C#
- Stars
- 628
- Forks
- 199
- Avg merge
- 17h 22m
- Merged PRs (30d)
- 175
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CommunityToolkit/Aspire
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CommunityToolkit/Aspire#1622 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
CommunityToolkit/Aspire#1620 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
CommunityToolkit/Aspire#2250 · 1 comment ·
Maintainers usually reply within 1 day
-
Aspire agent awarenessPossibly taken @tommasodotNET claimed this 3 days ago. Openintegration request :mailbox_with_mail:
CommunityToolkit/Aspire#2248 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 8/100
CommunityToolkit/Aspire#2242 ·
Maintainers usually reply within 1 day
All issues in CommunityToolkit/Aspire
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
nightscout/nocturne#2135 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Devolutions/UniGetUI#5541 ·
Maintainers usually reply within 1 day
-
agentic-workflows Needs: Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
[誤判定]Openlinux アプリ: ブラウザー 再現済み 要トリアージ 誤判定
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
yksr-melt/Meltype#853 · 2 comments ·
Maintainers usually reply within 1 day