Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ca818de
router for vertx that maps pojo's and thrift objects
nikhil-zlai Dec 6, 2024
b5a4fdb
ci for router
nikhil-zlai Dec 6, 2024
b3230f6
enum support
nikhil-zlai Dec 6, 2024
286d0fa
enum, map and list support
nikhil-zlai Dec 7, 2024
61e26bb
test fixes, better error handling
nikhil-zlai Dec 7, 2024
8bba81e
cleaned up redundant comments
nikhil-zlai Dec 7, 2024
6a3e713
a few todos
nikhil-zlai Dec 7, 2024
b62d877
readme
nikhil-zlai Dec 7, 2024
e28ec33
lint
nikhil-zlai Dec 7, 2024
2e7c6ed
support for binary serialization
nikhil-zlai Dec 7, 2024
5b5c145
docs for binary serialization
nikhil-zlai Dec 8, 2024
e27b9c8
docs for javascript usage
nikhil-zlai Dec 8, 2024
39b9259
map validation + formatting
nikhil-zlai Dec 8, 2024
12683c9
caching setters
nikhil-zlai Dec 8, 2024
65846d7
coderabbit nits
nikhil-zlai Dec 9, 2024
cc9ab7f
Build config for aggregator module
kumar-zlai Jan 9, 2025
c22461a
Minor fix to change naming convention for api module targets
kumar-zlai Jan 9, 2025
0d8c084
Initial partial commit with CatalystHelper renaming
kumar-zlai Jan 9, 2025
6d6dd6a
Initial partial commit with CatalystHelper renaming
kumar-zlai Jan 9, 2025
7160500
Minor fix to update the naming convention for thrift targets
kumar-zlai Jan 9, 2025
b8d54e8
Partial commit with build config to merge changes from main
kumar-zlai Jan 9, 2025
fd4163a
Merge branch 'kumarteja/bazel-build' into kumarteja/online-bazel-migr…
kumar-zlai Jan 9, 2025
6f3def4
working bazel build config for online module
kumar-zlai Jan 9, 2025
d4e34ee
Merge branch 'main' into kumarteja/online-bazel-migration
kumar-zlai Jan 9, 2025
e13ac8a
Minor changes to cleanup unused imports
kumar-zlai Jan 9, 2025
cb2b3fd
minor scalafixAll changes
kumar-zlai Jan 9, 2025
add315d
All spark targets working
kumar-zlai Jan 10, 2025
5fea6d9
Initial working version with all spark targets
kumar-zlai Jan 10, 2025
76c6f62
Merged with main branch
kumar-zlai Jan 10, 2025
cae2d80
Minor clean up of unused dependencies
kumar-zlai Jan 10, 2025
0c8a955
Modified logging implementation dependency to match out sbt config
kumar-zlai Jan 10, 2025
feed133
merging with latest head
kumar-zlai Jan 14, 2025
e2acf6d
renamed to service_common package to avoid conflict with src root dir…
kumar-zlai Jan 14, 2025
c593729
Rename the service_common package back to service
Jan 15, 2025
91d6d9e
Addressed PR comments around handling response types
Jan 15, 2025
28d638e
Minor change to remove todo which is no longer needed
Jan 15, 2025
da2ff7f
Merge branch 'main' into kumarteja/spark-bazel-migration
kumar-zlai Jan 15, 2025
9983609
Merge branch 'mead' into kumarteja/service-commons-bazel-migration
kumar-zlai Jan 15, 2025
1b2ed5b
Merge branch 'mead' into kumarteja/service-commons-bazel-migration
kumar-zlai Jan 15, 2025
c545cc5
Initial working version along with unit tests
kumar-zlai Jan 15, 2025
6630965
Merge branch 'main' into kumarteja/service-commons-bazel-migration
kumar-zlai Jan 15, 2025
13182dd
Initial working version for src lib, tests pending
kumar-zlai Jan 16, 2025
678a67c
merged with latest main branch
kumar-zlai Jan 16, 2025
9dd1e09
test-lib build still not working
kumar-zlai Jan 16, 2025
da2b57c
Merged service_commons bazel migration branch
kumar-zlai Jan 17, 2025
e209d0f
Initial working version with unit tests
kumar-zlai Jan 17, 2025
3076062
unit tests build working
kumar-zlai Jan 17, 2025
f449cbf
Merged with latest main branch
kumar-zlai Jan 17, 2025
2e8fa95
Merged with latest main branch
kumar-zlai Jan 17, 2025
6841534
Merged with latest main branch
kumar-zlai Jan 17, 2025
f9b79d9
Merged with flink module changes to resolve conflicts later
kumar-zlai Jan 17, 2025
d622f3f
Merged with latest main
kumar-zlai Jan 21, 2025
49f0c0c
Minor refactoring to remove duplicate test dependency declaration
kumar-zlai Jan 21, 2025
3099a04
Minor type in variable name
kumar-zlai Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions service/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
vertx_deps = [
maven_artifact("io.vertx:vertx-core"),
maven_artifact("io.vertx:vertx-web"),
maven_artifact("io.vertx:vertx-web-client"),
maven_artifact("io.vertx:vertx-config"),
maven_artifact("io.vertx:vertx-micrometer-metrics"),
]

