Repository navigation
v0.26.0 — config set-default-bucket + null rowsCount fix
What is new in v0.26.0
This release bundles a new feature from #234 and a bug-fix family from #235 (closing #233).
#234 — Discoverable storage.output.default_bucket wrapper
Thanks to @ottomansky (Maxmilián Ottomanský) for designing and implementing this -- a much friendlier surface than telling users to hand-craft a kbagent config update --set 'storage.output.default_bucket=...' invocation against an internal raw-mode workaround.
- New:
kbagent config set-default-bucket --bucket BUCKET_ID | --clear [--dry-run] [--branch ID]-- discoverable wrapper around the raw-modestorage.output.default_bucketworkaround documented at https://keboola.atlassian.net/wiki/spaces/SUP/pages/3770155030/ (epic KBCP-108). Read-modify-write that preserves all sibling keys understorage.outputand the rest of the configuration. Same-value writes short-circuit with{"changed": false}(no API call, no version bump).--clearremoves only thedefault_bucketkey, leaving an emptystorage.output: {}if no other siblings live there (intentional -- mirrorsset_nested_value's parent-creation semantics; Storage API treatsoutput: {}and missingoutputidentically as 'use the auto-derived bucket'). Live-validated end-to-end on three component types -- row-based GCS extractor, root-onlykeboola.ex-cnb-exchange-rates, andex-generic-v2with multiple jobs -- output tables routed to the configured bucket at job runtime in every case. The per-tabledestinationoverride (the second method shown in the support article) keeps using the existingkbagent config update --set 'storage.output.tables=[...]'-- no new wrapper there because per-table mappings have many fields that don't fit a single-purpose flag.
#235 — sync pull --with-samples no longer crashes on rowsCount: null (closes #233)
Thanks to @jakubsebek-kosik for the detailed report with traceback, root-cause analysis, and a suggested fix. Reproduced live against kosik-sales to confirm 1:1 traceback before the fix and clean execution after.
-
Fix:
kbagent sync pull --with-samplesno longer crashes withTypeError: '>' not supported between instances of 'NoneType' and 'int'when one or more tables in the project returnrowsCount: nullfrom the Storage API (typical for newly-created or empty tables on some backends, reproduced live againstkosik-sales).dict.get("rowsCount", 0)returns the default0only when the key is missing -- if the key is present with anullvalue,.get()returnsNone, and the> 0comparison crashed Python 3 before any sample was fetched. The filter and sort key inSyncService._fetch_samples()now coerceNoneto0via a small_rows()helper used in both places (t.get("rowsCount") or 0), so empty/null-rowcount tables are gracefully skipped exactly likerowsCount: 0ones. -
Fix: same
dict.get(k, 0)->dict.get(k) or 0defensive coercion applied to 5 sibling locations that did not crash but produced inconsistent JSON shapes (nullinstead of0) when the Storage API returnedrowsCount/dataSizeBytes/tablesCountas null:SyncService._write_storage_metadata()(both the buckets-index summary atstorage/buckets.jsonand per-table JSON files atstorage/tables/<bucket>/<table>.json),StorageService.list_buckets(),StorageService.list_tables(),StorageService.get_table_detail(), andSharingService.list_shared(). Without this, JSON consumers (LLM agents reading.keboola/workspace files, downstream aggregation that does arithmetic) would seenullfor what is documented as anintfield. Behavior is otherwise unchanged -- the fix only flips the Python serialization of API-returned-null fromnullto0. -
Tests: 7 new regression tests covering the full null-coercion surface: 2 in
tests/test_sync_storage_jobs.py::TestFetchSamples(filter + sort paths -- both fail on 0.25.3 with the exactTypeErrorfrom the issue traceback), 1 intests/test_sync_storage_jobs.py::TestWriteStorageMetadata(verifiesstorage/buckets.jsonand per-table JSON files surface0notnull), 2 intests/test_storage_tables.py::TestStorageNullNumericCoercion(list_bucketsandlist_tablesservice output), 1 intests/test_storage_describe_service.py::TestGetTableDetailDescriptionExtraction(get_table_detail), and 1 intests/test_sharing_service.py::TestListShared(list_shared).
Upgrade
uv tool upgrade keboola-agent-cli
# or
uv tool install --reinstall keboola-agent-cliPlugin users: /plugin update kbagent from inside Claude Code.