Skip to content

feat(gooddata-sdk): [AUTO] Migrate uploadNotification from entities to actions endpoint path#1605

Open
yenkins-admin wants to merge 2 commits into
masterfrom
auto/openapi-sync-C013-20260512-r59682
Open

feat(gooddata-sdk): [AUTO] Migrate uploadNotification from entities to actions endpoint path#1605
yenkins-admin wants to merge 2 commits into
masterfrom
auto/openapi-sync-C013-20260512-r59682

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Summary

Added register_workspace_upload_notification(workspace_id) method to CatalogWorkspaceService that wraps the new /api/v1/actions/workspaces/{workspaceId}/uploadNotification endpoint. The generated API client (ActionsApi) already contains the register_workspace_upload_notification method; only the SDK wrapper layer and integration test were missing. Added an integration test in test_catalog_workspace.py with a VCR cassette reference.

Impact: modification | Services: gooddata-metadata-client

Files changed

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/service.py
  • packages/gooddata-sdk/tests/catalog/test_catalog_workspace.py

Agent decisions

Decisions (3)

placement of new method — Added to CatalogWorkspaceService in service.py, not to a separate module

  • Alternatives: Create a new action model file, Add to content_service.py
  • Why: All other workspace-scoped action methods (e.g., resolve_all_workspace_settings, set_metadata_localization) live in CatalogWorkspaceService.service.py. The data-source analogue register_upload_notification is in CatalogDataSourceService.service.py following the same pattern.

no new public init.py export — Did not add export to gooddata_sdk/init.py

  • Alternatives: Export the method name as a constant for discoverability
  • Why: The method is accessed via sdk.catalog_workspace.register_workspace_upload_notification(), which is already reachable through the existing CatalogWorkspaceService export. No new class or constant needs to be exported.

test strategy for 204 No Content endpoint — Integration test that calls the method and asserts no exception is raised

  • Alternatives: Assert on execution result IDs changing (complex, requires additional setup), Skip the integration test
  • Why: The endpoint returns HTTP 204 with no body. There is nothing to assert on the response; success is the absence of an exception. This mirrors similar fire-and-forget tests in the codebase (e.g., test_register_upload_notification for data sources).
Assumptions to verify (3)
  • The old /entities/workspaces/{workspaceId}/uploadNotification endpoint never had an SDK wrapper in this codebase (search for uploadNotification, upload_notification, UploadNotification returned no SDK hits), so this is effectively a new method rather than a migration of existing code.
  • The ActionsApi.register_workspace_upload_notification() accepts only workspace_id as a positional argument with no request body, consistent with the new endpoint definition.
  • test_config['workspace'] in the test environment refers to a valid workspace ID that accepts upload notifications.
Risks (1)
  • test_register_workspace_upload_notification will fail recording if the test environment workspace does not have a data source with uploaded data (the endpoint triggers cache invalidation; it should still return 204 even if there is nothing to invalidate, but backend behavior may vary).
Layers touched (2)
  • public_api — New service method register_workspace_upload_notification added to CatalogWorkspaceService
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/service.py
  • tests — Integration test test_register_workspace_upload_notification added with VCR cassette reference
    • packages/gooddata-sdk/tests/catalog/test_catalog_workspace.py

Source commits (gdc-nas)

  • 90b39cc Merge pull request #22334 from Tjev/cq-2080-endpoint
  • 4ef0a1e Merge pull request #22379 from Tjev/cq-2244-ws-ds-removal
OpenAPI diff
@@ gooddata-metadata-client.json @@
+    "/api/v1/actions/workspaces/{workspaceId}/uploadNotification": {
+      "post": {
+        "description": "Notification sets up all reports to be computed again with new data.",
+        "operationId": "registerWorkspaceUploadNotification",
+        "responses": { "204": { "description": "An upload notification has been successfully registered." } },
+        "summary": "Register an upload notification"
+      }
+    }
 (net: old /entities/.../uploadNotification with WorkspaceUploadNotificationRequest body removed; new /actions/... endpoint without request body is the net result)

Workflow run


Generated by SDK OpenAPI Sync workflow

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.96%. Comparing base (12c8d84) to head (f1d3157).
⚠️ Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1605   +/-   ##
=======================================
  Coverage   78.96%   78.96%           
=======================================
  Files         231      231           
  Lines       15578    15580    +2     
=======================================
+ Hits        12301    12303    +2     
  Misses       3277     3277           

☔ 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.

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