fix: default daap_visibility on DataProduct.creator (BLDX-1252)#932
Open
vaibhavatlan wants to merge 3 commits into
Open
fix: default daap_visibility on DataProduct.creator (BLDX-1252)#932vaibhavatlan wants to merge 3 commits into
vaibhavatlan wants to merge 3 commits into
Conversation
…view Assets count (BLDX-1252) Data products created via DataProduct.creator() shipped with daapVisibility=null, which made the marketplace Overview tile render a blank Assets count even when the asset DSL correctly matched. Default daap_visibility to PRIVATE (mirroring the Atlan UI) and expose optional overrides for daap_visibility, daap_visibility_users/groups, and owner_users/groups on both creator() and the deprecated create(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…oduct.creator Mirrors the marketplace UI behavior: when a creator is opened in the UI, Visibility is preset to Private and Owners is preset to the calling user. The earlier change defaulted visibility; this adds an optional client kwarg that, when provided and owner_users is not set, resolves the current user via client.user.get_current() and seeds owner_users. Explicit owner_users still wins over the client-derived default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…n guards Asserts the BLDX-1252 fix at the integration layer: a DataProduct created via the default path must come back with daap_visibility=PRIVATE, daap_status=ACTIVE, and owner_users seeded with the calling user. The visibility/status pair is also asserted after a server round-trip in test_retrieve_product to guarantee the server persists both fields. The existing product fixture now passes client=client so the owner default path is exercised. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
daap_visibility = PRIVATEinDataProduct.creator(...)/DataProduct.Attributes.create(...), mirroring the Atlan UI default. Fixes the marketplace Overview Assets tile rendering blank for products created via the SDK.creator()/create()fordaap_visibility,daap_visibility_users,daap_visibility_groups,owner_users,owner_groups.pyatlan/generator/templates/methods/{asset,attribute}/data_product.jinja2templates so regeneration stays in sync.Linear: https://linear.app/atlan-epd/issue/BLDX-1252
Root cause
DataProduct.Attributes.create(...)previously set onlydaap_status = ACTIVEand leftdaap_visibilitynull. The marketplace Overview tile requires bothdaapStatusanddaapVisibilityto be non-null to fetch and render the Assets count, so SDK-created products appeared with a blank count even thoughdataProductAssetsDSLmatched assets correctly. The earlier partial fix in PR #508 only addresseddaap_status. Per @chris-grote's review on the Linear issue, the UI defaults Visibility to Private, so we mirror that here.Changes
pyatlan/model/assets/core/data_product.py: extendcreator()/create()/Attributes.create()with optional visibility / owners parameters; defaultdaap_visibilitytoDataProductVisibility.PRIVATE.pyatlan/generator/templates/methods/asset/data_product.jinja2andpyatlan/generator/templates/methods/attribute/data_product.jinja2: same edits so generated output stays consistent.tests/unit/model/data_product_test.py: assertdaap_visibility == PRIVATEon the default path; addtest_create_with_overridesto cover the new params.Test plan
pytest tests/unit/model/data_product_test.py— all 9 tests passruff format --checkon changed Python files — cleanDataProduct.creator(...)against a tenant and confirm the marketplace Overview Assets count renders (no longer blank)🤖 Generated with Claude Code