flyrain commented on code in PR #82:
URL: https://github.com/apache/polaris-tools/pull/82#discussion_r2583063358
##########
mcp-server/README.md:
##########
@@ -65,20 +62,23 @@ Please note: `--directory` specifies a local directory. It
is not needed when we
## Configuration
-| Variable | Description
| Default
|
-|----------------------------------------------------------------|----------------------------------------------------------------|--------------------------------------------------|
-| `POLARIS_BASE_URL` | Base URL
for all Polaris REST calls. |
`http://localhost:8181/` |
-| `POLARIS_API_TOKEN` / `POLARIS_BEARER_TOKEN` / `POLARIS_TOKEN` | Static
bearer token (if supplied, overrides other auth). | _unset_
|
-| `POLARIS_CLIENT_ID` | OAuth
client id for client-credential flow. | _unset_
|
-| `POLARIS_CLIENT_SECRET` | OAuth
client secret. | _unset_
|
-| `POLARIS_TOKEN_SCOPE` | OAuth scope
string. | _unset_
|
-| `POLARIS_TOKEN_URL` | Optional
override for the token endpoint URL. |
`${POLARIS_BASE_URL}api/catalog/v1/oauth/tokens` |
-| `POLARIS_TOKEN_REFRESH_BUFFER_SECONDS` | Minimum
remaining token lifetime before refreshing in seconds. | `60.0`
|
-| `POLARIS_HTTP_TIMEOUT_SECONDS` | Default
timeout in seconds for all HTTP requests. | `30.0`
|
-| `POLARIS_HTTP_CONNECT_TIMEOUT_SECONDS` | Timeout in
seconds for establishing HTTP connections. | `30.0`
|
-| `POLARIS_HTTP_READ_TIMEOUT_SECONDS` | Timeout in
seconds for reading HTTP responses. | `30.0`
|
-| `POLARIS_HTTP_RETRIES_TOTAL` | Total
number of retries for HTTP requests. | `3`
|
-| `POLARIS_HTTP_RETRIES_BACKOFF_FACTOR` | Factor for
exponential backoff between retries. | `0.5`
|
+| Variable | Description
| Default
|
+|----------------------------------------------------------------|------------------------------------------------------------------|--------------------------------------------------|
+| `POLARIS_BASE_URL` | Base URL
for all Polaris REST calls. |
`http://localhost:8181/` |
+| `POLARIS_API_TOKEN` / `POLARIS_BEARER_TOKEN` / `POLARIS_TOKEN` | Static
bearer token (if supplied, overrides other auth). | _unset_
|
+| `POLARIS_CLIENT_ID` | OAuth
client id for client-credential flow. | _unset_
|
+| `POLARIS_CLIENT_SECRET` | OAuth
client secret. | _unset_
|
+| `POLARIS_TOKEN_SCOPE` | OAuth scope
string. | _unset_
|
+| `POLARIS_TOKEN_URL` | Optional
override for the token endpoint URL. |
`${POLARIS_BASE_URL}api/catalog/v1/oauth/tokens` |
+| `POLARIS_TOKEN_REFRESH_BUFFER_SECONDS` | Minimum
remaining token lifetime before refreshing in seconds. | `60.0`
|
+| `POLARIS_HTTP_TIMEOUT_SECONDS` | Default
timeout in seconds for all HTTP requests. | `30.0`
|
+| `POLARIS_HTTP_CONNECT_TIMEOUT_SECONDS` | Timeout in
seconds for establishing HTTP connections. | `30.0`
|
+| `POLARIS_HTTP_READ_TIMEOUT_SECONDS` | Timeout in
seconds for reading HTTP responses. | `30.0`
|
+| `POLARIS_HTTP_RETRIES_TOTAL` | Total
number of retries for HTTP requests. | `3`
|
+| `POLARIS_HTTP_RETRIES_BACKOFF_FACTOR` | Factor for
exponential backoff between retries. | `0.5`
|
+| `POLARIS_CONFIG_FILE` | Path to a
configuration file containing configuration variables. | `.env` in current
working directory |
Review Comment:
nit: can we set the default name to be more specific like `.polaris_mcp.env`
to avoid any conflict and be more descriptive?
##########
mcp-server/polaris_mcp/server.py:
##########
@@ -540,6 +541,10 @@ def _resolve_package_version() -> str:
def main() -> None:
"""Script entry point."""
+ # Load configuration from file if specified, otherwise look for .env
Review Comment:
nit: I guess this comment isn't necessary, as the code is quite expressive
already.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]