vertx_test_deps = [
# Libraries
maven_artifact("io.vertx:vertx-core"),
maven_artifact("io.vertx:vertx-web"),
maven_artifact("io.vertx:vertx-web-client"),
# Testing
maven_artifact("io.vertx:vertx-junit5"),
maven_artifact("io.vertx:vertx-unit"),
]

java_library(
name = "lib",
srcs = glob(["src/main/**/*.java"]),
visibility = ["//visibility:public"],
deps = _SCALA_DEPS + vertx_deps + [
"//online:lib",
"//service_commons:lib",
maven_artifact("ch.qos.logback:logback-classic"),
maven_artifact("com.typesafe:config"),
maven_artifact("io.netty:netty-all"),
maven_artifact("io.micrometer:micrometer-registry-statsd"),
maven_artifact("io.micrometer:micrometer-core"),
maven_artifact("com.fasterxml.jackson.core:jackson-annotations"),
maven_artifact("com.fasterxml.jackson.core:jackson-core"),
maven_artifact("com.fasterxml.jackson.core:jackson-databind"),
maven_artifact("org.slf4j:slf4j-api"),
scala_artifact("org.json4s:json4s-core"),
],
)

test_deps = vertx_test_deps + [
":lib",
"//online:lib",
"//service_commons:lib",
maven_artifact("org.mockito:mockito-core"),
maven_artifact("org.junit.jupiter:junit-jupiter-api"),
maven_artifact("junit:junit"),
maven_artifact("org.junit.platform:junit-platform-launcher"),
maven_artifact("org.junit.platform:junit-platform-reporting"),
]

java_library(
name = "test-lib",
srcs = glob(["src/test/**/*.java"]),
visibility = ["//visibility:public"],
deps = test_deps,
)

