-
Notifications
You must be signed in to change notification settings - Fork 14
Adding large payload support for the standalone SDK #280
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
264d083
initial commit
bachuv 5eb3ac7
Add tests for large payload externalization and fix review issues
bachuv 575a295
more fixes
bachuv 55f9afe
Addressed copilot pr comments
bachuv 29e3d82
add azurite step to build-validation
bachuv dd6fef1
addressed pr feedback
bachuv 4dd2e93
addressed pr comments
bachuv ab50230
Merge branch 'main' into vabachu/java-large-payloads
bachuv 59460d9
addressed copilot pr comments
bachuv 38ce81a
addressed pr comments
bachuv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,174 @@ | ||
| plugins { | ||
| id 'java-library' | ||
| id 'maven-publish' | ||
| id 'signing' | ||
| id 'com.github.spotbugs' version '6.4.8' | ||
| } | ||
|
|
||
| group 'com.microsoft' | ||
| version = '1.8.0' | ||
| archivesBaseName = 'durabletask-azure-blob-payloads' | ||
|
|
||
| def grpcVersion = '1.78.0' | ||
| def azureCoreVersion = '1.57.1' | ||
| def azureStorageBlobVersion = '12.29.1' | ||
|
|
||
| // Java 11 is used to compile and run all tests. Set the JDK_11 env var to your | ||
| // local JDK 11 home directory, e.g. C:/Program Files/Java/openjdk-11.0.12_7/ | ||
| // If unset, falls back to the current JDK running Gradle. | ||
| def rawJdkPath = System.env.JDK_11 ?: System.getProperty("java.home") | ||
| def PATH_TO_TEST_JAVA_RUNTIME = rawJdkPath | ||
| if (rawJdkPath != null) { | ||
| def f = new File(rawJdkPath) | ||
| if (f.isFile()) { | ||
| PATH_TO_TEST_JAVA_RUNTIME = f.parentFile.parentFile.absolutePath | ||
| } | ||
| } | ||
| def isWindows = System.getProperty("os.name").toLowerCase().contains("win") | ||
| def exeSuffix = isWindows ? ".exe" : "" | ||
|
|
||
| dependencies { | ||
| api project(':client') | ||
|
|
||
| // Azure Storage Blobs | ||
| implementation "com.azure:azure-storage-blob:${azureStorageBlobVersion}" | ||
|
|
||
| // TokenCredential abstraction (from azure-core) — 'api' because | ||
| // LargePayloadStorageOptions exposes TokenCredential in its public API. | ||
| api "com.azure:azure-core:${azureCoreVersion}" | ||
|
|
||
| // gRPC interceptor API | ||
| implementation "io.grpc:grpc-api:${grpcVersion}" | ||
| implementation "io.grpc:grpc-protobuf:${grpcVersion}" | ||
| implementation "io.grpc:grpc-stub:${grpcVersion}" | ||
|
|
||
| // NOTE: azure-identity is NOT included here. Users who need | ||
| // DefaultAzureCredential should add it to their own project. | ||
|
|
||
| testImplementation 'org.mockito:mockito-core:5.21.0' | ||
| testImplementation 'org.mockito:mockito-junit-jupiter:5.21.0' | ||
| testImplementation project(':azuremanaged') | ||
| } | ||
|
|
||
| compileJava { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| } | ||
| compileTestJava { | ||
| sourceCompatibility = JavaVersion.VERSION_11 | ||
| targetCompatibility = JavaVersion.VERSION_11 | ||
| options.fork = true | ||
| options.forkOptions.executable = "${PATH_TO_TEST_JAVA_RUNTIME}/bin/javac${exeSuffix}" | ||
| } | ||
|
|
||
| tasks.withType(Test) { | ||
| executable = new File("${PATH_TO_TEST_JAVA_RUNTIME}", "bin/java${exeSuffix}") | ||
| } | ||
|
|
||
| test { | ||
| useJUnitPlatform { | ||
| // Skip tests tagged as "integration" since those require | ||
| // external dependencies (DTS emulator + Azurite). | ||
| excludeTags "integration" | ||
| } | ||
| } | ||
|
|
||
| // Integration tests require DTS emulator (default localhost:4001) and Azurite on localhost:10000. | ||
| task integrationTest(type: Test) { | ||
| useJUnitPlatform { | ||
| includeTags 'integration' | ||
| } | ||
| dependsOn build | ||
| shouldRunAfter test | ||
| testLogging.showStandardStreams = true | ||
| ignoreFailures = false | ||
| } | ||
|
|
||
| spotbugs { | ||
| toolVersion = '4.9.8' | ||
| effort = com.github.spotbugs.snom.Effort.valueOf('MAX') | ||
| reportLevel = com.github.spotbugs.snom.Confidence.valueOf('HIGH') | ||
| ignoreFailures = true | ||
| excludeFilter = file('spotbugs-exclude.xml') | ||
| } | ||
|
|
||
| spotbugsMain { | ||
| reports { | ||
| html { | ||
| required = true | ||
| stylesheet = 'fancy-hist.xsl' | ||
| } | ||
| xml { | ||
| required = true | ||
| } | ||
| } | ||
| } | ||
|
|
||
| spotbugsTest { | ||
| reports { | ||
| html { | ||
| required = true | ||
| stylesheet = 'fancy-hist.xsl' | ||
| } | ||
| xml { | ||
| required = true | ||
| } | ||
| } | ||
| } | ||
|
|
||
| publishing { | ||
| repositories { | ||
| maven { | ||
| url "file://$project.rootDir/repo" | ||
| } | ||
| } | ||
| publications { | ||
| mavenJava(MavenPublication) { | ||
| from components.java | ||
| artifactId = archivesBaseName | ||
| pom { | ||
| name = 'Durable Task Azure Blob Payloads for Java' | ||
| description = 'This package provides externalized payload storage using Azure Blob Storage for the Durable Task Java SDK.' | ||
| url = "https://github.com/microsoft/durabletask-java/tree/main/azure-blob-payloads" | ||
| licenses { | ||
| license { | ||
| name = "MIT License" | ||
| url = "https://opensource.org/licenses/MIT" | ||
| distribution = "repo" | ||
| } | ||
| } | ||
| developers { | ||
| developer { | ||
| id = "Microsoft" | ||
| name = "Microsoft Corporation" | ||
| } | ||
| } | ||
| scm { | ||
| connection = "scm:git:https://github.com/microsoft/durabletask-java" | ||
| developerConnection = "scm:git:git@github.com:microsoft/durabletask-java" | ||
| url = "https://github.com/microsoft/durabletask-java/tree/main/azure-blob-payloads" | ||
| } | ||
| withXml { | ||
| project.configurations.compileOnly.allDependencies.each { dependency -> | ||
| asNode().dependencies[0].appendNode("dependency").with { | ||
| it.appendNode("groupId", dependency.group) | ||
| it.appendNode("artifactId", dependency.name) | ||
| it.appendNode("version", dependency.version) | ||
| it.appendNode("scope", "provided") | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| signing { | ||
| required = !project.hasProperty("skipSigning") | ||
| sign publishing.publications.mavenJava | ||
| } | ||
|
|
||
| java { | ||
| withSourcesJar() | ||
| withJavadocJar() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <FindBugsFilter> | ||
| <!-- Exclude test classes --> | ||
| <Match> | ||
| <Class name="~.*Test"/> | ||
| </Match> | ||
|
|
||
| <!-- Exclude common false positives --> | ||
| <Match> | ||
| <BugPattern name="DM_CONVERT_CASE"/> | ||
| </Match> | ||
|
|
||
| <!-- Exclude serialization related warnings --> | ||
| <Match> | ||
| <BugPattern name="SE_NO_SERIALVERSIONID"/> | ||
| </Match> | ||
| </FindBugsFilter> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.