feat: add contract delete SDK methods (DQ-665)#903
Merged
Aryamanz29 merged 2 commits intomainfrom Apr 21, 2026
Merged
Conversation
…(DQ-665) Adds SDK support for DataContract deletion — both delete-all (cascade) and delete-latest-only modes — across sync/async and legacy/v9 clients. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e (DQ-665) - Add DataContractSpec unit tests (parsing, mutation, YAML roundtrip) and ContractClient unit tests (generate_initial_spec, delete, delete_latest_version header assertions) to both pyatlan and pyatlan_v9 test suites - Add sync integration tests for generate_initial_spec, spec-based contract creation, delete_all, and delete_latest_version (xfail: Atlas NPE on dq-dev until backend version-chain schema is deployed) in data_mesh_test.py and v9 - Add async integration tests for the same scenarios in aio/test_client.py for both pyatlan and pyatlan_v9 - Move CONTRACT_DELETE_SCOPE_HEADER constant from contract.py / aio/contract.py into pyatlan/client/constants.py (single source of truth across 4 files) - Add Optional[Dict[str, str]] type hints to extra_headers param in atlan.py, aio/client.py, and protocol.py (ApiCaller + AsyncApiCaller) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Aryamanz29
approved these changes
Apr 20, 2026
Member
Aryamanz29
left a comment
There was a problem hiding this comment.
LGTM - thanks @shivahanumanthula-atlan!
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
client.contracts.delete(guid)— hard-deletes all versions of a data contract and cleans up asset attributesclient.contracts.delete_latest_version(guid)— hard-deletes only the latest version, promotes previous versionextra_headersparam to_call_api()for per-request custom headers (used bydelete_latest_versionto passx-atlan-contract-delete-scope: single)Files changed (9)
pyatlan/client/protocol.pyextra_headers=NonetoApiCallerandAsyncApiCallerProtocolpyatlan/client/atlan.pyextra_headersparam to_call_api()pyatlan/client/aio/client.pyextra_headersparam to async_call_api()pyatlan/client/contract.pydelete()anddelete_latest_version()pyatlan/client/aio/contract.pydelete()anddelete_latest_version()pyatlan_v9/client/atlan.pyextra_headersparam to_call_api()pyatlan_v9/client/aio/atlan.pyextra_headersparam to async_call_api()pyatlan_v9/client/contract.pydelete()anddelete_latest_version()using_parse_mutation_response()pyatlan_v9/client/aio/contract.pydelete()anddelete_latest_version()using_parse_mutation_response()Usage
Backend PR
processDeletetoContractPreProcessor)Test plan
🤖 Generated with Claude Code