Skip to content
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

Incorrect binding direction in generated function.json for DocumentDB input #41

Closed
garthmason opened this issue May 12, 2017 · 5 comments
Assignees
Milestone

Comments

@garthmason
Copy link

I'm migrating some functions created in portal templates (.csx) to Azure Functions projects in the tooling.
It's working well so far, only problem I'm facing is already captured in #40.

One thing I have noticed is when I declare an input binding to an Azure DocumentDB the generated function.json file isn't matching the equivalent on the portal function for the direction property.

I.e. if I have e.g. a ServiceBus triggered function, then the binding generates with direction: "in" as expected. But a DocumentDB binding is always generating as direction: "out". Whereas via the portal I get either in or out depending on what I selected.

Note - this doesn't seem to be causing me an issue so far, as I'm getting the desired input from the DocumentDB, and can also use the binding with ICollector to add new documents. Just wanted to flag it in case that wasn't expected behaviour.

@lindydonna lindydonna changed the title Generated function.json for function with DocumentDB input bindings Incorrect binding direction in generated function.json for DocumentDB input May 15, 2017
@lindydonna lindydonna added the bug label May 15, 2017
@MarekLani
Copy link

I noticed this also when trying to define blob input. In function.json there is direction set to out.

@lindydonna
Copy link

@MarekLani You should use AccessMode.Read for blob input.

@juzkuz-zz
Copy link

I have also noticed this issue. I tried everything available but can't get the compiled function.json to have a direction of 'in' as intended.

@lindydonna
Copy link

@juzkuz Yes, we have some bugs around binding direction. The root cause is this issue: Azure/azure-functions-host#1507. We will fix this issue before RTM for sure, and hopefully sooner than that.

@ahmelsayed
Copy link
Contributor

obsolete with Mike's work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants