Skip to content

feat: untyped discovery config libraries (align with 3.26.14 server)#39

Open
AaronBarnes07 wants to merge 1 commit into
mainfrom
DM-4084-untyped-config-libraries
Open

feat: untyped discovery config libraries (align with 3.26.14 server)#39
AaronBarnes07 wants to merge 1 commit into
mainfrom
DM-4084-untyped-config-libraries

Conversation

@AaronBarnes07

Copy link
Copy Markdown
Collaborator

What

Makes discovery config libraries untyped in the client, matching the DataMasque 3.26.14 server (DM-4084). A single library is now identified by (namespace, name) and can be imported by both database and file discovery configs.

  • Removed the config_type field from DiscoveryConfigLibrary.
  • Removed the config_type argument from get_discovery_config_library_by_name, create_or_update_discovery_config_library, and delete_discovery_config_library_by_name_if_exists (name-based lookups now match on namespace only).
  • Reworded the "unique per type" docstrings; dropped the now-unused DiscoveryConfigType import from the library client. The enum stays for DiscoveryConfig, which remains typed.

Why

DM-4084 re-lands discovery config libraries as a single untyped library. The 3.26.14 server drops config_type from the library model/serializer (uniqueness is (namespace, name)), so the current client would fail to parse every library list/get response (missing required config_type) and sends a now-meaningless config_type on writes.

⚠️ Breaking + release coupling

This is a breaking change to the library API (added in 1.1.6) and is coupled to the 3.26.14 server release. It must not be released before 3.26.14 ships, or the client breaks against the current (typed) server. Please hold the tag/release until 3.26.14 is out.

Test plan

  • uv run pytest — 397 passed (fully mocked; the typed-only "same name, different type" tests were removed since that's now impossible, and a test_library_is_untyped added).
  • uv run ruff check / ruff format --check — clean.
  • uv run mypy datamasque — clean.

Version bumped to 1.2.0 in pyproject.toml + HISTORY.rst.

Removes config_type from DiscoveryConfigLibrary and the name-based library
methods; a library is now identified by (namespace, name) and imported by both
database and file configs. Requires a 3.26.14+ server.
@AaronBarnes07
AaronBarnes07 requested a review from alxboyle July 21, 2026 22:15
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