Skip to content

Add REST endpoints for Feast UI#878

Merged
feast-ci-bot merged 25 commits into
feast-dev:masterfrom
yeejian-tan:grpc-http
Aug 17, 2020
Merged

Add REST endpoints for Feast UI#878
feast-ci-bot merged 25 commits into
feast-dev:masterfrom
yeejian-tan:grpc-http

Conversation

@yeejian-tan

@yeejian-tan yeejian-tan commented Jul 14, 2020

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it: In preparation for Feast UI (#834), we
need REST endpoints for Feast UI to consume. This PR creates such endpoints.

The below HTTP endpoints have been added to Feast Core:

HTTP Endpoint Method Accept Query Parameters?
/api/v1/version GET No
/api/v1/projects GET No
/api/v1/feature-sets GET Yes
/api/v1/features GET Yes
/api/v1/feature-statistics GET Yes

For query parameters on specific endpoints, please refer to the javadoc on each
method on the controller.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:
Yes

The below HTTP endpoints have been added to Feast Core:

| HTTP Endpoint                | Method | Accept Query Parameters? |
|------------------------------|--------|--------------------------|
| `/api/v1/version`            | `GET`  | No                       |
| `/api/v1/projects`           | `GET`  | No                       |
| `/api/v1/feature-sets`       | `GET`  | Yes                      |
| `/api/v1/features`           | `GET`  | Yes                      |
| `/api/v1/feature-statistics` | `GET`  | Yes                      |

For query parameters on specific endpoints, please refer to the javadoc on each
method on the controller.

@Yanson

Yanson commented Jul 14, 2020

Copy link
Copy Markdown
Contributor

Do we really need a rest controller? How about grpc-web or grpc-gateway?

@woop

woop commented Jul 14, 2020

Copy link
Copy Markdown
Member

Do we really need a rest controller? How about grpc-web or grpc-gateway?

@Yanson I am a little bit conflicted myself on which approach to take. I originally asked @SwampertX to use grpc-gateway, but after some discussion we decided to implement this as a REST controller. The biggest reason being that we didn't want to maintain another proxy and keep it in sync with our APIs, and I wasn't sure how well a gRPC proxy would play with our auth setup.

I dont feel too strongly either way though. Right now the goal is just to get a REST endpoint up so that we can continue development on the UI, however that is done.

Is your concern around code maintenance or dependencies?

@Yanson

Yanson commented Jul 15, 2020

Copy link
Copy Markdown
Contributor

Is your concern around code maintenance or dependencies?

I'm not very opinionated on this as I haven't used either of my suggestions. It just seems like we might be creating work for ourselves and require maintaining parity with two sets of APIs.

I thought grpc-gateway was more automatic than you suggest, but my inclination would still have been to see if grpc-web gets us what we need (again, never used it myself).

Comment thread core/src/main/java/feast/core/grpc/CoreServiceResponseGenerator.java Outdated
@woop

woop commented Jul 15, 2020

Copy link
Copy Markdown
Member

Is your concern around code maintenance or dependencies?

I'm not very opinionated on this as I haven't used either of my suggestions. It just seems like we might be creating work for ourselves and require maintaining parity with two sets of APIs.

I thought grpc-gateway was more automatic than you suggest, but my inclination would still have been to see if grpc-web gets us what we need (again, never used it myself).

Well looking at the code right now it does seem like its way more verbose than I would have liked.

Comment thread core/src/main/java/feast/core/controller/CoreServiceRestController.java Outdated
Comment thread core/src/main/java/feast/core/controller/CoreServiceRestController.java Outdated
Comment thread core/src/main/java/feast/core/controller/CoreServiceRestController.java Outdated
Comment thread core/src/main/java/feast/core/controller/CoreServiceRestController.java Outdated
@yeejian-tan

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-batch

@yeejian-tan

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-auth

@yeejian-tan

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-batch-dataflow

Comment thread core/src/main/java/feast/core/controller/CoreServiceRestController.java Outdated
Comment thread core/src/main/java/feast/core/controller/CoreServiceRestController.java Outdated
Comment thread core/src/main/java/feast/core/controller/CoreServiceRestController.java Outdated
Comment thread core/src/main/java/feast/core/controller/CoreServiceRestController.java Outdated
@yeejian-tan yeejian-tan force-pushed the grpc-http branch 4 times, most recently from 6da46db to f666287 Compare July 23, 2020 04:56
@terryyylim

Copy link
Copy Markdown
Member

/test test-end-to-end-batch-dataflow

@terryyylim

Copy link
Copy Markdown
Member

/test test-end-to-end-batch

1 similar comment
@terryyylim

Copy link
Copy Markdown
Member

/test test-end-to-end-batch

@woop

woop commented Aug 17, 2020

Copy link
Copy Markdown
Member

/lgtm

@feast-ci-bot feast-ci-bot merged commit 7d8126b into feast-dev:master Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants