-
Notifications
You must be signed in to change notification settings - Fork 140
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
[Functions]Generate function.json with only properties mentioned in annotations #466
Comments
Maven plugin will put all attributes of CosmosDBTrigger annotations to function.json, the default value of leaseDatabaseName and leaseConnectionStringSetting are both empty and function will not work when deployed function.json contains the two empty attribtues above. @pragnagopa Please have a view. |
@brettsam - should we specify defaults for leaseDataBase and leaseConnection? |
When Here is the function.json {
"scriptFile" : "..\\cosmostriggertest-1.0-SNAPSHOT.jar",
"entryPoint" : "com.ms.CosmosDBTest.run",
"bindings" : [ {
"type" : "cosmosDBTrigger",
"name" : "items",
"direction" : "in",
"databaseName" : "ToDoList",
"collectionName" : "Items",
"dataType": "stream",
"leaseCollectionName" : "FamilyCollection",
"connectionStringSetting" : "CONNECTION_STRING",
"createLeaseCollectionIfNotExists" : true,
"leasesCollectionThroughput" : -1,
"checkpointInterval" : -1,
"checkpointDocumentCount" : -1,
"feedPollDelay" : 5000,
"leaseRenewInterval" : 17000,
"leaseAcquireInterval" : 13000,
"leaseExpirationInterval" : 60000,
"maxItemsPerInvocation" : -1,
"startFromBeginning" : false,
"preferredLocations" : "",
"leaseCollectionPrefix" : ""
} ]
} |
@ZhengJun003 - I cannot repro this issue.
|
Java function signature
should generate following bindings in function.json
but following is generated with all the properties on the trigger
Most of the properties are optional properties and should not be included unless explicitly provided by in the annotation |
@jdneo / @Flanker32 - Updated the title to reflect the issue. |
@asavaritayal FYI as this is a blocking issue. |
@Flanker32 - I just tried the snapshot version, function.json now has
even though it is not specified in the annotation. Can you take a look? |
@pragnagopa Fix in the latest snapshot |
Plugin name and version
Plugin configuration in your
pom.xml
Actual behavior
Run Cosmos DB Trigger function, report an error.
Can't trigger CosmosDB function in cloud after deployment.
Steps to reproduce the problem
<azure.functions.maven.plugin.version>1.0.0-beta-8-SNAPSHOT</azure.functions.maven.plugin.version>
in pom.The text was updated successfully, but these errors were encountered: