Skip to content

fix registry listing and entity schema scoping - #1

Merged
ndamania00 merged 1 commit into
ndamania00:registry-scoping-fixesfrom
involvedata:registry-scoping-fixes-involve
Nov 3, 2026
Merged

ndamania00 merged 1 commit into
ndamania00:registry-scoping-fixesfrom
involvedata:registry-scoping-fixes-involve

Conversation

@mghent

@mghent mghent commented Nov 3, 2026

Copy link
Copy Markdown

Fixes for dynotx#274, found testing against a tenant with six registries.

  • Registry list. Reads /api/v3/registry/items. That endpoint rejects the archived filter, so list_all_items_v3 can now skip it by passing include_archived=None.
  • Entity schemas. Their V3 records carry organization but no registry, so is_in_registry_scope falls back to the registry's organization. Before this, every entity schema was filtered out.
  • use_api=False. The ambiguity check in __init__ runs only when the API is set up.
  • registry_id on a one-registry tenant. It's now checked against the registry list, so a wrong id raises instead of being ignored.
  • Tests. Fake entity schema records carry an organization only, matching the API. The registry mock answers /api/v3/registry/items, and a test checks that the request has no archived filter. There are new tests for the two edge cases. 33 pass, and 7 of them fail without these changes.

Live, on six registries: Sandbox and another registry diff clean, a generate-files round trip is clean, and creating a dropdown and a schema puts them in the chosen registry and its organization. On a one-registry tenant, diffs match the current behaviour.

- list registries from /api/v3/registry/items, without the archived
  filter that endpoint rejects
- entity schema records carry an organization but no registry, so
  is_in_registry_scope falls back to the registry's organization
- check for ambiguous registries only when use_api is set
- check registry_id against the registry list on single-registry tenants
- tests use record shapes that match the v3 API, and check the registry
  list request
@mghent
mghent requested a review from ndamania00 as a code owner November 3, 2026 12:25
@ndamania00
ndamania00 merged commit 31a8f5d into ndamania00:registry-scoping-fixes Nov 3, 2026
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