From 8effd2d32b50b94210cd898529a8328e7f414d9f Mon Sep 17 00:00:00 2001 From: Varshitha Bachu Date: Thu, 24 Apr 2025 09:41:58 -0700 Subject: [PATCH 1/7] Create CONTRIBUTING.md --- CONTRIBUTING.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..2401c833 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,39 @@ +# Contributor Onboarding +Thank you for taking the time to contribute to Durable Functions in Java + +## Table of Contents + +- [What should I know before I get started?](#what-should-i-know-before-i-get-started) +- [Pre-requisites](#pre-requisites) +- [Pull Request Change Flow](#pull-request-change-flow) +- [Development Setup](#development-setup) +- [Pre Commit Tasks](#pre-commit-tasks) +- [Continuous Integration Guidelines & Conventions](#continuous-integration-guidelines-&-conventions) +- [Getting Help](#getting-help) + +## What should I know before I get started +- [Durable Functions Overview](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview) +- [Durable Functions Application Patterns](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=in-process%2Cnodejs-v3%2Cv1-model&pivots=java#application-patterns) +- [Azure Functions Java Quickstart](https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-java) + +## Pre-requisites +- Gradle 7.4 +- Java 17 +- Visual Studio or IntelliJ IDEA +- [Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps&pivots=programming-language-java) + +## Pull Request Change flow + +The general flow for making a change to the library is: + +1. 🍴 Fork the repo (add the fork via `git remote add me ` +2. 🌳 Create a branch for your change (generally branch from dev) (`git checkout -b my-change`) +3. 🛠 Make your change +4. ✔️ Test your change +5. ⬆️ Push your changes to your fork (`git push me my-change`) +6. 💌 Open a PR to the dev branch +7. 📢 Address feedback and make sure tests pass (yes even if it's an "unrelated" test failure) +8. 📦 [Rebase](https://git-scm.com/docs/git-rebase) your changes into meaningful commits (`git rebase -i HEAD~N` where `N` is commits you want to squash) +9. :shipit: Rebase and merge (This will be done for you if you don't have contributor access) +10. ✂️ Delete your branch (optional) + From d6e1ec008bcec4e99839c69891b03318f2fccaa7 Mon Sep 17 00:00:00 2001 From: Varshitha Bachu Date: Fri, 25 Apr 2025 11:21:56 -0700 Subject: [PATCH 2/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2401c833..0b21334f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ Thank you for taking the time to contribute to Durable Functions in Java ## Pre-requisites - Gradle 7.4 - Java 17 -- Visual Studio or IntelliJ IDEA +- Visual Studio Code - [Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps&pivots=programming-language-java) ## Pull Request Change flow @@ -33,7 +33,36 @@ The general flow for making a change to the library is: 5. ⬆️ Push your changes to your fork (`git push me my-change`) 6. 💌 Open a PR to the dev branch 7. 📢 Address feedback and make sure tests pass (yes even if it's an "unrelated" test failure) -8. 📦 [Rebase](https://git-scm.com/docs/git-rebase) your changes into meaningful commits (`git rebase -i HEAD~N` where `N` is commits you want to squash) +8. 📦 [Rebase](https://git-scm.com/docs/git-rebase) your changes into meaningful commits (`git rebase -i HEAD~N` where `N` is commits you want to squash) 9. :shipit: Rebase and merge (This will be done for you if you don't have contributor access) 10. ✂️ Delete your branch (optional) +## Development Process to test Durable Functions changes + +The following instructions are for development with VS Code to test changes in durabletask-java in a Durable Functions Java app + +1. After making any changes in durabletask-java, you will need to increment the version number in build.gradle. For example, if I make a change in the azurefunctions directory, then I would update the version in `azurefunctions/build.gradle`. +2. In the durabletask-java repo, from the root of the project, run `gradle clean build`. This will create the .jar files with the updated version that you specified. +3. To get the .jar file that was created, go to the `build/libs` directory. For example, if you made a change in azurefunctions, then go to `distributed-tracing\durabletask-java\azurefunctions\build\libs`. If you made a change to client, then go to `distributed-tracing\durabletask-java\client\build\`. Add the .jar files that you are testing to a local directory. +4. [Create a Durable Functions Java app](https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-java?tabs=bash&pivots=create-option-vscode) if you haven't done so already. +5. In the Durable Functions Java app, run the following command to install the local .jar files that were created in step 2: `mvn install:install-file -Dfile="" -DgroupId="com.microsoft" -DartifactId="" -Dversion="" -Dpackaging="jar" -DlocalRepositoryPath=""`. + +For example, if you created custom `durabletask-client` and `durabletask-azurefunctions` packages with version 1.6.0 in step 2, then you would run the following commands: + +``` +mvn install:install-file -Dfile="C:/Temp/durabletask-client-1.6.0.jar" -DgroupId="com.microsoft" -DartifactId="durabletask-client" -Dversion="1.6.0" -Dpackaging="jar" -DlocalRepositoryPath="C:/df-java-sample-app" + +mvn install:install-file -Dfile="C:/Temp/durabletask-azure-functions-1.6.0.jar" -DgroupId="com.microsoft" -DartifactId="durabletask-azure-functions" -Dversion="1.6.0" -Dpackaging="jar" -DlocalRepositoryPath="C:/df-java-sample-app" +``` + +6. Run `mvn clean package` from the Durable Functions app root folder. +7. Run `mvn azure-functions:run` from the Durable Functions app root folder. + +## Debugging .NET packages from a Durable Functions Java app + +If you want to debug into the Durable Task or any of the .NET bits, follow instructions below: + +1. If you would like to debug a custom local WebJobs extension package then create the custom package, place it in a local directory, and then run `func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask --version `. If you update the version while debugging and the new version doesn't get picked up, then try running `func extensions install` to get the new changes. +3. Make sure the Durable Functions Java debugging is setup already and the debugger has started the `func` process. +4. In the VSCode editor for DurableTask, click Debug -> .NET Core Attach Process, search for `func host start` process and attach to it. If you are using Visual Studio, click Debug -> Attach to Process, search for the `func` process and attach to it. +5. Add a breakpoint in both editors and continue debugging. From 6f6aed74362c54b70e4aad919857f432a10b6701 Mon Sep 17 00:00:00 2001 From: Varshitha Bachu Date: Fri, 25 Apr 2025 13:26:15 -0700 Subject: [PATCH 3/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b21334f..1f4ae45a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,15 @@ # Contributor Onboarding -Thank you for taking the time to contribute to Durable Functions in Java +Thank you for taking the time to contribute to Durable Functions in Java! ## Table of Contents -- [What should I know before I get started?](#what-should-i-know-before-i-get-started) +- [Relevant Docs](#relevant-docs) - [Pre-requisites](#pre-requisites) - [Pull Request Change Flow](#pull-request-change-flow) -- [Development Setup](#development-setup) -- [Pre Commit Tasks](#pre-commit-tasks) -- [Continuous Integration Guidelines & Conventions](#continuous-integration-guidelines-&-conventions) -- [Getting Help](#getting-help) +- [Testing with a Durable Functions app](#testing-with-a-durable-functions-app) +- [Debugging .NET packages from a Durable Functions Java app](#debugging-net-packages-from-a-durable-functions-java-app) -## What should I know before I get started +## Relevant Docs - [Durable Functions Overview](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview) - [Durable Functions Application Patterns](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=in-process%2Cnodejs-v3%2Cv1-model&pivots=java#application-patterns) - [Azure Functions Java Quickstart](https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-java) @@ -22,7 +20,7 @@ Thank you for taking the time to contribute to Durable Functions in Java - Visual Studio Code - [Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps&pivots=programming-language-java) -## Pull Request Change flow +## Pull Request Change Flow The general flow for making a change to the library is: @@ -37,15 +35,15 @@ The general flow for making a change to the library is: 9. :shipit: Rebase and merge (This will be done for you if you don't have contributor access) 10. ✂️ Delete your branch (optional) -## Development Process to test Durable Functions changes +## Testing with a Durable Functions app -The following instructions are for development with VS Code to test changes in durabletask-java in a Durable Functions Java app +The following instructions explain how to test durabletask-java changes in a Durable Functions Java app. -1. After making any changes in durabletask-java, you will need to increment the version number in build.gradle. For example, if I make a change in the azurefunctions directory, then I would update the version in `azurefunctions/build.gradle`. +1. After making changes in durabletask-java, you will need to increment the version number in build.gradle. For example, if I make a change in the azurefunctions directory, then I would update the version in `azurefunctions/build.gradle`. 2. In the durabletask-java repo, from the root of the project, run `gradle clean build`. This will create the .jar files with the updated version that you specified. 3. To get the .jar file that was created, go to the `build/libs` directory. For example, if you made a change in azurefunctions, then go to `distributed-tracing\durabletask-java\azurefunctions\build\libs`. If you made a change to client, then go to `distributed-tracing\durabletask-java\client\build\`. Add the .jar files that you are testing to a local directory. 4. [Create a Durable Functions Java app](https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-java?tabs=bash&pivots=create-option-vscode) if you haven't done so already. -5. In the Durable Functions Java app, run the following command to install the local .jar files that were created in step 2: `mvn install:install-file -Dfile="" -DgroupId="com.microsoft" -DartifactId="" -Dversion="" -Dpackaging="jar" -DlocalRepositoryPath=""`. +5. In the Durable Functions Java app, run the following command to install the local .jar files that were created in step 2: `mvn install:install-file -Dfile="" -DgroupId="com.microsoft" -DartifactId="" -Dversion="" -Dpackaging="jar" -DlocalRepositoryPath=""`. For example, if you created custom `durabletask-client` and `durabletask-azurefunctions` packages with version 1.6.0 in step 2, then you would run the following commands: From ebd6c00b15275e1e18c2e9e49ef8f660b39b08a3 Mon Sep 17 00:00:00 2001 From: Varshitha Bachu Date: Fri, 25 Apr 2025 15:29:23 -0700 Subject: [PATCH 4/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1f4ae45a..76bc325b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ Thank you for taking the time to contribute to Durable Functions in Java! ## Table of Contents - [Relevant Docs](#relevant-docs) -- [Pre-requisites](#pre-requisites) +- [Prerequisites](#prerequisites) - [Pull Request Change Flow](#pull-request-change-flow) - [Testing with a Durable Functions app](#testing-with-a-durable-functions-app) - [Debugging .NET packages from a Durable Functions Java app](#debugging-net-packages-from-a-durable-functions-java-app) @@ -14,11 +14,12 @@ Thank you for taking the time to contribute to Durable Functions in Java! - [Durable Functions Application Patterns](https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=in-process%2Cnodejs-v3%2Cv1-model&pivots=java#application-patterns) - [Azure Functions Java Quickstart](https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-java) -## Pre-requisites +## Prerequisites +- Visual Studio Code +- [Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps&pivots=programming-language-java) +- Apache Maven 3.8.1 or higher (Note: the instructions in this doc were validated using Apache Maven 3.9.9) - Gradle 7.4 - Java 17 -- Visual Studio Code -- [Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps&pivots=programming-language-java) ## Pull Request Change Flow @@ -39,9 +40,9 @@ The general flow for making a change to the library is: The following instructions explain how to test durabletask-java changes in a Durable Functions Java app. -1. After making changes in durabletask-java, you will need to increment the version number in build.gradle. For example, if I make a change in the azurefunctions directory, then I would update the version in `azurefunctions/build.gradle`. +1. After making changes in durabletask-java, you will need to increment the version number in build.gradle. For example, if you make a change in the azurefunctions directory, then you would update the version in `azurefunctions/build.gradle`. 2. In the durabletask-java repo, from the root of the project, run `gradle clean build`. This will create the .jar files with the updated version that you specified. -3. To get the .jar file that was created, go to the `build/libs` directory. For example, if you made a change in azurefunctions, then go to `distributed-tracing\durabletask-java\azurefunctions\build\libs`. If you made a change to client, then go to `distributed-tracing\durabletask-java\client\build\`. Add the .jar files that you are testing to a local directory. +3. To get the .jar file that was created, go to the `build/libs` directory. For example, if you made a change in azurefunctions, then go to `durabletask-java/azurefunctions/build/libs`. If you made a change to client, then go to `durabletask-java/client/build/libs`. Add the .jar files that you are testing to a local directory. 4. [Create a Durable Functions Java app](https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-java?tabs=bash&pivots=create-option-vscode) if you haven't done so already. 5. In the Durable Functions Java app, run the following command to install the local .jar files that were created in step 2: `mvn install:install-file -Dfile="" -DgroupId="com.microsoft" -DartifactId="" -Dversion="" -Dpackaging="jar" -DlocalRepositoryPath=""`. @@ -58,9 +59,9 @@ mvn install:install-file -Dfile="C:/Temp/durabletask-azure-functions-1.6.0.jar" ## Debugging .NET packages from a Durable Functions Java app -If you want to debug into the Durable Task or any of the .NET bits, follow instructions below: +If you want to debug into the Durable Task or any of the .NET bits, follow the instructions below: 1. If you would like to debug a custom local WebJobs extension package then create the custom package, place it in a local directory, and then run `func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask --version `. If you update the version while debugging and the new version doesn't get picked up, then try running `func extensions install` to get the new changes. 3. Make sure the Durable Functions Java debugging is setup already and the debugger has started the `func` process. -4. In the VSCode editor for DurableTask, click Debug -> .NET Core Attach Process, search for `func host start` process and attach to it. If you are using Visual Studio, click Debug -> Attach to Process, search for the `func` process and attach to it. +4. In the VSCode editor for DurableTask, click Debug -> .NET Core Attach Process, search for `func host start` process and attach to it. 5. Add a breakpoint in both editors and continue debugging. From 2cbd4181d71d8168bc60a5111fd77bb335980216 Mon Sep 17 00:00:00 2001 From: Varshitha Bachu Date: Fri, 25 Apr 2025 15:37:00 -0700 Subject: [PATCH 5/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 76bc325b..d86c35a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,5 @@ # Contributor Onboarding +This contributor guide explains how to make and test changes to Durable Functions in Java. Thank you for taking the time to contribute to Durable Functions in Java! ## Table of Contents @@ -62,6 +63,6 @@ mvn install:install-file -Dfile="C:/Temp/durabletask-azure-functions-1.6.0.jar" If you want to debug into the Durable Task or any of the .NET bits, follow the instructions below: 1. If you would like to debug a custom local WebJobs extension package then create the custom package, place it in a local directory, and then run `func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask --version `. If you update the version while debugging and the new version doesn't get picked up, then try running `func extensions install` to get the new changes. -3. Make sure the Durable Functions Java debugging is setup already and the debugger has started the `func` process. -4. In the VSCode editor for DurableTask, click Debug -> .NET Core Attach Process, search for `func host start` process and attach to it. -5. Add a breakpoint in both editors and continue debugging. +2. Make sure the Durable Functions Java debugging is setup already and the debugger has started the `func` process. +3. In the VSCode editor for DurableTask, click Debug -> .NET Core Attach Process, search for `func host start` process and attach to it. +4. Add a breakpoint in both editors and continue debugging. From 102063db2f6e92d98f2b9e695a02bdc1bc83fbdf Mon Sep 17 00:00:00 2001 From: Varshitha Bachu Date: Thu, 1 May 2025 17:27:47 -0700 Subject: [PATCH 6/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d86c35a4..898d6d70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributor Onboarding This contributor guide explains how to make and test changes to Durable Functions in Java. -Thank you for taking the time to contribute to Durable Functions in Java! +Thank you for taking the time to contribute to the DurableTask Java SDK! ## Table of Contents @@ -20,13 +20,13 @@ Thank you for taking the time to contribute to Durable Functions in Java! - [Azure Functions Core Tools](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps&pivots=programming-language-java) - Apache Maven 3.8.1 or higher (Note: the instructions in this doc were validated using Apache Maven 3.9.9) - Gradle 7.4 -- Java 17 +- Java 8 or higher (Note: the instructions in this doc were validated using Java 17) ## Pull Request Change Flow The general flow for making a change to the library is: -1. 🍴 Fork the repo (add the fork via `git remote add me ` +1. 🍴 Fork the repo (add the fork via `git remote add me `) 2. 🌳 Create a branch for your change (generally branch from dev) (`git checkout -b my-change`) 3. 🛠 Make your change 4. ✔️ Test your change @@ -47,7 +47,7 @@ The following instructions explain how to test durabletask-java changes in a Dur 4. [Create a Durable Functions Java app](https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-java?tabs=bash&pivots=create-option-vscode) if you haven't done so already. 5. In the Durable Functions Java app, run the following command to install the local .jar files that were created in step 2: `mvn install:install-file -Dfile="" -DgroupId="com.microsoft" -DartifactId="" -Dversion="" -Dpackaging="jar" -DlocalRepositoryPath=""`. -For example, if you created custom `durabletask-client` and `durabletask-azurefunctions` packages with version 1.6.0 in step 2, then you would run the following commands: +For example, if you created custom `durabletask-client` and `durabletask-azure-functions` packages with version 1.6.0 in step 2, then you would run the following commands: ``` mvn install:install-file -Dfile="C:/Temp/durabletask-client-1.6.0.jar" -DgroupId="com.microsoft" -DartifactId="durabletask-client" -Dversion="1.6.0" -Dpackaging="jar" -DlocalRepositoryPath="C:/df-java-sample-app" @@ -63,6 +63,6 @@ mvn install:install-file -Dfile="C:/Temp/durabletask-azure-functions-1.6.0.jar" If you want to debug into the Durable Task or any of the .NET bits, follow the instructions below: 1. If you would like to debug a custom local WebJobs extension package then create the custom package, place it in a local directory, and then run `func extensions install --package Microsoft.Azure.WebJobs.Extensions.DurableTask --version `. If you update the version while debugging and the new version doesn't get picked up, then try running `func extensions install` to get the new changes. -2. Make sure the Durable Functions Java debugging is setup already and the debugger has started the `func` process. +2. Make sure the Durable Functions Java debugging is set up already and the debugger has started the `func` process. 3. In the VSCode editor for DurableTask, click Debug -> .NET Core Attach Process, search for `func host start` process and attach to it. 4. Add a breakpoint in both editors and continue debugging. From 2b9e02ab87986cc2dbe4d8336f619484b280f9c2 Mon Sep 17 00:00:00 2001 From: Varshitha Bachu Date: Tue, 6 May 2025 12:09:31 -0700 Subject: [PATCH 7/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 898d6d70..b5c759f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ The general flow for making a change to the library is: The following instructions explain how to test durabletask-java changes in a Durable Functions Java app. 1. After making changes in durabletask-java, you will need to increment the version number in build.gradle. For example, if you make a change in the azurefunctions directory, then you would update the version in `azurefunctions/build.gradle`. -2. In the durabletask-java repo, from the root of the project, run `gradle clean build`. This will create the .jar files with the updated version that you specified. +2. In the durabletask-java repo, from the root of the project, run `./gradlew clean build`. This will create the .jar files with the updated version that you specified. 3. To get the .jar file that was created, go to the `build/libs` directory. For example, if you made a change in azurefunctions, then go to `durabletask-java/azurefunctions/build/libs`. If you made a change to client, then go to `durabletask-java/client/build/libs`. Add the .jar files that you are testing to a local directory. 4. [Create a Durable Functions Java app](https://learn.microsoft.com/en-us/azure/azure-functions/durable/quickstart-java?tabs=bash&pivots=create-option-vscode) if you haven't done so already. 5. In the Durable Functions Java app, run the following command to install the local .jar files that were created in step 2: `mvn install:install-file -Dfile="" -DgroupId="com.microsoft" -DartifactId="" -Dversion="" -Dpackaging="jar" -DlocalRepositoryPath=""`.