Repository: feast-dev/feast

Issue:
Unable to access data in Feast UI when deployed to remote instance
## Expected Behavior 
Should be able to view registry data when launching UI with `feast ui` on remote instances (like EC2).

## Current Behavior
I’ve tried setting the host to `0.0.0.0`  and the static assets get loaded and can accessed via the public IP. But the requests to the registry (`http://0.0.0.0:8888/registry`) fails, so no data shows up.

I've also tried setting the host to the private IP, but the request to `/registry` times out.

## Steps to reproduce
Run `feast ui --host <instance private ip>` in EC2 instance.

### Specifications

- Version:`0.21.2`
- Platform: EC2
- Subsystem:

## Possible Solution
Potential CORS issue that needs to be fixed?
Unable to access data in Feast UI when deployed to remote instance
## Expected Behavior 
Should be able to view registry data when launching UI with `feast ui` on remote instances (like EC2).

## Current Behavior
I’ve tried setting the host to `0.0.0.0`  and the static assets get loaded and can accessed via the public IP. But the requests to the registry (`http://0.0.0.0:8888/registry`) fails, so no data shows up.

I've also tried setting the host to the private IP, but the request to `/registry` times out.

## Steps to reproduce
Run `feast ui --host <instance private ip>` in EC2 instance.

### Specifications

- Version:`0.21.2`
- Platform: EC2
- Subsystem:

## Possible Solution
Potential CORS issue that needs to be fixed?


Discussion:
I'm having the same issue, caused by the hardcoded host:port in the `projects-list.json` file:

```
{
    "projects": [
        {
            "name": "Project",
            "description": "Test project",
            "id": <YOUR ID>,
            "registryPath": "http://0.0.0.0:8888/registry"
        }
    ]
}
```

When running the UI in k8s, the host should be set to `0.0.0.0` for routing to work, but of course it's not going to be reachable there. Same for the port, it thinks it's running at 8888, but in reality it's at 443.

I think there are two ways to fix this: make the registryPath a setting in the yaml file, or use a relative path instead of an absolute one.

edit: code responsible is here:  https://github.com/feast-dev/feast/blob/1c621fe3649900a59e85fe9c4f3840dd09bc88d0/sdk/python/feast/ui_server.py#L65
I'm having the same issue, caused by the hardcoded host:port in the `projects-list.json` file:

```
{
    "projects": [
        {
            "name": "Project",
            "description": "Test project",
            "id": <YOUR ID>,
            "registryPath": "http://0.0.0.0:8888/registry"
        }
    ]
}
```

When running the UI in k8s, the host should be set to `0.0.0.0` for routing to work, but of course it's not going to be reachable there. Same for the port, it thinks it's running at 8888, but in reality it's at 443.

I think there are two ways to fix this: make the registryPath a setting in the yaml file, or use a relative path instead of an absolute one.

edit: code responsible is here:  https://github.com/feast-dev/feast/blob/1c621fe3649900a59e85fe9c4f3840dd09bc88d0/sdk/python/feast/ui_server.py#L65

Resolving patch:
diff --git a/sdk/python/feast/ui_server.py b/sdk/python/feast/ui_server.py
--- a/sdk/python/feast/ui_server.py
+++ b/sdk/python/feast/ui_server.py
@@ -62,7 +62,7 @@ def shutdown_event():
                     "name": "Project",
                     "description": "Test project",
                     "id": project_id,
-                    "registryPath": f"http://{host}:{port}/registry",
+                    "registryPath": "/registry",
                 }
             ]
         }


Test patch: