Skip to content

feat(gooddata-sdk): [AUTO] add retrieve_result_binary wrapper for Arrow binary endpoint#1464

Closed
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P004-arrow-binary-endpoint
Closed

feat(gooddata-sdk): [AUTO] add retrieve_result_binary wrapper for Arrow binary endpoint#1464
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P004-arrow-binary-endpoint

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Add SDK wrapper methods exposing the new retrieveResultBinary Arrow binary endpoint introduced in gdc-nas after the ExecuteResultController refactor.

Problem: P004 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23238229346

What changed in gdc-nas

The ExecuteResultController was refactored (commit 81eb97a, PR #21382) to consolidate two separate Arrow endpoints (retrieveResultArrowFile and retrieveResultArrowStream) that previously lived at /result/{resultId} alongside the JSON endpoint into a single new endpoint:

  • NEW: GET /api/v1/actions/workspaces/{workspaceId}/execution/afm/execute/result/{resultId}/binary (operationId: retrieveResultBinary) — serves both Arrow File and Arrow Stream via content negotiation using the Accept header
  • REMOVED: retrieveResultArrowFile and retrieveResultArrowStream (both previously at /result/{resultId})
  • CHANGED: GET /result/{resultId} (operationId: retrieveResult) — Arrow content types removed; now JSON-only
  • REMOVED: DataBuffer schema from OpenAPI components, clearArrowResponseSchemas() boilerplate, and assertNoPagingParams() validation

The gooddata-api-client was already regenerated with the new retrieve_result_binary operation in actions_api.py and computation_api.py.

What was implemented in SDK

Added wrapper methods to expose the new binary endpoint to SDK users:

  • BareExecutionResponse.read_result_binary() and Execution.read_result_binary() in execution.py — instance methods on the execution response objects, calling self._actions_api.retrieve_result_binary() with _check_return_type=False and _preload_content=False to return raw bytes
  • ComputeService.retrieve_result_binary() in service.py — flat service-level entry point for the same endpoint

A dedicated unit test file test_retrieve_result_binary.py was added with mock-based tests verifying correct parameter forwarding and return value.

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/compute/model/execution.py
  • packages/gooddata-sdk/src/gooddata_sdk/compute/service.py
  • packages/gooddata-sdk/tests/compute/test_retrieve_result_binary.py

JIRA: PENDING (Jira ticket will be created after review)
Risk: Low

…ow binary endpoint

Expose the new retrieveResultBinary API endpoint (GET /result/{resultId}/binary)
in the SDK wrapper layer. Adds read_result_binary() to BareExecutionResponse and
Execution, and retrieve_result_binary() to ComputeService.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.27%. Comparing base (b65ee3f) to head (8883def).

Files with missing lines Patch % Lines
...ta-sdk/src/gooddata_sdk/compute/model/execution.py 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1464      +/-   ##
==========================================
- Coverage   77.27%   77.27%   -0.01%     
==========================================
  Files         227      227              
  Lines       14687    14695       +8     
==========================================
+ Hits        11350    11355       +5     
- Misses       3337     3340       +3     

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

@hkad98 hkad98 closed this Mar 18, 2026
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