feast-dev / feast

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

feast ui does not work on proxy subpath #3481

Open jiewpeng opened 1 year ago

jiewpeng commented 1 year ago

Expected Behavior

Feast UI should work when it is served behind a proxy, on a subpath e.g. /feast-ui

Current Behavior

Parts of the feast UI works behind a subpath, but not entirely (nothing is displayed, just the feast logo with a "404" text - refer to screenshot). No requests in the network tab of the web browser are hitting 404.

image

Steps to reproduce

Serve feast UI as you would e.g. feature_store.serve_ui(), optionally passing in the root_path parameter (it does not help).

Set up an nginx pod with the following configuration (i.e. the nginx pod should have /etc/nginx/conf.d/default.conf with the following contents - dummy_project is the project name, and http://feast-ui-service:8080 is where the feast UI can be accessed from your nginx pod / container):

server {
  listen 80 default_server;

  location = /feast-ui/ {
      rewrite (.*) /feast-ui/p/dummy_project permanent;
  }

  location /feast-ui/ {
      proxy_pass http://feast-ui-service:8080/;
  }

  location / {
      proxy_pass http://feast-ui-service:8080/;
  }
}

This configuration works on localhost when nginx can listen on the root path /. However, note that the URL after all the redirects is wrong (it does not have the prefix).

Ideally, if the feast ui app is capable of being served on a subpath, only the second location block should be required in the nginx configuration. The first and third location blocks are workarounds.

Specifications

Possible Solution

The app should redirect to relative and not absolute paths

sudohainguyen commented 1 year ago

I have done it successfully for my project with extra customizations, feel free to ping me to discuss more

MansoorSyed1311 commented 1 year ago

still this error is encountering what is the possible solution for this error @sudohainguyen

simonrouse9461 commented 1 year ago

@sudohainguyen This is still not working for me. My Feast version is 0.31.1 on Amazon Linux 2, and I'm using --root_path flag, but none of the links in the returned html is prefixed with the root path. Could you share some more details about your extra customizations? Do we need some specific customizations to make it work?

Also, can someone reopen this issue?

bennfocus commented 12 months ago

Same here as @simonrouse9461 described, the --root_path didn't work.

@sudohainguyen What did you do to make it work?

Gsbreddy commented 3 months ago

Same here as @simonrouse9461 described, the --root_path didn't work.

@sudohainguyen What did you do to make it work?

boumelhaa commented 1 week ago

Guys, do we have an update on this issue, the --root_path doesn't seem to solve it