Support matching reflected binding names #603
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
I ran into an issue when trying to get Durable Functions triggers to work with the isolated worker.
The current rule for extensions is that the attribute name in Worker.Extensions.* must match the attribute name in the corresponding WebJobs.Extensions.*. However, this doesn't work when the WebJobs attribute doesn't end with "InputAttribute" or "OutputAttribute". For example, when I created an attribute named
DurableClientAttribute
in the worker repo, the function.json that got generated looked like the following:The
type
property value is obviously wrong and resulted in the function app not being able to start.Fix
I've updated the SDK build task to make my scenario work according to the naming guidelines in WebJobs. I've also lowercased the first latter of the
type
value so that it matches the documentation (this is slightly vain since types appear to be case-insensitive, but I think it's going to be safer this way in case other tools/systems aren't case-insensitive).The result was the following:
With this change, the function app was able to start and invoke the binding correctly.