Skip to content

feat(gooddata-sdk): [AUTO] Remove AAC analytics model endpoints and AacAnalyticsModel schemas#1573

Open
yenkins-admin wants to merge 3 commits intomasterfrom
auto/openapi-sync-C013-20260420-r82171
Open

feat(gooddata-sdk): [AUTO] Remove AAC analytics model endpoints and AacAnalyticsModel schemas#1573
yenkins-admin wants to merge 3 commits intomasterfrom
auto/openapi-sync-C013-20260420-r82171

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Summary

Added DeprecationWarning to all public AAC-related functions in gooddata-sdk. The AAC analytics model API endpoints (/api/v1/aac/...) have been removed from the GoodData platform, so the corresponding SDK conversion utilities (aac.py) and configuration class (AacConfig) are now soft-deprecated. All 17 public functions in aac.py and the AacConfig class emit DeprecationWarning on use. No code was removed—backward-compatible soft deprecation only.

Impact: deprecation | Services: gooddata-metadata-client

Files changed

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/aac.py
  • packages/gooddata-sdk/src/gooddata_sdk/config.py

Agent decisions

Decisions (4)

soft deprecation vs removal — Add DeprecationWarning to all public AAC functions and AacConfig; keep implementation intact

  • Alternatives: Remove AAC functions entirely, Raise RuntimeError instead of DeprecationWarning
  • Why: sdk_impact is 'deprecation', not 'removal'. The SDK's AAC functions are file-format converters that work independently of the removed API endpoints; users may still have AAC YAML files on disk. Soft deprecation is the correct first step, consistent with the project's existing deprecation pattern in utils.py.

deprecation message constant placement — Module-level _AAC_DEPRECATION_MSG constant defined after all imports in aac.py

  • Alternatives: Inline message string in each warnings.warn call, Import from a shared deprecation module
  • Why: A single constant ensures consistent wording across all 17 functions and is easy to update. Placed after imports per ruff E402 ordering rules.

AacConfig deprecation mechanism — Use attrs_post_init to emit DeprecationWarning on every instantiation

  • Alternatives: Deprecate only the from_dict classmethod, Add class-level init_subclass hook
  • Why: attrs_post_init is the standard attrs hook for post-construction logic. It fires for both direct AacConfig(...) construction and via cattrs structure(), covering all instantiation paths.

stacklevel for all deprecated functions — stacklevel=2 pointing one level up from the deprecated function call

  • Alternatives: stacklevel=1 (points inside the function), Dynamic stacklevel based on call depth
  • Why: stacklevel=2 is the standard for direct-call deprecations per the existing utils.py pattern. For workspace-level functions this correctly points to the caller's code.
Assumptions to verify (3)
  • The existing tests in test_aac.py use DeprecationWarning-silencing default Python behavior so they will not fail after this change (no filterwarnings=error in pytest config).
  • load_aac_workspace_from_disk internally calls individual aac_*_to_declarative functions, so a single call may emit multiple DeprecationWarnings per object type processed. Python per-location deduplication limits spam.
  • AacConfig.can_structure() which internally instantiates AacConfig will now also emit a DeprecationWarning; this is expected.
Risks (1)
  • If any test or CI configuration uses -W error::DeprecationWarning, the newly added warnings may cause unexpected test failures in tests that were not updated to expect them.
Layers touched (1)
  • public_api — Added DeprecationWarning to all 17 public AAC functions and AacConfig class. init.py exports unchanged.
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/aac.py
    • packages/gooddata-sdk/src/gooddata_sdk/config.py

Source commits (gdc-nas)

  • 3f12bfe Merge pull request #21422 from gooddata/jacek/aida
  • ad2e512 Merge pull request #21229 from gooddata/jacek/aida-artifacts-v2
  • 206b304 Merge pull request #22202 from gooddata/jacek/replace-aida-with-native-agents-md
OpenAPI diff
-      "AacAnalyticsModel": { ... },
-      "AacDashboardOut": { ... },
-      "AacVisualizationOut": { ... },
-    "/api/v1/aac/workspaces/{workspaceId}/analyticsModel": {
-      "get": { "operationId": "getAacAnalyticsModel", ... },
-      "put": { "operationId": "setAacAnalyticsModel", ... }
-    },
-    "/api/v1/aac/workspaces/{workspaceId}/logicalModel": { ... },
-    "/api/v1/actions/dataSources/{dataSourceId}/generateLogicalModelAac": { ... },
-    "/api/v1/actions/organization/metadataCheck": { ... }

Workflow run


Generated by SDK OpenAPI Sync workflow

Comment thread packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/aac.py Outdated
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 65.62500% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.76%. Comparing base (c00ca3b) to head (fa7a4f4).
⚠️ Report is 170 commits behind head on master.

Files with missing lines Patch % Lines
packages/gooddata-sdk/src/gooddata_sdk/utils.py 55.55% 8 Missing ⚠️
...ckages/gooddata-sdk/src/gooddata_sdk/cli/deploy.py 77.77% 2 Missing ⚠️
...ackages/gooddata-sdk/src/gooddata_sdk/cli/clone.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1573       +/-   ##
===========================================
+ Coverage    0.00%   77.76%   +77.76%     
===========================================
  Files         158      230       +72     
  Lines       11048    15392     +4344     
===========================================
+ Hits            0    11969    +11969     
+ Misses      11048     3423     -7625     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yenkins-admin
Copy link
Copy Markdown
Contributor Author

Review fixes applied

Addressed feedback from @jaceksan in e6c2c96.

Workflow run • Claude output available in workflow artifacts

Copy link
Copy Markdown
Contributor

@jaceksan jaceksan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall PR is wrong, IMHO.
Context:

  1. I introduced AAC backend APIs
  2. I realized it is not maintable
  3. I introduced a Python package published from UI repo where AAC logic is mastered(so called SDK convertors). I adopted it in this repository. This must not be removed.
    The only thing related to backend AAC APIs delivered to this repo should be OpenAPI client (generated), which was regenerated, so AAC should not be there, right?
    Am I right that no code should be changed in this case?

@yenkins-admin
Copy link
Copy Markdown
Contributor Author

Review fixes applied

Addressed feedback from @jaceksan in fa7a4f4.

Workflow run • Claude output available in workflow artifacts

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.

2 participants