feat(powerbi): upgrade SDK to 2.0.0, add pytest unit tests#286
feat(powerbi): upgrade SDK to 2.0.0, add pytest unit tests#286Shubhank-Jonnada wants to merge 2 commits intomasterfrom
Conversation
- Bump autohive-integrations-sdk to ~=2.0.0 - Add .data accessor to all context.fetch() return values - Convert all error paths to ActionError(message=...) - Convert all success paths to ActionResult(data=..., cost_usd=0.0) - Remove "result" and "error" fields from all output schemas - Make nullable API fields accept ["string", "null"] in config.json - Bump config.json version to 2.0.0 - Add 68 unit tests covering happy path, request verification, error paths, and edge cases
🔍 Integration Validation ResultsCommit: Changed directories:
|
TheRealAgentK
left a comment
There was a problem hiding this comment.
LGTM. SDK 2.0.0 migration is clean — context.fetch().data, ActionError(message=...) everywhere, schema envelope fields removed, version bumped. Sensible call to make nullable Power BI fields accept ["string", "null"] in the output schema. 68 new unit tests on top of existing coverage (82 total).
Local CI verified: validate_integration ✅, check_code ✅, ruff ✅, pytest ✅.
tests/test_powerbi_integration.py already exists in master — please confirm in your test plan that you've re-run it against a real Power BI workspace on this branch to verify the v2 changes don't regress live behaviour.
Process nit: branch worktree-agent-* doesn't follow <type>/<issue#>/<desc> per AGENTS.md and no linked issue. Please follow the convention next time.
|
Correction to my earlier review: I misread the existing Approval still stands (the SDK 2.0.0 migration in this PR is shippable as-is and is now superseded for unit coverage by the new Tracked in #300 — please address in a follow-up PR. |
Summary
autohive-integrations-sdkfrom~=1.0.2to~=2.0.0context.fetch()return values now access.datafor the response bodyActionError(message=...)ActionResult(data=..., cost_usd=0.0)"result"(boolean) and"error"fields from all output schemas inconfig.json["string", "null"]types in output schemasconfig.jsonversion to2.0.0powerbi/tests/conftest.pyandpowerbi/tests/test_powerbi_unit.pywith 68 unit testsTest plan
python -m pytest powerbi/ -vpython autohive-integrations-tooling/scripts/validate_integration.py powerbipython autohive-integrations-tooling/scripts/check_code.py powerbi