notebooks: use conf module for service endpoints instead of hardcoded URLs #136

Closed
opened 2026-03-23 23:41:18 +00:00 by kert · 0 comments
Owner

Problem

Notebooks have hardcoded service URLs:

  • nessie_tutorial.py:25 — NESSIE_API = "http://nessie:19120/api/v2"
  • polaris_tutorial.py:126 — "endpoint": "http://rustfs:9000"
  • sql_generator.py:35 — CATALOG = "homelab"

Fix

Notebooks can import from conf:

from conf import cfg
NESSIE_API = f"http://{cfg.lake.nessie.host}:{cfg.lake.nessie.port}/api/v2"

Or use os.environ.get() with defaults from stack.toml values. The [lake] section already has most of these.

Files

  • notebooks/nessie_tutorial.py
  • notebooks/polaris_tutorial.py
  • notebooks/sql_generator.py
  • Possibly add [lake.nessie.host] and [lake.nessie.port] to stack.toml
## Problem Notebooks have hardcoded service URLs: - `nessie_tutorial.py:25` — `NESSIE_API = "http://nessie:19120/api/v2"` - `polaris_tutorial.py:126` — `"endpoint": "http://rustfs:9000"` - `sql_generator.py:35` — `CATALOG = "homelab"` ## Fix Notebooks can import from `conf`: ```python from conf import cfg NESSIE_API = f"http://{cfg.lake.nessie.host}:{cfg.lake.nessie.port}/api/v2" ``` Or use `os.environ.get()` with defaults from `stack.toml` values. The `[lake]` section already has most of these. ## Files - `notebooks/nessie_tutorial.py` - `notebooks/polaris_tutorial.py` - `notebooks/sql_generator.py` - Possibly add `[lake.nessie.host]` and `[lake.nessie.port]` to `stack.toml`
kert added this to the P18: Config Consolidation — eliminate hardcoded values milestone 2026-03-23 23:41:18 +00:00
kert added the config label 2026-03-23 23:41:18 +00:00
kert closed this issue 2026-03-23 23:57:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#136