Update admin API client to match latest Amp Admin API spec#50
Open
Update admin API client to match latest Amp Admin API spec#50
Conversation
- Fetch latest OpenAPI spec (185KB, 17 new endpoints) - regenerate Pydantic v2 models - fix breaking changes (stop PUT, delete_by_status, new schema contract) - implement new RevisionsClient - add job events/progress/create endpoints - add dataset restore/list_jobs - add CI spec-drift check workflow
Run ruff format on models.py after generation in both CI and Makefile so the committed (formatted) file matches what the spec-check workflow produces.
Without a lock file, CI resolves latest dependency versions which can differ from local, causing spec-check failures (e.g. datamodel-code-generator producing different Optional syntax).
The generated timestamp changes on every run, causing the CI spec-check to always detect a diff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RevisionsClientfor physical table revision management (list,create,activate,prune,truncate,restore)create(),get_events(),get_progress(),delete_by_status()list_jobs(),restore(),restore_table(),delete_version()SchemaClient.get_output_schema()withanalyze()(supports dependencies, tables, functions)retry_strategy,verify,worker_idBreaking Changes
jobs.stop():POST->PUTjobs.delete_many()replaced bydelete_by_status(status)datasets.get_version()returnsDatasetInfo(wasVersionInfo)schema.get_output_schema()replaced byschema.analyze()datasets.deploy()versionparam renamed torevisionResolves #45 and #27