Skip to content

fix(AI-3757): forward authorization/runtime in component sync-action - #620

Open
Matovidlo wants to merge 1 commit into
mainfrom
martinvasko-ai-3757-support-17393-cli-cant-list-linkedin-accounts-only-via-ui
Open

fix(AI-3757): forward authorization/runtime in component sync-action#620
Matovidlo wants to merge 1 commit into
mainfrom
martinvasko-ai-3757-support-17393-cli-cant-list-linkedin-accounts-only-via-ui

Conversation

@Matovidlo

Copy link
Copy Markdown
Contributor

Summary

  • kbagent component sync-action builds its configData payload from only the config's parameters and storage, dropping the root configuration's authorization (and runtime) block.
  • For OAuth/Service-Account components — e.g. keboola.ex-linkedin-ads's list_accounts — that block carries the broker reference the sync-actions service needs to resolve/decrypt credentials before invoking the component. Without it, the component crashes before its own error-handling wrapper runs, surfacing as an opaque, empty-body 400 ({"error": "", "code": 0, ...}) instead of a clean error. The same action succeeds via the Keboola UI, which does forward it.
  • Fix mirrors keboola-mcp-server's run_sync_action (the tool this command was ported from for MCP parity): runtime and authorization are read from the ROOT configuration only (rows never override them) and forwarded only when non-empty.

Test plan

  • uv run pytest tests/test_component_sync_action.py -v — 24 passed, including two new cases: test_authorization_and_runtime_forwarded_from_root and test_authorization_and_runtime_omitted_when_absent
  • uv run pytest tests/test_component_service.py tests/test_cli.py -q — 269 passed, no regressions
  • ruff check / ruff format --check / ty check on changed files — all clean

Related issues

Fixes AI-3757 (SUPPORT-17393).

🤖 Generated with Claude Code

ComponentService.run_sync_action built configData from only parameters
and storage, dropping the root configuration's authorization block. For
OAuth/Service-Account components (e.g. keboola.ex-linkedin-ads) that
block carries the broker reference the sync-actions service needs to
resolve credentials, so the component crashed before its own error
handling ran, surfacing as an opaque empty-body 400 (SUPPORT-17393).

Mirrors keboola-mcp-server's run_sync_action: authorization and runtime
are read from the root config only (rows never override them) and
forwarded when non-empty.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Aug 20, 2026

Copy link
Copy Markdown

AI-3757

@Matovidlo

Copy link
Copy Markdown
Contributor Author

@claude review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes ComponentService.run_sync_action so the kbagent component sync-action path forwards the root configuration’s runtime and authorization blocks (when present) into the Sync Actions configData payload—aligning behavior with Keboola UI and restoring functionality for OAuth/service-account components that rely on broker references (AI-3757 / SUPPORT-17393).

Changes:

  • Extend configData construction to include root-only runtime and authorization when non-empty (rows still only shallow-merge parameters/storage).
  • Add service-level tests covering forwarding behavior and omission when absent.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/keboola_agent_cli/services/component_service.py Includes root runtime/authorization in sync-action configData when present, without changing override semantics.
tests/test_component_sync_action.py Updates root-config fixture and adds targeted regression tests for the new forwarding behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Matovidlo
Matovidlo marked this pull request as ready for review August 20, 2026 05:26
@Matovidlo
Matovidlo requested a review from soustruh August 20, 2026 05:26
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