BLDX-721: Fixed backend bugs and added DataContract.save() / delete() methods#863
Draft
Aryamanz29 wants to merge 9 commits intomainfrom
Draft
BLDX-721: Fixed backend bugs and added DataContract.save() / delete() methods#863Aryamanz29 wants to merge 9 commits intomainfrom
DataContract.save() / delete() methods#863Aryamanz29 wants to merge 9 commits intomainfrom
Conversation
… helpers Bug 1: save() alone doesn't set dataContractLatest on the linked asset, breaking the UI Contracts tab. save_contract() saves the contract AND updates the linked asset's dataContractLatest + hasContract. Bug 2: purge_by_guid() doesn't clear hasContract on the linked asset, leaving it in a broken state. delete_contract() purges the contract AND clears hasContract + dataContractLatest on the linked asset. Bug 3 (QN uniqueness on soft-delete) is a backend issue — no SDK fix needed. Fixes BLDX-721 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename DataContract.save_contract() -> DataContract.save() - Rename DataContract.delete_contract() -> DataContract.delete() - Clean up v9 import path for V8DataContract - Add bug-replication context in integration test docstrings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
V9 DataContract now uses v9 AtlanClient, v9 AssetMutationResponse, and v9 DataContract for response parsing instead of v8 imports. The linked asset update uses a raw API payload since v9 Asset doesn't model dataContractLatest. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The creator() now accepts asset_type and sets data_contract_asset_latest via ref_by_qualified_name so the relationship is established on normal client.asset.save(). This removes the need for DataContract.save() and DataContract.delete() helper methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
save() delegates to client.asset.save() — the relationship is already set by creator(). delete() purges the contract and clears hasContract, dataContractLatest, and dataContractLatestCertified on the linked asset. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d asset delete() now retrieves the contract by GUID to find the linked asset automatically, eliminating the need for callers to pass linked_asset_guid. Also fixes IndistinctAsset type_name/qualifiedName/name for server compat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t_type Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ract fixture Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ationship - Add __post_init__ to DataContract to set type_name="DataContract" (was inheriting "Catalog" from parent, causing from_atlas_format to resolve as Catalog instead of DataContract) - Add data_contract_latest and data_contract_latest_certified relationship fields to Asset, AssetRelationshipAttributes, and _ASSET_REL_FIELDS - Add delete_handler field to Entity and ReferenceableNested with conversion support - Restore full data_contract_latest assertions in v9 integration tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
No description provided.