Skip to content

Conversation

liliankasem
Copy link
Member

@liliankasem liliankasem commented Aug 8, 2025

Issue describing the changes in this PR

resolves #issue_for_this_pr

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Rough draft of feature to allow augmentation of the FunctionMetadata.

Works E2E with: Azure/azure-functions-mcp-extension#88

@@ -48,7 +48,11 @@ public static IServiceCollection AddGrpc(this IServiceCollection services)
services.TryAddSingleton<IWorkerDiagnostics, GrpcWorkerDiagnostics>();

// FunctionMetadataProvider for worker driven function-indexing
services.TryAddSingleton<IFunctionMetadataProvider, DefaultFunctionMetadataProvider>();
// services.TryAddSingleton<IFunctionMetadataProvider, DefaultFunctionMetadataProvider>();
services.TryAddKeyedSingleton<IFunctionMetadataProvider>("core", new DefaultFunctionMetadataProvider());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also implement a new interface here instead of using Keyed services

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing the goal of this is to negotiate a conflict with the source generated IFunctionMetadataProvider. An option would be to change it to generate your new IFunctionMetadataTransformer contract instead. That is the approach I took in my draft PR (I think)

@jviau
Copy link
Contributor

jviau commented Aug 25, 2025

Interesting approach. We should discuss this a bit more. I have an existing draft PR (#2834) and issue (#1159) that this approach would also address.

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.

2 participants