java_test_suite(
name = "test",
srcs = glob(["src/test/**/*.java"]),
visibility = ["//visibility:public"],
runner = "junit5",
deps = test_deps + [":test-lib"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ public void testSuccessfulSingleRequest(TestContext context) {

Map<String, Object> keys = Collections.singletonMap("user_id", "123");
JavaRequest request = new JavaRequest(TEST_GROUP_BY, keys);
Map<String, Object> featureMap = new HashMap<String, Object>() {{
put("feature_1", 12);
put("feature_2", 23.3);
put("feature_3", "USD");
}};
Map<String, Object> featureMap = Map.of(
"feature_1", 12,
"feature_2", 23.3,
"feature_3", "USD"
);
JTry<Map<String, Object>> values = JTry.success(featureMap);
JavaResponse mockResponse = new JavaResponse(request, values);

Expand Down Expand Up @@ -177,27 +177,27 @@ public void testSuccessfulMultipleRequests(TestContext context) {
Map<String, Object> keys2 = Collections.singletonMap("user_id", "456");
JavaRequest request2 = new JavaRequest(TEST_GROUP_BY, keys2);

Map<String, Object> featureMap1 = new HashMap<String, Object>() {{
put("feature_1", 12);
put("feature_2", 23.3);
put("feature_3", "USD");
}};
Map<String, Object> featureMap1 = Map.of(
"feature_1", 12,
"feature_2", 23.3,
"feature_3", "USD"
);

Map<String, Object> featureMap2 = new HashMap<String, Object>() {{
put("feature_1", 24);
put("feature_2", 26.3);
put("feature_3", "CAD");
}};
Map<String, Object> featureMap2 = Map.of(
"feature_1", 24,
"feature_2", 26.3,
"feature_3", "CAD"
);

JTry<Map<String, Object>> values1 = JTry.success(featureMap1);
JTry<Map<String, Object>> values2 = JTry.success(featureMap2);
JavaResponse mockResponse1 = new JavaResponse(request1, values1);
JavaResponse mockResponse2 = new JavaResponse(request2, values2);

List<JavaResponse> mockResponseList = new ArrayList<JavaResponse>() {{
add(mockResponse1);
add(mockResponse2);
}};
List<JavaResponse> mockResponseList = List.of(
mockResponse1,
mockResponse2
);
CompletableFuture<List<JavaResponse>> futureResponse =
CompletableFuture.completedFuture(mockResponseList);
when(mockFetcher.fetchJoin(anyList())).thenReturn(futureResponse);
Expand All @@ -219,10 +219,10 @@ public void testSuccessfulMultipleRequests(TestContext context) {
GetFeaturesResponse.Result expectedResult1 = GetFeaturesResponse.Result.builder().status(Success).entityKeys(keys1).features(featureMap1).build();
GetFeaturesResponse.Result expectedResult2 = GetFeaturesResponse.Result.builder().status(Success).entityKeys(keys2).features(featureMap2).build();

List<GetFeaturesResponse.Result> expectedResultList = new ArrayList<GetFeaturesResponse.Result>() {{
add(expectedResult1);
add(expectedResult2);
}};
List<GetFeaturesResponse.Result> expectedResultList = List.of(
expectedResult1,
expectedResult2
);
validateSuccessfulResponse(actualResponse, expectedResultList, context);
async.complete();
});
Expand All @@ -242,21 +242,21 @@ public void testPartialSuccessfulRequests(TestContext context) {
Map<String, Object> keys2 = Collections.singletonMap("user_id", "456");
JavaRequest request2 = new JavaRequest(TEST_GROUP_BY, keys2);

Map<String, Object> featureMap = new HashMap<String, Object>() {{
put("feature_1", 12);
put("feature_2", 23.3);
put("feature_3", "USD");
}};
Map<String, Object> featureMap = Map.of(
"feature_1", 12,
"feature_2", 23.3,
"feature_3", "USD"
);

JTry<Map<String, Object>> values1 = JTry.success(featureMap);
JTry<Map<String, Object>> values2 = JTry.failure(new RuntimeException("some failure!"));
JavaResponse mockResponse1 = new JavaResponse(request1, values1);
JavaResponse mockResponse2 = new JavaResponse(request2, values2);

List<JavaResponse> mockResponseList = new ArrayList<JavaResponse>() {{
add(mockResponse1);
add(mockResponse2);
}};
List<JavaResponse> mockResponseList = List.of(
mockResponse1,
mockResponse2
);
CompletableFuture<List<JavaResponse>> futureResponse =
CompletableFuture.completedFuture(mockResponseList);
when(mockFetcher.fetchJoin(anyList())).thenReturn(futureResponse);
Expand All @@ -277,10 +277,10 @@ public void testPartialSuccessfulRequests(TestContext context) {
JsonObject actualResponse = new JsonObject(responseCaptor.getValue());
GetFeaturesResponse.Result expectedResult1 = GetFeaturesResponse.Result.builder().status(Success).entityKeys(keys1).features(featureMap).build();
GetFeaturesResponse.Result expectedResult2 = GetFeaturesResponse.Result.builder().status(Failure).entityKeys(keys2).error("some failure!").build();
List<GetFeaturesResponse.Result> expectedResultList = new ArrayList<GetFeaturesResponse.Result>() {{
add(expectedResult1);
add(expectedResult2);
}};
List<GetFeaturesResponse.Result> expectedResultList = List.of(
expectedResult1,
expectedResult2
);
validateSuccessfulResponse(actualResponse, expectedResultList, context);
async.complete();;
});
Expand Down
1 change: 1 addition & 0 deletions tools/build_rules/dependencies/maven_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ maven_repository = repository(
"io.vertx:vertx-config:4.5.10",
"io.vertx:vertx-micrometer-metrics:4.5.10",
"io.vertx:vertx-junit5:4.5.10",
"io.vertx:vertx-unit:4.5.10",
],
overrides = {
},
Expand Down