Commit Graph

208 Commits

Author SHA1 Message Date
Artur Souza 8404b77d8c
Filter out headers not required for W3C in service invocation. (#642) 2021-10-11 17:22:38 -07:00
Artur Souza ed1fac1f89
Upgrade the version to 1.4.0-SNAPSHOT (#632) 2021-09-15 22:03:12 -07:00
Maarten Mulders 70e18d8b5a
Prepare build for Java16 (#598)
* Upgrade Mockito to latest version

* Run GitHub Actions on Java 11 and 16

* Run JUnit tests with `--add-opens java.base/java.util=ALL-UNNAMED`

* Move Surefire JVM arguments to Maven property

* Update build.yml

* Update validate.yml

* simplily build singleton dapr http (#590)

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Add Automerge workflow (#605)

* Add Automerge workflow

The automerge workflow will check for complete and approved pull requests and will merge them automatically.

Sources:
- For the python script to execute the merge: https://raw.githubusercontent.com/dapr/dapr/master/.github/scripts/automerge.py (only changed the label from "automerge" to "auto-merge")
- https://raw.githubusercontent.com/dapr/dapr/master/.github/workflows/dapr-bot-schedule.yml (only copied the automerge part, not the prune_stale part as that was not part of the issue.

Resolves https://github.com/dapr/java-sdk/issues/603

* Update automerge-bot.yml

* Update automerge-bot.yml

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Cleanup Maven POM files (#604)

Added fixed versions for maven-deploy-plugin & spring-boot-maven-plugin as this would otherwise break in a future maven version.

Also fixed some indenting and removed duplicate declarations.

Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>

* Add support for @PostMapping("/path") to pub/sub topic subscriptions (#583)

* Remove duplicate dependency

* Transform into managed dependencies

* Remove old JUnit version from dependencies

* Add tests for DaprBeanPostProcessor

* Also register PostMappings that use value

* Modify existing pub/sub test to no use @PostMapping(path="...")

* Remove added dependencies on AssertJ, Spring Test and Servlet API

* Remove test in favour of the sdk-tests one

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Run JUnit tests in all modules with java.base/java.util and java.base/java.lang opened to all modules

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: 浩 <inf2inf2@outlook.com>
Co-authored-by: Tom Cools <tom.cools@live.be>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-08-30 15:32:32 -07:00
34bf149a1a
simplily build singleton dapr http (#590)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-08-20 16:21:40 -07:00
Mukundan Sundararajan f199afba95
deprecate builders and add setters for domain classes (#596)
* deprecate builders and add setters for domain classes
exclude builders from coverage checks
properly set parallelism for getbulkstaterequest
Initialize default metadata to empty HashMap PublishEventRequest
Decrease code coeverage ratio for dapr-sdk

* Fix casing
2021-08-20 14:54:01 -07:00
Maarten Mulders ae5c2a1314
Declare CloudEvent generic to allow automatic payload deserialization using Jackson (#591)
* Declare CloudEvent generic

* Fix timestamp in logging

* Declare Spring Boot version once

* Simplify administration of received events

* Update docs

* Always return a list, even if it's empty

Rather than returning `null` when no
messages are present for a topic.
2021-08-13 13:52:37 -07:00
Kevin_T 50f80d8af5
chore: format some places to make the code more standardized (#578)
* chore: format some places to make the code more standardized

* test: add unit test for {@code DaprClient#getState} to cover {@code StateOptions#getStateOptionsAsMap}
2021-07-21 14:09:38 -07:00
Bernd Verst c3e60bb2ef
Update GRPC libraries for security updates (#573)
* Update pom.xml

* Update pom.xml

* Update pom.xml

* Define GRPC version as build property

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-14 16:39:24 -07:00
Bernd Verst 48b2d44aa7
Add support for configuring actor reminder storage partitions (#574)
* Update GRPC libraries for security updates

* AdConfigurable actor reminder storage patitions

* autoformat code

* Fix test and linter error

* more autoformatting

* competing style checker :(

Co-authored-by: Ubuntu <beverst@beverst-ubuntu.4gvshbv0hrpejbsei5kugsxnoc.xx.internal.cloudapp.net>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-12 16:02:25 -07:00
halspang 2eb6e1d9e3
Upgrade the version to 1.2.0-SNAPSHOT (#549) 2021-05-19 22:01:28 -07:00
Artur Souza 33f793c186
Return empty metadata for key not found + add IT test. (#528) 2021-05-14 11:37:09 -07:00
Artur Souza 7467575a97
Revert "Adjusted the configuration of Maven. (#532)" (#536)
This reverts commit 5cc79811cb.
2021-04-29 18:48:29 -07:00
LLLLimbo 5cc79811cb
Adjusted the configuration of Maven. (#532)
* Adjusted the configuration of Maven.

* Update pom.xml

* Remove os-maven-plugin and spring-boot-maven-plugin in parent pom

* Add version of spring-boot-maven-plugin in the example pom.
Add spring-boot-dependencies dependency management in sdk-springboot.
Add maven-compiler-plugin to the parent pom's pluginManagement
Remove protoc-jar-maven-plugin in  example's dependencies.

* Update pom.xml

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>
2021-04-26 23:26:11 -07:00
halspang a654861def
Add shutdown API support (#530)
* Add shutdown API support

https://github.com/dapr/java-sdk/issues/529

* Utilize POST instead of GET for shutdown API
2021-04-07 11:42:00 -07:00
Artur Souza 788eea605c Fix HTTP save state transaction. 2021-03-17 00:14:46 -07:00
Artur Souza 45c81afa06
Upgrade the version to 1.1.0-SNAPSHOT (#494) 2021-02-16 18:14:23 -08:00
Artur Souza ce7ecb9965
Allows override of content-type in pubsub publish. (#492) 2021-02-16 00:03:08 -08:00
Artur Souza e46ef319cd
Support many query strings in HTTP and binary data in Cloud Event for PubSub. (#485)
* Handles base64 data from CloudEvent.

* Support for multiple query strings.

* Addressing comments.
2021-02-09 19:38:13 -08:00
Artur Souza 1b3077071f
Update license header. (#483) 2021-02-06 00:18:47 -08:00
xiazuojie 0cd2f373d2
remove io.dapr.client.domain.Response from DaprClient APIs (#476)
* change: remove io.dapr.client.domain.Response from getState API. This is just a showcase of how to use reactor.util.context.Context

* fix: code style

* change: remove io.dapr.client.domain.Response from invokeMethod API

* change: completely remove io.dapr.client.domain.Response and update all APIs
change: remove reactor.util.context.Context from "request" classes.

* removed getStateContext test case
update README.md

* removed default impl from DaprClient

Co-authored-by: Xia Zuojie <zuojie@alibaba-inc.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-02-05 23:20:25 -08:00
Artur Souza a66337aa4b
Unit test to deserialize CloudEvent. (#480) 2021-02-04 14:11:39 -08:00
Artur Souza 5d7700b570
Refactor params for State class + Unit test example (#473)
* Refactor order of params for State class.

* Example for unit testing.

* Change toString() for State class.

* Add unittesting example to main README.

* Fix cmd for unittesting example.

* Add sleep to http inputing binding example validation.

* Fix unittesting example check.
2021-02-01 19:03:25 -08:00
Artur Souza 277f9958a6
Fix PubSub publish + Update IT to use RC3 bits. (#471)
* Update IT to use RC3 bits.

* Fixing publish method not to handle content-type metadata in GRPC.

* Fix flaky actor ITs.
2021-02-01 18:19:50 -08:00
Artur Souza ba496064d1
Removing OpenTelemetry and OpenCensus SDK. (#463) 2021-01-29 09:23:48 -08:00
Artur Souza d7cc7974c7 handle method not found when proto class does not have parseFrom() 2021-01-27 23:39:13 -08:00
Artur Souza 7eacfcc88f Fix error handling in http invoke.
ITs to validate invoke errors on http and grpc services.
Handle serialization of proto objects.
2021-01-27 22:22:22 -08:00
karishma-chawla efee05681e
Updating state management example to include etag mismatch exception handling (#458)
* Updating state management example to include etag mismatch exception scenario. Dapr runtime grpc exception handling was recently updated to return aborted error code on etage mismatch for mutations, the example is updated to reflect that the runtime updates will be propagated through the java sdk.

* Addressed feedback to merge block call with api call.

* Updating readme with block() call updates, missed in previous commit
2021-01-26 17:14:51 -08:00
Charlie Stanley c35f0e11c6 Added unit tests for nullable etag #442 2021-01-25 13:52:21 -08:00
Artur Souza 907748f162 Adding GetBulkSecret API. 2021-01-25 12:21:46 -08:00
Artur Souza 57345ebf3e
Use DaprChannel instead of closeable ActorProxyBuilder. (#451)
* Use DaprChannel instead of closeable ActorProxyBuilder.

* Refactor Actor channel into DaprChannel and out of ActorProxyBuilder.

* Rename DaprChannel to ActorClient and make it a DaprClient.

* Make ActorClient not implement DaprClient but implement same method.

* Update sdk-actors/src/main/java/io/dapr/actors/client/ActorProxyBuilder.java

Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>

* Update sdk-actors/src/test/java/io/dapr/actors/client/ActorProxyBuilderTest.java

Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>

* Rename ActorProxyForTestsImpl to ActorProxyImplForTests

Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>
2021-01-25 12:04:58 -08:00
Artur Souza befed4a01b
Makes service method API invocations over HTTP by default. (#450)
* Makes service method API invocations over HTTP by default.

* Add logic to avoid building managedchannel in case of http API for actor runtime.
2021-01-23 12:12:34 -08:00
Phil Kedy 38b899d8b8
Add java.lang.reflect.Type to TypeRef per #331 (#449)
* Add support deserialization of generic types per #293

* Improving test coverage
2021-01-22 15:49:51 -08:00
Artur Souza 81b47f85b3
Makes http call async and allows timeout in Mono. (#445) 2021-01-21 15:23:24 -08:00
Artur Souza d43272fdc6
Rename InvokeServiceRequest to InvokeMethodRequest. (#443)
* Rename InvokeServiceRequest to InvokeMethodRequest.

* Organize imports.
2021-01-15 04:51:48 -08:00
Artur Souza 019dee9a8b
Fix handling of metadata, headers. Removes etag from getState. (#440)
* Fix handling of metadata, headers. Removes etag from getState().

* Update CLI and runtime.

* Fix ITs.
2021-01-14 15:01:22 -08:00
xiazuojie 76d877c9c0
Fix blocking calls for gRPC even though using Reactor (#435)
* Fix blocking calls for gRPC even though using Reactor

* delete unused wrap method

* add: throw exception if fatal

* Add "NoHotMono" unit tests for DaprClientGrpc

Co-authored-by: 刘禅 <zuojie@alibaba-inc.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-01-11 19:40:15 -08:00
Artur Souza 6a44d51279
Adds method to wait for Dapr sidecar. (#433) 2020-12-30 19:29:23 -08:00
Artur Souza 1a6675add8
Support TTL in PubSub. Fixes + refactor of CloudEvent. Fix handling content-type in PubSub over GRPC (#431) 2020-12-30 13:37:15 -08:00
Artur Souza 2714402a0e
Fix input encoding and error parsing for HTTP calls. (#428)
* Fix input encoding and error parsing for HTTP calls.

* Adds tests for special char in HTTP call.

* Rename path to pathSegments
2020-12-29 18:17:57 -08:00
Arghya Sadhu 4c1773c8cd
refactor to move duplicate code to method (#429)
Signed-off-by: Arghya Sadhu <arghya88@gmail.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2020-12-29 14:20:31 -08:00
Sky/敖小剑 b5dd421142
add metadata in get bulk state request (#401)
* add metadata in get bulk state request

* rollback DaprClientGrpcTest which should be comitted in another PR

* fix compile error after merge

* update unit test for metadata in getBulkState()

* re-trigger build again

* add test for withMetadata()

Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>
2020-12-29 14:03:41 -08:00
Artur Souza 08f133dd1b
Throws IllegalArgumentException without wrapping as DaprException. (#426) 2020-12-21 16:21:01 -08:00
Arghya Sadhu a35e41480e
set etag to be null if it's empty (#414)
Signed-off-by: Arghya Sadhu <arghya88@gmail.com>
2020-12-18 12:13:46 -08:00
Arghya Sadhu 11d9e3b0b8
Rename methods and parameters for consistency across SDKs (#410)
Signed-off-by: Arghya Sadhu <arghya88@gmail.com>
2020-12-16 00:06:54 -08:00
Artur Souza de4c37e3a5
Upgrade the version to 1.0.0-SNAPSHOT (#413) 2020-12-15 23:34:20 -08:00
Artur Souza adce91f743
Throw DaprException consistently + doc + example. (#403) 2020-12-08 15:58:07 -08:00
Sky/敖小剑 16faa43795
support metadata in get state and bulk get state response (#402) 2020-12-03 11:25:32 -08:00
Sky/敖小剑 912ff7a781
Add metadata for state save operation (#397)
* add metadata for state save

* add test case for state hashcode() and equals()

* add metadata for state tansactional

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2020-12-01 21:13:25 -08:00
Sky/敖小剑 8cc33b5598
fix a small copy-paste issue (#398) 2020-11-30 15:49:33 -08:00
Artur Souza cf1c10d85a
Actor over GRPC. (#395) 2020-11-24 15:23:35 -08:00
Artur Souza a5c9bf73ba
Upgrade the version to 0.11.0-SNAPSHOT (#390) 2020-11-16 12:34:44 -08:00
Artur Souza c466e211f1
Fix build due to deprecated maven repo, using jcenter now. (#392) 2020-11-16 12:01:53 -08:00
haidao 9dcff43ef0
open telemetry upgrade to 0.10.0 (#386)
* open telemetry upgrade to 0.10.0

* open telemetry upgrade to 0.10.0

* open telemetry upgrade to 0.10.0

* open telemetry upgrade to 0.10.0

* open telemetry upgrade to 0.10.0

Co-authored-by: haidao <wlf190783@alibaba-inc.com>
2020-11-13 13:00:21 -08:00
Mukundan Sundararajan 97eacf9598
update open telemetry lib version 0.7.1 (#380)
* update readme with secrets example link

* Update opentelemetry to 0.7.1, change repo id for sping

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2020-11-09 21:52:36 -08:00
Mukundan Sundararajan 751ea2168c
upgrade dependency versions (#378) 2020-11-04 16:22:39 -08:00
Mukundan Sundararajan 44732875cb
Increase test coverage. Fix some code inspection issues. (#372) 2020-10-19 16:35:06 -07:00
Artur Souza eb7763f126
Fix high mem usage due to many OkHttpClient instances. (#373) 2020-10-19 15:23:41 -07:00
Artur Souza 7f261be7ed
Upgrade the version to 0.10.0-SNAPSHOT (#345) 2020-09-28 11:15:38 -07:00
Mukundan Sundararajan fb8580f71b
Update state, secrets examples. Fix state toString. Ignore sdk-autogen in code coverage. (#340)
* Update state, secrets example. Fix state toString. Ignore sdk-autogen in code coverage.

* Update StateClient.java

* Update README.md

* Update Readme.md

Co-authored-by: Nghia Tran <tcnghia@gmail.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Nghia Tran <tcnghia@gmail.com>
2020-09-21 15:06:46 -07:00
Mukundan Sundararajan f6b56bb376
Initial transaction API changes (#337)
* Initial transaction API changes

* Add more unit tests

* Refactor IT
2020-09-16 14:00:57 -07:00
Artur Souza baab109202
Bulk get state (#335)
* unfinished work

* Working version of Bulk get state API.

Co-authored-by: Haishi2016 <hbai@microsoft.com>
2020-09-16 11:29:01 -07:00
Pruthvidhar R Dhodda e2ddc9f96d
Add metadata support for state API's (#336)
* Add metadata support for state API's

* Remove .vscode files
2020-09-14 16:32:50 -07:00
Pruthvidhar R Dhodda 361a0e48a3
Add content type metadata support in gRPC invoke service calls (#334)
* Add content type metadata support in gRPC invoke service calls

* Add content type to serializer, change tests accordingly

* Remove content type parameter

* Update InvokeServiceRequest.java

Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2020-09-13 16:38:30 -07:00
Artur Souza fe027d0c54
Refactoring properties and constants. (#333) 2020-09-02 11:54:12 -07:00
Pruthvidhar R Dhodda 7b174d88e8
Add support for DAPR_API_TOKEN (#330)
* Add supoort for DAPR_API_TOKEN

* Add tests for dapr api token

* Move interceptor logic

* Remove additional interceptor

* Fix check style voilation

* Add dapr api token as system property
2020-09-01 12:09:52 -07:00
Artur Souza eede480403
Support W3C tracing + example. (#320) 2020-08-25 11:20:33 -07:00
Charlie Stanley d72e4cc49b Upgrade the version to 0.9.0-SNAPSHOT 2020-08-19 13:38:16 -07:00
Charlie Stanley 63f591e877 Add support for multi-pubsub (#309) 2020-08-18 18:20:17 -07:00
Artur Souza 56927daedd
Removing RetryPolicy for state API. (#315) 2020-07-30 14:13:41 -07:00
Mukundan Sundararajan 14fded8d18
Make DaprClient Closeable and properly close GRPC Managed Channel (#311) 2020-07-30 13:34:04 -07:00
Mukundan Sundararajan a388a6a90f
Upgrade the version to 0.8.0-SNAPSHOT (#314) 2020-07-30 12:00:53 -07:00
Mukundan Sundararajan 55b0e3a1e5
Change Service Invocation API. Fix metadata bug. (#312)
* Change Service Invocation API

* Address review comments
2020-07-30 10:44:25 -07:00
Artur Souza bd4b24cdb9
Use TypeRef for deserialization and client APIs. (#301)
* Use TypeRef for deserialization and client APIs.

* Making TypeRef class constructor private to force use of .get()
2020-07-09 11:47:25 -07:00
Artur Souza dbdab2ed69
Upgrade the version to 0.7.0-SNAPSHOT (#292) 2020-06-05 20:01:51 -07:00
Artur Souza 5cf8cb13f3
Bi-directional output binding + 'data' to refer to PubSub event (#289)
* Use 'data' to refer to pubsub payload.

* Add support for bi-directional output binding.
2020-05-31 20:59:04 -07:00
Charlie Stanley 8362c6347b
SDK update for breaking changes in dapr core. (#287)
* Update proto files for 0.8.0 release (#283)

* Bump dapr core to master

* Update integration tests for 0.8.0 proto changes

* Added unit tests to ensure StateOptions enums always map to their equivalent gRPC enums

* Remove some uneed comments/imports

* Update pub/sub subscription to match new route/metdata format (#278)

* Automatically initialize actor on first invocation (#284)

* Update integration tests to publish to more than one pubsub topic/route

* Bump dapr CLI version

* Remove uneeded interface and exception

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2020-05-28 18:42:01 -07:00
Artur Souza 31da242db2 Fix default GRPC port. 2020-05-06 10:43:06 -07:00
Artur Souza c48c8870c8 Upgrade the version to 0.6.0-SNAPSHOT 2020-05-05 11:09:30 -07:00
Artur Souza 7cf5f8b354
Update for proto from dapr runtime version 0.7 (#273) 2020-04-30 16:50:13 -07:00
Artur Souza 53adaa9ce8
Release 0.5.0-SNAPSHOT (#262) 2020-04-01 14:25:00 -07:00
Artur Souza 4611f40cb5
Springboot integration. (#256) 2020-03-30 09:49:31 -07:00
Artur Souza 46a1e5b8b4
Upgrade the version to 0.4.0-SNAPSHOT (#253) 2020-03-11 17:41:08 -07:00
Artur Souza 66b1cad71f
Support for GetSecret + ITs + sample. (#249) 2020-03-10 11:39:17 -07:00
Artur Souza 98ddaf5841
Fix hot monos in GRPC + unit tests. (#251) 2020-03-10 01:04:55 -07:00
Artur Souza 85e9d2de02
Setting GRPC as default protocol for non-actor APIs. (#239)
* Setting GRPC as default protocol for non-actor APIs.

* Fixes issues in GRPC client + ITs for both GRPC and HTTP.

* Update MethodInvokeIT.java
2020-02-18 10:55:14 -08:00
Artur Souza 1739391f2a
Upgrade the version to 0.3.0-SNAPSHOT (#232) 2020-02-12 11:55:34 -08:00
Artur Souza 4e6c55f94e
Enable findbugs + fixes sdk and sdk-actors. (#228) 2020-02-11 16:58:51 -08:00
Artur Souza 311875af7c
Remove special case for String in serializer + serialize state value "directly". (#225) 2020-02-10 11:55:02 -08:00
Yaron Schneider 93bb3b55d6
move from localhost to 127.0.0.1 (#213) 2020-02-05 12:13:16 -08:00
Artur Souza bbbd4be648
Add support for dapr 0.4 (multi-state store) (#199)
* Updating proto file from dapr.

* Adding support for multi-state store.

* Allow PubSubIT to get accept events out of order.

Co-authored-by: Shalabh Mohan Shrivastava <shalabhms@gmail.com>
2020-02-04 13:31:57 -08:00
Andres Robles af44053198
Creating documentation site (#197)
* Fixing java docs issues.

* Configuring site plugin, maven site:deploy goal will put all generated site inside the "docs" directory in the root of the local repo, changes will need to be manually pushed.

* Adding site to be deployed in github pages.

* Including link for javadocs in parent landing page, ignoring examples module.

* Updating documentation site to default o javadocs

* Configuring site plugin to only generate javadocs

* Deleting javadocs for modules

* Adding to GIT Ignore list directories for the javadocs for each module.
2020-02-04 12:51:54 -08:00
Artur Souza 24232eee08
Fix release due to missing javadocs + fix headers. (#195)
* Fixing release pipeline due to Nexus rules.

* Enforcing header and fixing missing header in files.
2020-01-31 18:26:59 -08:00
Artur Souza b2083187df
Add support for metadata in Bindings + fix serialization of output bi… (#186)
* Add support for metadata in Bindings + fix serialization of output binding."

* Remove generics from new bindings method.
2020-01-31 15:20:22 -08:00
Artur Souza 576b5c52ab
Remove unnecessary generic types. (#191) 2020-01-31 14:57:07 -08:00
Artur Souza 7510276a1b
Upgrading checkstyle version + fixing style. (#190)
Co-authored-by: Leon Mai <lemai@microsoft.com>
2020-01-31 14:38:16 -08:00
Juan Jose Herrera c487294143
Fix Metata for Invoke Method (#189) 2020-01-31 13:41:42 -08:00
Artur Souza 145326a70d
Fix issue where http client builder was always using default timeout. (#184) 2020-01-30 17:34:19 -08:00
Artur Souza 838224f18a
Use SDK in GRPC invoke + add more invoke overloads. (#176) 2020-01-30 13:44:03 -08:00
Andres Robles b7d6b1cc58
Renaming Adapters, to be just Clients for GRPC and HTTP (#179) 2020-01-30 13:05:42 -08:00
Leon Mai 313730c308
Fixes checkstyle in existing code and enables error on checkstyle warning (#172)
* checkstyle

* Fix checkstyle and enable build error on checkstyle warning

* Merge from master
2020-01-29 23:19:38 -08:00
Artur Souza 45fe471c48
Make serializers optional + javadocs about default serializers. (#168) 2020-01-29 11:18:29 -08:00
Artur Souza 0bdf939f91
Removing some dependencies after review. (#164)
Co-authored-by: Leon Mai <lemai@microsoft.com>
2020-01-29 10:09:45 -08:00
Andres Robles dfb3af58a1
Fixing Recursive call for delete state only with key (#166) 2020-01-29 09:10:51 -08:00
Artur Souza a40afafca4
Refactor IT into new jar + use JVM sytem properties (#156)
* Refactor IT into new jar + use JVM sytem properties

* Fixing ITs and silence flaky tests.

* Fix flaky tests.
2020-01-28 11:32:29 -08:00
dependabot[bot] d66a438bda Bump jackson-databind from 2.9.9 to 2.9.10.1 in /sdk (#155)
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.9.9 to 2.9.10.1.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-01-24 14:14:08 -08:00
Artur Souza cf68f24289
Java SDK with all features implemented for milestone 0.4 (#154)
* Basic Dapr HTTP Client for Actors.

* ActorTypeInformation with parsing logic + some stubs.

* Fixing license.

* Adding MethodContext + StateSerializer.

* Add ActorRuntime (#44)

* Add ActorRuntime

* split DaprAsyncClient hierarchy into 2 hierarchies for the different directions of communication

* Rename DaprClientBase to AbstractDaprClient

* Add ActorId

* Encapsulating async call in AbstractDaprClient as a single method. (#46)

* Add ActorMethodInfoMap (#47)

* Add ActorMethodInfoMap

* Add ConverterUtils class (#49)

* Add ConverterUtils + unit test

* Improved async call to okhttp. Former solution just wrapped a blocking call, now we using asynch call and collect the results via callbacks. Mono's are created based on the result. This make more efficient use of the resources since nothing is blocking now. Reformatted according new checkstyle (#48)

* More reformatting to 2 spaces indentation. (#50)

* Add ActorTimer and related (#51)

* Add ActorTimer and related

* cr

* ActorService + DaprStateProvider + some more. (#53)

* Faster JSON building + separate auto-gen jar + tests. (#55)

* closed the response objects and returning a string (#56)

* Add ReminderInfo (#54)

* Add ReminderInfo

* remove extra var

* More Actors Stuff (#57)

* ActorManager

* More work done.

* Adding example for actor runtime service.

* Implements ActorStateManager + fixes + javadocs.

* ActorProxy + some refactoring (#62)

* ActorManager

* More work done.

* Adding example for actor runtime service.

* Implements ActorStateManager + fixes + javadocs.

* Fix OrderManager example in order to process http 201
Change the implement the calls to DAPR using the class AbstractDaprClient because before the change the class always return Mono.Empty
Implementation of the ActorAsyncProxy
Change the name of the Actor Dapr Http Async Client

* Update code with the changes proposed by Artur in the code review

* Changes to support ActorProxy + Fixes.

Co-authored-by: Juan Jose Herrera <35985447+JuanJose-Herrera@users.noreply.github.com>

* Adding new methods for Http Client (#60)

* Adding new methods for Http Client

* Finishing implementation for HttpClient

* Adding JavaDoc and Changing return Type to new Methods

* Using ObjectSerializer and changing Constants values

* Adding gRPC client adapter, to encapsulate gRPC logic from the user (#61)

* Adding a common adapter to be exposed to users, for calling either the gRPC or the HTTP Clients.
Implementing gRPC adapter based on interface.
Moving ActorStateSerializer and renamed to be used as a generic utility for Serializing objects

* Creating a builder for the GrpcClient
Abstracting generic serialize and deserialize methods into a generic base class while leaving Actor specific stuff into the ActorStateSerializer class
Adding Javadocs

* Unit tests for ActorManager + fixes for Timer and Reminder. (#63)

* Add UnitTest to ActorProxyImpl and JaCoCo (coverage tool) implementation (#67)

* Change from unwrapMethodResponse to deserialize, because the response from an actor method is not wrapped in "Data" object
Add Unit test for the ActorProxy class

* #24 Implement more testing to the ActorProxyImpl and refactor how we manage the errors with Mono
#20 Add the coverage tool JaCoCo, the rules are commented at this moment in order to allow to execute the examples at this moment, if we enable the rules, the compilation fails.

* Enable rules for unit test coverage with a minimum of 0 in order to allow the developers to success compile, the minimum should be set to .8 before the projects ends

* Use the unwrapMethodResponse of the serilizer in order to deserilize actor responses.

* Reverting ActorProxyImpl.java

There is not need to change ActorProxyImpl since the previous change to not wrap it with the "data" structure was incorrect.

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Starting package to handle SpringBoot integration. (#69)

* Request body must be null on get for okhttp, empty body does not work… (#70)

* Request body must be null on get for okhttp, empty body does not work.  Also, expose the ActorStateManager methods that ought to be exposed to user.

* Make ctor package private and use equals for string compare

* Refactoring HTTP Client and creating Client HTTP Adapter (#68)

* Refactoring HTTP Client to follow same pattern as the GRPC Client.
Creating DaprClientHttpAdapter to be exposed to the users.
Refactor all uses of the http Client to use the adapter instead following composition rather than inheritance.
Dealing with conflicts

* Renaming AppToDaprHttpAsync to AppToDaprHttpAsyncClient changed previously by mistake

* Refactor Adapters to centralize all generic and actor specific functionality in the same place, having a single entry point for all communications to DAPR.
Leaving GRPC Adapter implemented, but without the possibility to create an instance of it.
Fixing Test cases

* Addressing PR comments

* PubSub + related fixes. (#71)

* Fixing issue regarding GET and DELETE method (#76)

* Unit tests for PubSub + JavaDocs. (#75)

* Invoke service + unit tests. (#78)

* Java sdk wip (#77)

* Fixing issue regarding GET and DELETE method

* Adding unit test for DaprHttp.java

* Adding test scope

* Renaming a property and fixing conflict to merge.

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* pubsub sample needs update for listener interface (#80)

* Fix bindings + add samples (#81)

* Fix binding and add samples

* Fix sample command line

* update comment for name change

* lowercase d matches runtime, though it looks like it is case insensitive

* Spliting Actor client and runtime into a separate jar. (#83)

* Unit testing + bug fixing in GRPC Adapter (#79)

* Adding mockito plugin to be able to mock final classes
Increasing test coverage for ObjectSerializer
Fixing bug in GRPC Adapter while creating the envelopes, found during unit testing.

* First step into returning Http Headers as part of the response for the DaprClientHttpAdapter
Updating State object to match the API.
Fixing Broken Unit Tests and increasing coverage for DaprClientGrpcAdapter

* Adding documentation, fixing typos and renaming support method to be more descriptive.

* Addressing PR comments
Increasing test coverage
Fixing Merge conflicts

* Addressing PR comments

* Addressing comments regarding where to build the query parameters forthe HTTP Client calls. (#84)

* Addressing comments regarding where to build the query parameters for the HTTP Client calls.

* Making map immutable while also preventing a NPE

* Fixing DaprHttp and its tests. (#93)

* Increasing test coverage for DaprClientGrpcAdapter (#94)

* Upload jacoco test coverage report to artifact storage (#95)

* set jacoco report output dir

* upload test report

* add dapr version info

* #26 Integretion Testing Initial Example (#74)

* #26 Add Hello World Integration Testing working on Windows, need work to work on MAC and Linux

* #26 Add new Integration Test to test DAPR state functionality

* #26 Add Hello World Integration Testing working on Windows, need work to work on MAC and Linux

* Update Integration Testing getting free ports automatically

* #26 Refractor to use a base class for all the integration tests

* #26 Make StateOptions as optional in order to not throw a null pointer exception

* #26 Remove empty lines and correct the ident

* Adding license to DaprIntegrationTestingRunner

Co-authored-by: Young Bu Park <youngp@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Fixing and finishing unit tests (#97)

* Fixing and finishing unit tests

* Fixing styling Issues and adding new test

* Unit tests for stateful actors + fixes. (#104)

* Receiving the StateOptions on save as part of the State, to comply with the DAPR API (#105)

* Receiving the StateOptions on save as part of the State, to comply with the DAPR API

* #26 Add integration test for Concurrency funtionality in the states module

Co-authored-by: Juan Jose Herrera <35985447+JuanJose-Herrera@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Deploy Jar packages to Nexus via CI (#106)

* Add SNAPSHOT suffix to version

* set deployment setup

* add ossrh  repostiory

* OSSRH setting

* add deployment steps

* exclude examples jar

* remove condition

* exclude spring boot pkg

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* deactivate should not call save (#108)

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Fixing bug, where call should be deferred instead of async (#102)

* Fixing bug, where call should be deferred instead of async

* Removing unused pool property
Returning null as response body if empty response is found.
Adding Test case for validating callback is executed when expected.

* Fixing assertion based on previous changes

* Adding test case to verify that the call to grpc only happens when the requestor block the thread, instead of in parallel immediately after calling the methods in the adapter.
Documenting complex test case

* Fixing merge conflicts

* Documenting complex test case

* Disable GPG sign by default (#111)

* [CD] Fix gpg private key import (#113)

* fix gpg key import process

* add GPG_TTY env setting

* revert

* rename dapr-sdk to dapr-actors

* fix

* Fix GPG plugin

* [CD] Conditional SNAPSHOT and final release (#115)

* Release pkg based on tag and branch

* Update build.yml

* Update build.yml

* Creating unit tests for HttpAdapter + Adding junit 5 dependency + Reformating code (#112)

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Removing springboot jar and adding some unit tests for ActorRuntime. (#114)

* Release SNAPSHOT pkg for every build (#118)

* Release SNAPSHOT build every build

* fix

* Fix sample (#119)

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Unit tests for actors, no state. (#117)

* actor unit tests, no state

clean up a bit

* Rename class

* Fix merge

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Moving io.dapr.runtime to test + fixing examples accordingly. (#121)

* mvn integration-test doesn't work w/o this plugin (#122)

* Resolving conflict for PR #110 (#130)

* Renaming State domain object.
Removing duplicate use of State Options.
Adding custom serialize and deserialize classes for StateOptions objects.

* #26 Refractor StateOptions to clean unused code

* Fixing merge issues.

* Fixing unit test for DaprClientHttpAdapterTest after refactoring.

Co-authored-by: Juan Jose Herrera <35985447+JuanJose-Herrera@users.noreply.github.com>

* Refactor StateOptions and add IT consistency testing (#110)

* Renaming State domain object.
Removing duplicate use of State Options.
Adding custom serialize and deserialize classes for StateOptions objects.

* #26 Refractor StateOptions to clean unused code

* Fixing merge issues.

* #26 Add integration test for states using Retry policies

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Fix IT issues, to run the integration test rember to add the parameter skipITs=false (#131)

* Addresses multiple items from design review (#124)

* Use byte[] for customer data and serialized data.
Fixes for actor demo.

* Simplifying ObjectSerializer + handling CloudEvent properly.

* Split DaprClient into 3 parts to hide actor APIs.

* Remove Actor "dummy" interface.

* Supports custom serializer.

* Change seriaizer to receive Object directly.

* Handling custom serialization in State APIs + enhancements to the state APIs.

* Addressing small comment on Mono chain in ActorManager.

* Make serializer mandatory, throwing exception when null.

* Fix arg parsing problem -Dexec.args= seems to not allow hyphens inside (#136)

* Fix bug in Actor due to timer serialization. (#139)

* Missing block (#140)

* Install local test kafka before running build and tests (#142)

* local test kafka docker-compose yaml

* add kafka install step

* Separate serializer for state. (#135)

* Add gRPC State Integration Test (#138)

* Add GRP State Integration Test

* Explain ignored test cases for GRPC

* Explain ignored test cases for GRPC

* Update DaprClientTestBuilder.java

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Actor Activation / Deactivation Integartion Test (#144)

* Adding common setup for starting dapr applications in Integration Tests.
Adding integration test for Actor Activation and Reactivation.

* Changing the way parameters are sent to the application running under Dapr in ITs to fix issue found in Ubuntu about wrong parsing.
Moving logic of the ActivationClient into the IT class

* Fixing compilation issues in test due to rebase from upstream.

* Addressing PR comments

* Adding more unit test to reach 80% Coverage (#149)

* Adding checkstyle + fix style in sdk-actos. (#146)

* Update debug instructions since LB is not needed. (#150)

* Add E2E testing for bindings (#148)

* Add GRP State Integration Test

* Explain ignored test cases for GRPC

* Explain ignored test cases for GRPC

* Update DaprClientTestBuilder.java

* Add binding E2E testing.

* Add fix binding E2E testing after merge with new changes

* Remove example comments

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Adding documentation for examples (#153)

Co-authored-by: Leon Mai <lemai@microsoft.com>
Co-authored-by: ji11er <57505038+ji11er@users.noreply.github.com>
Co-authored-by: Juan Jose Herrera <35985447+JuanJose-Herrera@users.noreply.github.com>
Co-authored-by: mestizoLopez <ing.javierlg@gmail.com>
Co-authored-by: Andres Robles <15348598+AndresRoblesMX@users.noreply.github.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
Co-authored-by: Marcos Reyes <59033058+marcosreyes05@users.noreply.github.com>
2020-01-24 12:49:56 -08:00
Artur Souza c3b7c41dfd
Remove . in description for pom.xml 2019-12-06 11:17:59 -08:00
Artur Souza b10a6fd039 Renames project to . Fixes examples. Adds proto files from release-0.3. 2019-12-05 18:30:13 -08:00