Skip to content

feat: metadata imports API (sync spec v0.7.17) - #75

Merged
kdr merged 2 commits into
mainfrom
kdr-imports
Aug 13, 2026
Merged

feat: metadata imports API (sync spec v0.7.17)#75
kdr merged 2 commits into
mainfrom
kdr-imports

Conversation

@kdr

@kdr kdr commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Syncs the SDK to spec v0.7.17 (cloudglue/cloudglue-api-spec#110) and bumps the package to 0.7.22. One feature: bulk metadata imports — saved definitions that list a data connector's source files and import each one's source metadata into a metadata collection (no media download, no credits), with run history, modes, caps, and cancellation.

Generated (cloudglue/sdk)

  • New MetadataImportsApi with the six operations over /collections/{collection_id}/imports (create/list/get/delete definitions, trigger run, cancel run)
  • New models: MetadataImport, MetadataImportDetail (definition + one page of run history), MetadataImportList, MetadataImportDelete, MetadataImportRun, MetadataImportRunProgress, MetadataImportFilterSet, CreateMetadataImportRequest, CreateMetadataImportRunRequest
  • Spec submodule → v0.7.17

Wrapper (cloudglue/client)

  • New client.metadata_imports resource: create (full definition surface — filters, default_mode, delete_missing, rate_limit, start, max_files, include_thumbnails), list, get (pages run history via limit/offset), delete, run (per-run overrides, 409 when a run is already active in the collection), cancel_run
  • Filter dicts use the wire key from (aliased to var_from on the pydantic model); docstrings carry the spec's semantics: append vs refresh, delete-missing sweep scope, capped runs never sweep, per-connector rate-limit clamping
  • Top-level re-exports: MetadataImport, MetadataImportDetail, MetadataImportList, MetadataImportRun, MetadataImportRunProgress, MetadataImportFilterSet

Entirely additive — no existing wrapper methods or models change.

Test plan

  • Package imports clean; CreateMetadataImportRequest round-trips the from filter alias; nested latest_run.progress parses; client.metadata_imports wired
  • Live battery against production11/11 (evidence in ~/Downloads/cloudglue-v0.7.17-sdk-test-results.md, matching JS battery 11/11): throwaway metadata collection + google-drive import with max_files=3; create(start=False) saves definition only; list/get; run trigger; concurrent trigger 409; capped run completes with listed=3 queued=3 indexed=3 failed=0; append rerun skips all 3; get(limit=1) pages run history; cancel lands as cancelled; delete then get 404; collection deleted at cleanup — account left clean

Note

Medium Risk
Additive client/SDK change with low regression risk, but refresh runs with delete_missing can remove collection files previously brought in by that import—callers should understand that behavior.

Overview
Adds bulk metadata imports for metadata collections: saved jobs that page a data connector and import source metadata into the collection (no media download), with OpenAPI 0.7.17 codegen plus a client.metadata_imports wrapper.

The high-level client exposes create, list, get, delete, run, and cancel_run, including connector filters, append/refresh modes, optional delete_missing on refresh, rate limits, max_files, and include_thumbnails. run surfaces 409 when another import run is already active on the same collection. Related types are re-exported from the top-level cloudglue package.

Existing APIs and wrapper resources are unchanged; this is additive SDK surface.

Reviewed by Cursor Bugbot for commit 7ff523a. Bugbot is set up for automated code reviews on this repo. Configure here.

@kdr
kdr requested a review from amyxst August 12, 2026 23:40
@kdr
kdr merged commit 2e27f30 into main Aug 13, 2026
1 check passed
@kdr
kdr deleted the kdr-imports branch August 13, 2026 22:49
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