Skip to content

feat: Untyped discovery config libraries#39

Merged
jiatolentino merged 2 commits into
mainfrom
DM-4084-untyped-config-libraries
Jul 27, 2026
Merged

feat: Untyped discovery config libraries#39
jiatolentino merged 2 commits 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.

@AaronBarnes07
AaronBarnes07 requested a review from alxboyle July 21, 2026 22:15
aaron-barnes and others added 2 commits July 27, 2026 08:38
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.
@jiatolentino
jiatolentino force-pushed the DM-4084-untyped-config-libraries branch from 6eef1a5 to 9f5520b Compare July 27, 2026 00:40
@jiatolentino jiatolentino changed the title feat: untyped discovery config libraries (align with 3.26.14 server) feat: Untyped discovery config libraries Jul 27, 2026
@jiatolentino
jiatolentino merged commit d7010e6 into main Jul 27, 2026
9 checks passed
@jiatolentino
jiatolentino deleted the DM-4084-untyped-config-libraries branch July 27, 2026 00:45
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.

4 participants