Skip to content

fix(registry): prefer configured registry volume over legacy session defaults - #122

Open
bcastelino wants to merge 1 commit into
databrickslabs:developfrom
bcastelino:fix/registry-config-precedence
Open

fix(registry): prefer configured registry volume over legacy session defaults#122
bcastelino wants to merge 1 commit into
databrickslabs:developfrom
bcastelino:fix/registry-config-precedence

Conversation

@bcastelino

@bcastelino bcastelino commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Registry configuration resolution now treats environment/settings values (registry_catalog, registry_schema, registry_volume) as authoritative in the last-resort fallback of RegistryCfg.from_domain, using legacy per-session domain.settings["registry"] values only when the configured values are unset. Previously the order was inverted (reg.get(...) or settings...), so a stale session value could shadow the configured environment — local Registry init kept selecting the legacy OntoBricksRegistry default even with REGISTRY_VOLUME=ontology loaded, causing binary-archive paths and Delta views to resolve against the wrong Volume when no bound Volume or Lakebase registry row was present.

Linked Issue / milestone

N/A

Plan

N/A, single-file precedence fix with regression coverage.

Type of change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — no behaviour change
  • test — tests only
  • perf — perf improvement
  • ci / build / chore — tooling

Author checklist

  • Conventional Commit PR title (<type>(<scope>): <subject>).
  • changelogs/<today>.log updated with title + context + numbered changes + files + test result.
  • Tests added or modified for every behaviour change.
  • uv run pytest tests/<scope>/ green locally.
  • pre-commit run --all-files clean (or skipped hooks documented).
  • If src/agents/** or any MLflow-traced LLM path changed: N/A — no agent/LLM paths touched.
  • If src/mcp-server/** changed: N/A — no MCP changes.
  • No gsd-* references re-introduced.

MLflow eval run

N/A, not an agent PR.

Test plan

  • python -m pytest tests/units/registry/test_registry.py -q --no-cov55 passed
  • uv run pytest tests/ -m "not e2e and not property and not eval" --cov-fail-under=90
  • Per-package coverage thresholds (scripts/check_coverage.py) green for touched packages.

Reviewer hint

Focus is the fallback return cls(...) block in src/back/objects/registry/RegistryService.py (from_domain): the three fields now read settings.* or reg.get(...) instead of reg.get(...) or settings.*. Behaviour is unchanged when env/settings are empty. Regression coverage: tests/units/registry/test_registry.py::TestRegistryCfgFromDomain::test_settings_override_legacy_session_registry.

Copilot AI review requested due to automatic review settings July 24, 2026 22:39
@bcastelino
bcastelino requested a review from a team as a code owner July 24, 2026 22:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…defaults

Registry config now treats env/settings values (catalog, schema, volume) as authoritative before falling back to legacy per-session Unity Catalog values when no bound Volume or Lakebase registry row is selected. Fixes local init selecting the legacy OntoBricksRegistry default despite REGISTRY_VOLUME=ontology.
@bcastelino
bcastelino force-pushed the fix/registry-config-precedence branch from b593129 to 79c2920 Compare July 24, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants