Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Merge branch 'feast-dev:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ZF Deng authored Jan 19, 2022
2 parents eeae3db + 1f3a595 commit dd70821
Show file tree
Hide file tree
Showing 68 changed files with 1,394 additions and 1,167 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
labels: 'kind/bug, priority/p2'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: 'kind/feature'
assignees: ''

---
Expand Down
126 changes: 0 additions & 126 deletions .prow.yaml
Original file line number Diff line number Diff line change
@@ -1,102 +1,4 @@
presubmits:
- name: test-core-and-ingestion
decorate: true
spec:
containers:
- image: maven:3.6-jdk-11
command: ["infra/scripts/test-java-core-ingestion.sh"]
resources:
requests:
cpu: "2000m"
memory: "1536Mi"
skip_branches:
- ^v0\.(3|4)-branch$

- name: test-core-and-ingestion-java-8
decorate: true
always_run: true
spec:
containers:
- image: maven:3.6-jdk-8
command: ["infra/scripts/test-java-core-ingestion.sh"]
resources:
requests:
cpu: "2000m"
memory: "1536Mi"
branches:
- ^v0\.(3|4)-branch$

- name: test-serving
decorate: true
spec:
containers:
- image: maven:3.6-jdk-11
command: ["infra/scripts/test-java-serving.sh"]
skip_branches:
- ^v0\.(3|4)-branch$

- name: test-serving-java-8
decorate: true
always_run: true
spec:
containers:
- image: maven:3.6-jdk-8
command: ["infra/scripts/test-java-serving.sh"]
branches:
- ^v0\.(3|4)-branch$

- name: test-java-sdk
decorate: true
spec:
containers:
- image: maven:3.6-jdk-11
command: ["infra/scripts/test-java-sdk.sh"]
skip_branches:
- ^v0\.(3|4)-branch$

- name: test-java-sdk-java-8
decorate: true
always_run: true
spec:
containers:
- image: maven:3.6-jdk-8
command: ["infra/scripts/test-java-sdk.sh"]
branches:
- ^v0\.(3|4)-branch$

- name: test-golang-sdk
decorate: true
spec:
containers:
- image: golang:1.13
command: ["infra/scripts/test-golang-sdk.sh"]

postsubmits:
- name: publish-python-sdk
decorate: true
spec:
containers:
- image: python:3
command:
- sh
- -c
- |
make package-protos && make compile-protos-python && infra/scripts/publish-python-sdk.sh \
--directory-path sdk/python --repository pypi
volumeMounts:
- name: pypirc
mountPath: /root/.pypirc
subPath: .pypirc
readOnly: true
volumes:
- name: pypirc
secret:
secretName: pypirc
branches:
# Filter on tags with semantic versioning, prefixed with "v"
# https://github.com/semver/semver/issues/232
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$

- name: publish-java-sdk
decorate: true
spec:
Expand Down Expand Up @@ -128,31 +30,3 @@ postsubmits:
branches:
# Filter on tags with semantic versioning, prefixed with "v".
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$

