From 563afbec6a01e9960f0ec4fbda54668d076bfa09 Mon Sep 17 00:00:00 2001
From: Shreyas Gopalakrishna
* The following example shows a Java function that is invoked when there are inserts or updates in - * the specified database and collection. + * the specified database and container. *
* *
@@ -33,10 +33,10 @@
* public void cosmosDbLog(
* {@literal @}CosmosDBTrigger(name = "database",
* databaseName = "ToDoList",
- * collectionName = "Items",
- * leaseCollectionName = "leases",
- * createLeaseCollectionIfNotExists = true,
- * connectionStringSetting = "AzureCosmosDBConnection")
+ * containerName = "Items",
+ * leaseContainerName = "leases",
+ * createLeaseContainerIfNotExists = true,
+ * connection = "AzureCosmosDBConnection")
* List<Map<String, String>> items,
* final ExecutionContext context
* ) {
@@ -83,54 +83,54 @@
String databaseName();
/**
- * Defines the collection name of the CosmosDB to which to bind.
+ * Defines the container name of the CosmosDB to which to bind.
*
- * @return The collection name string.
+ * @return The container name string.
*/
- String collectionName();
+ String containerName();
/**
- * Defines Connection string for the service containing the lease collection.
+ * Defines Connection string for the service containing the lease container.
*
- * @return Connection string for the lease collection.
+ * @return Connection string for the lease container.
*/
String leaseConnectionStringSetting() default "";
/**
- * Defines the lease collection name of the CosmosDB to which to bind.
+ * Defines the lease container name of the CosmosDB to which to bind.
*
- * @return The lease collection name string.
+ * @return The lease container name string.
*/
- String leaseCollectionName() default "";
+ String leaseContainerName() default "";
/**
- * Defines Name of the database containing the lease collection.
+ * Defines Name of the database containing the lease container.
*
- * @return Name of the database for lease collection.
+ * @return Name of the database for lease container.
*/
String leaseDatabaseName() default "";
/**
- * Defines whether to create a new lease collection if not exists.
+ * Defines whether to create a new lease container if not exists.
*
- * @return configuration whether to create a new lease collection if not exists.
+ * @return configuration whether to create a new lease container if not exists.
*/
- boolean createLeaseCollectionIfNotExists() default false;
+ boolean createLeaseContainerIfNotExists() default false;
/**
- * defines the throughput of the created collection..
+ * defines the throughput of the created container.
*
* @return throughput
*/
- int leasesCollectionThroughput() default -1;
+ int leasesContainerThroughput() default -1;
/**
- * Defines a prefix to be used within a Leases collection for this Trigger. Useful when sharing
- * the same Lease collection among multiple Triggers.
+ * Defines a prefix to be used within a Leases container for this Trigger. Useful when sharing
+ * the same Lease container among multiple Triggers.
*
- * @return LeaseCollectionPrefix
+ * @return LeaseContainerPrefix
*/
- String leaseCollectionPrefix() default "";
+ String leaseContainerPrefix() default "";
/**
* Customizes the amount of milliseconds between lease checkpoints. Default is always after a
@@ -161,7 +161,7 @@
*
* @return The app setting name of the connection string.
*/
- String connectionStringSetting();
+ String connection();
/**
* Customizes the renew interval in milliseconds for all leases for partitions currently held by
From 437ce401258c1d9131ebdf6e3e7eae4c9bccb5c9 Mon Sep 17 00:00:00 2001
From: Shreyas Gopalakrishna
Date: Tue, 8 Nov 2022 11:53:40 -0600
Subject: [PATCH 2/3] Updating tests
---
build.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.ps1 b/build.ps1
index 6078552..8f90953 100644
--- a/build.ps1
+++ b/build.ps1
@@ -83,7 +83,7 @@ Expand-Archive ".\Azure.Functions.Cli.zip" -DestinationPath ".\Azure.Functions.C
$Env:Path = $Env:Path+";$currDir\Azure.Functions.Cli"
# Clone and build azure-functions-java-worker
-git clone https://github.com/azure/azure-functions-java-worker -b dev
+git clone https://github.com/azure/azure-functions-java-worker -b shreyasg/v4-extension-bundle
Push-Location -Path "./azure-functions-java-worker" -StackName libraryDir
Write-Host "Updating azure-functions-java-worker to use current version of the java library"
From 9f4c71073733b3e663c59c932c005de0dbe7e192 Mon Sep 17 00:00:00 2001
From: Shreyas Gopalakrishna
Date: Tue, 8 Nov 2022 17:06:23 -0600
Subject: [PATCH 3/3] Updating pipeline
---
README.md | 11 +++++++----
azure-pipelines.yml | 3 ++-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index b49118a..8fc9bdc 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,16 @@

-|Branch|Status|
-|---|---|
-|master|[](https://ci.appveyor.com/project/appsvc/azure-functions-java-library?branch=master)|
-|dev|[](https://ci.appveyor.com/project/appsvc/azure-functions-java-library?branch=dev)|
+| Branch | Status |
+|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| dev | [](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=101&branchName=dev) |
+| v2.x | [](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=101&branchName=v2.x) |
# Library for Azure Java Functions
This repo contains library for building Azure Java Functions. Visit the [complete documentation of Azure Functions - Java Developer Guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-java) for more details.
+### The [dev](https://github.com/Azure/azure-functions-java-library/tree/dev) branch will be used to make any changes necessary to support v4 extension bundle.
+### The [v2.x](https://github.com/Azure/azure-functions-java-library/tree/v2.x) branch will be used to make any changes necessary to support v3 extension bundle.
+
## azure-functions-maven plugin
[How to use azure-functions-maven plugin to create, update, deploy and test azure java functions](/learn/modules/develop-azure-functions-app-with-maven-plugin)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index d4a8c26..5f5f0a5 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -5,11 +5,12 @@ trigger:
branches:
include:
- dev
+ - v2.x
pr:
branches:
include:
- dev
- - master
+ - v2.x
jobs: