fix(AI-3757): forward authorization/runtime in component sync-action - #620
Open
Matovidlo wants to merge 1 commit into
Open
Conversation
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>
Contributor
Author
|
@claude review |
There was a problem hiding this comment.
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
configDataconstruction to include root-onlyruntimeandauthorizationwhen non-empty (rows still only shallow-mergeparameters/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
marked this pull request as ready for review
August 20, 2026 05:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kbagent component sync-actionbuilds itsconfigDatapayload from only the config'sparametersandstorage, dropping the root configuration'sauthorization(andruntime) block.keboola.ex-linkedin-ads'slist_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-body400({"error": "", "code": 0, ...}) instead of a clean error. The same action succeeds via the Keboola UI, which does forward it.keboola-mcp-server'srun_sync_action(the tool this command was ported from for MCP parity):runtimeandauthorizationare 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_rootandtest_authorization_and_runtime_omitted_when_absentuv run pytest tests/test_component_service.py tests/test_cli.py -q— 269 passed, no regressionsruff check/ruff format --check/ty checkon changed files — all cleanRelated issues
Fixes AI-3757 (SUPPORT-17393).
🤖 Generated with Claude Code