Skip to content

fix: default daap_visibility on DataProduct.creator (BLDX-1252)#932

Open
vaibhavatlan wants to merge 3 commits into
mainfrom
BLDX-1252
Open

fix: default daap_visibility on DataProduct.creator (BLDX-1252)#932
vaibhavatlan wants to merge 3 commits into
mainfrom
BLDX-1252

Conversation

@vaibhavatlan
Copy link
Copy Markdown
Contributor

Summary

  • Default daap_visibility = PRIVATE in DataProduct.creator(...) / DataProduct.Attributes.create(...), mirroring the Atlan UI default. Fixes the marketplace Overview Assets tile rendering blank for products created via the SDK.
  • Add optional overrides on creator() / create() for daap_visibility, daap_visibility_users, daap_visibility_groups, owner_users, owner_groups.
  • Update the matching pyatlan/generator/templates/methods/{asset,attribute}/data_product.jinja2 templates so regeneration stays in sync.

Linear: https://linear.app/atlan-epd/issue/BLDX-1252

Root cause

DataProduct.Attributes.create(...) previously set only daap_status = ACTIVE and left daap_visibility null. The marketplace Overview tile requires both daapStatus and daapVisibility to be non-null to fetch and render the Assets count, so SDK-created products appeared with a blank count even though dataProductAssetsDSL matched assets correctly. The earlier partial fix in PR #508 only addressed daap_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: extend creator() / create() / Attributes.create() with optional visibility / owners parameters; default daap_visibility to DataProductVisibility.PRIVATE.
  • pyatlan/generator/templates/methods/asset/data_product.jinja2 and pyatlan/generator/templates/methods/attribute/data_product.jinja2: same edits so generated output stays consistent.
  • tests/unit/model/data_product_test.py: assert daap_visibility == PRIVATE on the default path; add test_create_with_overrides to cover the new params.

Test plan

  • pytest tests/unit/model/data_product_test.py — all 9 tests pass
  • ruff format --check on changed Python files — clean
  • Manual: create a DataProduct via DataProduct.creator(...) against a tenant and confirm the marketplace Overview Assets count renders (no longer blank)

🤖 Generated with Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant