Skip to content

BLDX-721: Fixed backend bugs and added DataContract.save() / delete() methods#863

Draft
Aryamanz29 wants to merge 9 commits intomainfrom
BLDX-721
Draft

BLDX-721: Fixed backend bugs and added DataContract.save() / delete() methods#863
Aryamanz29 wants to merge 9 commits intomainfrom
BLDX-721

Conversation

@Aryamanz29
Copy link
Member

No description provided.

Aryamanz29 and others added 8 commits March 13, 2026 14:02
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant