feast-dev / feast

The Open Source Feature Store for Machine Learning
https://feast.dev
Apache License 2.0
5.62k stars 1k forks source link

`feast serve_offline` displays no info logging #4639

Closed dandawg closed 4 weeks ago

dandawg commented 1 month ago

Expected Behavior

The feast serve_offline command (which launches a feast offline server process) should behave similar to the feast serve command, which displays helpful information, including the serving endpoint (host:port). The feast serve command shows info like the following:

[2024-10-16 19:14:32 -0600] [17832] [INFO] Starting gunicorn 22.0.0
[2024-10-16 19:14:32 -0600] [17832] [INFO] Listening at: http://127.0.0.1:6566 (17832)
[2024-10-16 19:14:32 -0600] [17832] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2024-10-16 19:14:32 -0600] [17863] [INFO] Booting worker with pid: 17863
[2024-10-16 19:14:32 -0600] [17863] [INFO] Started server process [17863]
[2024-10-16 19:14:32 -0600] [17863] [INFO] Waiting for application startup.
[2024-10-16 19:14:32 -0600] [17863] [INFO] Application startup complete.

And on shutdown, the feast serve command gives:

[2024-10-16 19:28:02 -0600] [17832] [INFO] Handling signal: int
[2024-10-16 19:28:02 -0600] [17863] [INFO] Shutting down
[2024-10-16 19:28:02 -0600] [17863] [INFO] Error while closing socket [Errno 9] Bad file descriptor
[2024-10-16 19:28:02 -0600] [17863] [INFO] Waiting for application shutdown.
[2024-10-16 19:28:02 -0600] [17863] [INFO] Application shutdown complete.
[2024-10-16 19:28:02 -0600] [17863] [INFO] Finished server process [17863]
[2024-10-16 19:28:02 -0600] [17832] [ERROR] Worker (pid:17863) was sent SIGINT!
[2024-10-16 19:28:02 -0600] [17832] [INFO] Shutting down: Master

Note: this issue may affect the registry server as well. I have not looked into that, but my expectation would be that all three servers should have logging at startup, during operation, and at shutdown.

Current Behavior

The feast serve_offline command just launches the process and displays no output but a blinking cursor. The user is left wondering if the server is ready, and what endpoint it is running on. There is also presumably no information to capture for logging to show for example, when the server started or shutdown.

Steps to reproduce

# setup temp feature store
feast init feature_store

cd feature_store/feature_repo
feast apply
# run the online server to see its behavior
# (after output you can kill with ctl-c)
feast serve

# run the offline server
# (observe that there is no output logged)
feast serve_offline

Specifications

Possible Solution

Add logging to feast serve_offline following the pattern of feast serve.

dmartinol commented 1 month ago

FYI, all of these messages come from the Uvicorn web server that we use in the online server, like this. Anyway, I agree we should try to be consistent with the information displayed to the user.

redhatHameed commented 4 weeks ago

@lokeshrangineni this can be closed based on your PR #4660

lokeshrangineni commented 4 weeks ago

PR is merged so we can close this ticket.