- name: publish-java-8-sdk
decorate: true
spec:
containers:
- image: maven:3.6-jdk-8
command:
- bash
- -c
- infra/scripts/publish-java-sdk.sh --revision ${PULL_BASE_REF:1}
volumeMounts:
- name: gpg-keys
mountPath: /etc/gpg
readOnly: true
- name: maven-settings
mountPath: /root/.m2/settings.xml
subPath: settings.xml
readOnly: true
volumes:
- name: gpg-keys
secret:
secretName: gpg-keys
- name: maven-settings
secret:
secretName: maven-settings
branches:
# Filter on tags with semantic versioning, prefixed with "v". v0.3 and v0.4 only.
- ^v0\.(3|4)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ require (
go.opencensus.io v0.22.3 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d
golang.org/x/tools v0.1.7 // indirect
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
golang.org/x/tools v0.1.8 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/grpc v1.29.1
google.golang.org/protobuf v1.27.1 // indirect
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
Expand Down Expand Up @@ -386,6 +387,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I=
Expand Down Expand Up @@ -415,6 +417,7 @@ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -454,6 +457,7 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
Expand All @@ -464,6 +468,7 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -525,6 +530,8 @@ golang.org/x/tools v0.0.0-20201124005743-911501bfb504 h1:jOKV2ysikH1GANB7t2Lotmh
golang.org/x/tools v0.0.0-20201124005743-911501bfb504/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@

import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.protobuf.Timestamp;
import feast.common.logging.entry.LogResource.ResourceType;
import feast.proto.serving.ServingAPIProto;
import feast.proto.serving.ServingAPIProto.FeatureReferenceV2;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FieldValues;
import feast.proto.types.ValueProto.Value;
import io.grpc.Status;
import java.util.Arrays;
Expand All @@ -50,15 +51,24 @@ public List<AuditLogEntry> getTestAuditLogs() {

GetOnlineFeaturesResponse responseSpec =
GetOnlineFeaturesResponse.newBuilder()
.addAllFieldValues(
.setMetadata(
ServingAPIProto.GetOnlineFeaturesResponseMetadata.newBuilder()
.setFeatureNames(
ServingAPIProto.FeatureList.newBuilder()
.addAllVal(
Arrays.asList(
"featuretable_1:feature_1", "featuretable_1:feature2"))))
.addAllResults(
Arrays.asList(
FieldValues.newBuilder()
.putFields(
"featuretable_1:feature_1", Value.newBuilder().setInt32Val(32).build())
GetOnlineFeaturesResponse.FeatureVector.newBuilder()
.addValues(Value.newBuilder().setInt32Val(32).build())
.addStatuses(ServingAPIProto.FieldStatus.PRESENT)
.addEventTimestamps(Timestamp.newBuilder().build())
.build(),
FieldValues.newBuilder()
.putFields(
"featuretable_1:feature2", Value.newBuilder().setInt32Val(64).build())
GetOnlineFeaturesResponse.FeatureVector.newBuilder()
.addValues(Value.newBuilder().setInt32Val(64).build())
.addStatuses(ServingAPIProto.FieldStatus.PRESENT)
.addEventTimestamps(Timestamp.newBuilder().build())
.build()))
.build();

Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

<grpc.version>1.30.2</grpc.version>
<protoc.version>3.12.2</protoc.version>
<protobuf.version>3.12.2</protobuf.version>
<protobuf.version>3.16.1</protobuf.version>
<spring.boot.version>2.3.1.RELEASE</spring.boot.version>
<spring.version>5.2.7.RELEASE</spring.version>
<spring.security.version>5.3.0.RELEASE</spring.security.version>
Expand Down
4 changes: 2 additions & 2 deletions java/sdk/java/src/main/java/dev/feast/FeastClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest;
import feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseV2;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse;
import feast.proto.serving.ServingServiceGrpc;
import feast.proto.serving.ServingServiceGrpc.ServingServiceBlockingStub;
import feast.proto.types.ValueProto;
Expand Down Expand Up @@ -129,7 +129,7 @@ public List<Row> getOnlineFeatures(List<String> featureRefs, List<Row> entities)

requestBuilder.putAllEntities(getEntityValuesMap(entities));

GetOnlineFeaturesResponseV2 response = stub.getOnlineFeatures(requestBuilder.build());
GetOnlineFeaturesResponse response = stub.getOnlineFeatures(requestBuilder.build());

List<Row> results = Lists.newArrayList();
if (response.getResultsCount() == 0) {
Expand Down
14 changes: 7 additions & 7 deletions java/sdk/java/src/test/java/dev/feast/FeastClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import feast.proto.serving.ServingAPIProto;
import feast.proto.serving.ServingAPIProto.FieldStatus;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseV2;
import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse;
import feast.proto.serving.ServingServiceGrpc.ServingServiceImplBase;
import feast.proto.types.ValueProto;
import feast.proto.types.ValueProto.Value;
Expand Down Expand Up @@ -57,7 +57,7 @@ public class FeastClientTest {
@Override
public void getOnlineFeatures(
GetOnlineFeaturesRequest request,
StreamObserver<GetOnlineFeaturesResponseV2> responseObserver) {
StreamObserver<GetOnlineFeaturesResponse> responseObserver) {
if (!request.equals(FeastClientTest.getFakeRequest())) {
responseObserver.onError(Status.FAILED_PRECONDITION.asRuntimeException());
}
Expand Down Expand Up @@ -137,22 +137,22 @@ private static GetOnlineFeaturesRequest getFakeRequest() {
.build();
}

private static GetOnlineFeaturesResponseV2 getFakeResponse() {
return GetOnlineFeaturesResponseV2.newBuilder()
private static GetOnlineFeaturesResponse getFakeResponse() {
return GetOnlineFeaturesResponse.newBuilder()
.addResults(
GetOnlineFeaturesResponseV2.FeatureVector.newBuilder()
GetOnlineFeaturesResponse.FeatureVector.newBuilder()
.addValues(strValue("david"))
.addStatuses(FieldStatus.PRESENT)
.addEventTimestamps(Timestamp.newBuilder())
.build())
.addResults(
GetOnlineFeaturesResponseV2.FeatureVector.newBuilder()
GetOnlineFeaturesResponse.FeatureVector.newBuilder()
.addValues(intValue(3))
.addStatuses(FieldStatus.PRESENT)
.addEventTimestamps(Timestamp.newBuilder())
.build())
.addResults(
GetOnlineFeaturesResponseV2.FeatureVector.newBuilder()
GetOnlineFeaturesResponse.FeatureVector.newBuilder()
.addValues(Value.newBuilder().build())
.addStatuses(FieldStatus.NULL_VALUE)
.addEventTimestamps(Timestamp.newBuilder())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public void getFeastServingInfo(
@Override
public void getOnlineFeatures(
ServingAPIProto.GetOnlineFeaturesRequest request,
StreamObserver<ServingAPIProto.GetOnlineFeaturesResponseV2> responseObserver) {
StreamObserver<ServingAPIProto.GetOnlineFeaturesResponse> responseObserver) {
try {
// authorize for the project in request object.
RequestHelper.validateOnlineRequest(request);
Span span = tracer.buildSpan("getOnlineFeaturesV2").start();
ServingAPIProto.GetOnlineFeaturesResponseV2 onlineFeatures =
ServingAPIProto.GetOnlineFeaturesResponse onlineFeatures =
servingServiceV2.getOnlineFeatures(request);
if (span != null) {
span.finish();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public GetFeastServingInfoResponse getInfo() {
public List<Map<String, Object>> getOnlineFeatures(
@RequestBody ServingAPIProto.GetOnlineFeaturesRequest request) {
RequestHelper.validateOnlineRequest(request);
ServingAPIProto.GetOnlineFeaturesResponseV2 onlineFeatures =
ServingAPIProto.GetOnlineFeaturesResponse onlineFeatures =
servingService.getOnlineFeatures(request);
return mapGetOnlineFeaturesResponse(onlineFeatures);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void getFeastServingInfo(
@Override
public void getOnlineFeatures(
ServingAPIProto.GetOnlineFeaturesRequest request,
StreamObserver<ServingAPIProto.GetOnlineFeaturesResponseV2> responseObserver) {
StreamObserver<ServingAPIProto.GetOnlineFeaturesResponse> responseObserver) {
responseObserver.onNext(this.servingServiceV2.getOnlineFeatures(request));
responseObserver.onCompleted();
}
Expand Down
Loading

0 comments on commit dd70821

Please sign in to comment.