Skip to content

Comments

Implementing function metadata transform support#3145

Merged
fabiocav merged 2 commits intomainfrom
liliankasem/metadata-transform
Sep 17, 2025
Merged

Implementing function metadata transform support#3145
fabiocav merged 2 commits intomainfrom
liliankasem/metadata-transform

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

@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.

@fabiocav fabiocav force-pushed the liliankasem/metadata-transform branch from 4878b2e to ea11f59 Compare September 17, 2025 18:38
@fabiocav fabiocav force-pushed the liliankasem/metadata-transform branch from ea11f59 to d2cc574 Compare September 17, 2025 18:42
@fabiocav fabiocav marked this pull request as ready for review September 17, 2025 18:42
@fabiocav fabiocav force-pushed the liliankasem/metadata-transform branch from d2cc574 to c71a5a9 Compare September 17, 2025 21:23
Copy link
Contributor

@mattchenderson mattchenderson left a comment

Choose a reason for hiding this comment

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

PR should be retitled / commit message for squash-and-merge should be adjusted so that history does not include a reference to a type not being included.

@fabiocav fabiocav changed the title Implement CompositeFunctionMetadataProvider to allow metadata transformation Implementing function metadata transform support Sep 17, 2025
@fabiocav fabiocav force-pushed the liliankasem/metadata-transform branch from c71a5a9 to 6fc8787 Compare September 17, 2025 21:30
@jviau
Copy link
Contributor

jviau commented Sep 17, 2025

Need to make sure to update AspNetCore extension to consume IFunctionMetadataManager and not the provider.

@fabiocav fabiocav merged commit 06e6302 into main Sep 17, 2025
28 checks passed
@fabiocav fabiocav deleted the liliankasem/metadata-transform branch September 17, 2025 22:26
@alanlima
Copy link

alanlima commented Nov 7, 2025

Hi @liliankasem

That’s a really interesting approach and implementation.

I’m currently working on a similar requirement where I need to implement a custom metadata provider to support disabling functions in the staging slot. I’ve successfully migrated to the new Metadata Transformer, which has been great.

However, I’m curious about one aspect: why is the Transform method synchronous (sync) when the GetFunctionMetadataAsync method in the metadata provider is asynchronous (async)?

In our use case, we disable functions using feature flags via IFeatureManager, aiming to replicate the behaviour of the FeatureGateAttribute used in ASP.NET applications. Since IFeatureManager relies on async methods, applying this requirement forces us into a sync over async scenario — which is less than ideal.

Would love to hear your thoughts on this design decision and whether there’s any guidance or workaround you’d recommend.

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.

6 participants