Azure/azure-functions-java-library

Missing output trigger for cosmo db with 4.x extension

pankajagrawal16 opened this issue · 10 comments

Unable to find any version which is compatible with extension 4.x to use cosmodb with indentity.

Documentation here says https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-output?tabs=in-process%2Cfunctionsv2&pivots=programming-language-java

For use with extension version 4.x, you need to replace the string collection in property and attribute names with container.`

Last merge seems to have those changes but nothing available on maven yet ? Latest release is 2.2.0

Hi @pankajagrawal16 Thanks for reaching out.
The 3.0.0-SNAPSHOT is a pre-release for testing purposes only to sonatype. Once ready, we will release the production version to maven.

To overcome your error, could you try setting this environment variable to check if this helps to get your code running.
FUNCTIONS_EXTENSIONBUNDLE_SOURCE_URI= https://functionscdnstaging.azureedge.net/public

Hi @shreyas-gopalakrishna Thanks for quick response. I understand. Where should this environment variable be set ?

Can you try setting it in the local.settings.json if you are running locally. App settings if you are running in the portal.

@shreyas-gopalakrishna Donot seem to work just by using this environment var in local json.

I updated host.json to use use 4.x extension bundle like this:

{
  "version": "2.0",
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
    "version": "[4.0.0, 5.0.0)"
  }
}

and added suggested env var in local json file. And it still fails. Anything else that i should have done ?

Could you try removing the preview in host.json
This PR can be an example

Hey @shreyas-gopalakrishna , I can confirm that it works with above config in the PR. Do we know of any ETA about when this will be release to maven central as well ?

We are planning to release it soon. No ETA yet. Optimistically if all tests go okay, it can be by end of this year

ok, good to know. For some reason, things worked fine locally but when I tried deploying my function to cloud, it fails with error. Yet to figure out why. Anything you can think of already?

@pankajagrawal16 you should be able to run it on the cloud. The v4 bundle has been fully released.
The azure-functions-java-library 3.0.0 has been released to maven central as well, it can be found at https://repo.maven.apache.org/maven2/com/microsoft/azure/functions/azure-functions-java-library/3.0.0/

Let me know if you have more questions. Thanks.

Sounds great. I can try it out sometime this week.