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
Implement SupportsDeferredBindingAttribute #1275
Implement SupportsDeferredBindingAttribute #1275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liliankasem I am concerned this is both a public API breaking change as well as behavior breaking change. Do you have more context on if this is okay to perform now or will it need to wait until next version?
Or can we support both ways for now, and remove the legacy way later?
extensions/Worker.Extensions.Abstractions/src/ExtensionInformationAttribute.cs
Show resolved
Hide resolved
0221a20
to
21954b7
Compare
Can we add some tests for these changes? One place could be - FunctionMetadataGeneratorTests and a sample app/function with the attribute |
I don't believe we need a sample app for it, this attribute goes onto the worker extension input/output/trigger attribute classes not on customer function classes e.g.: [SupportsDeferredBinding]
public sealed class CosmosDBInputAttribute : InputBindingAttribute
{ For testing, this functionality is already covered with the |
/check-enforcer evaluate |
extensions/Worker.Extensions.Abstractions/src/SupportsDeferredBindingAttribute.cs
Show resolved
Hide resolved
/check-enforcer evaluate |
/check-enforcer reset |
/check-enforcer override |
Issue describing the changes in this PR
resolves #1266
Today we have have a single SupportsDeferredBinding attribute that extensions can set to indicate that ParameterBindingData can be used (i.e. the extension supports sdk-type bindings). This is used by the FunctionMetadataGenerator to set the "supportsDeferringBinding" property for every function.
The goal for this issue is to refactor the SupportsDeferredBinding attribute so that instead of being a blanket "all or nothing" approach for extensions, we can set the supportsDeferredBinding flag per binding instead. For example, the CosmosDBTrigger does not support deferred binding but we can use deferred binding for the input binding.
Pull request checklist
release_notes.md
Additional information
Additional PR information